Painful menstruation is called dysmenorrhea. There are two types: primary and secondary. Certain medical conditions, including endometriosis and pelvic inflammatory disease, can cause it.

Menstruation occurs when the uterus sheds its lining once a month. Some pain, cramping, and discomfort during menstrual periods is normal. Excessive pain that causes you to miss work or school is not.

Primary dysmenorrhea occurs in people who experience pain before and during menstruation. If you’ve had normal periods that become painful later in life, it may be secondary dysmenorrhea. A condition affecting the uterus or other pelvic organs, such as endometriosis or uterine fibroids, can cause this.

It’s not always possible to identify the cause of painful menstrual periods. Some people are just at a higher risk of having painful periods.

These risks include:

  • being under age 20
  • having a family history of painful periods
  • smoking
  • having heavy bleeding with periods
  • having irregular periods
  • never having had a baby
  • reaching puberty before age 11

A hormone called prostaglandin triggers muscle contractions in your uterus that expel the lining. These contractions can cause pain and inflammation. The level of prostaglandin rises right before menstruation begins.

Painful menstrual periods can also be the result of an underlying medical condition, such as:

  • Premenstrual syndrome (PMS). PMS is a common condition that’s caused by hormonal changes in the body occurring 1 to 2 weeks before menstruation begins. Symptoms typically go away after bleeding begins.
  • Endometriosis. This is a painful medical condition in which cells from the lining of the uterus grow in other parts of the body, usually on the fallopian tubes, ovaries, or tissue lining the pelvis.
  • Fibroids in the uterus. Fibroids are noncancerous tumors that can put pressure on the uterus or cause abnormal menstruation and pain, though they often don’t cause symptoms.
  • Pelvic inflammatory disease (PID). PID is an infection of the uterus, fallopian tubes, or ovaries often caused by sexually transmitted bacteria that cause inflammation of the reproductive organs and pain.
  • Adenomyosis. This is a rare condition in which the uterine lining grows into the muscular wall of the uterus, causing inflammation, pressure, and pain. It can also cause longer or heavier periods.
  • Cervical stenosis. Cervical stenosis is a rare condition in which the cervix is so small or narrow that it slows menstrual flow, causing an increase of pressure inside the uterus that causes pain.

At-home treatments can be helpful in relieving painful menstrual periods. Types of things to try at home include:

If menstrual pain is interfering with your ability to perform basic tasks each month, it may be time to talk to a gynecologist.

Talk to your doctor about your symptoms and if you experience any of the following:

Sudden cramping or pelvic pain could be signs of infection. An untreated infection can cause scar tissue that damages the pelvic organs and may lead to infertility.

If you have symptoms of an infection, seek prompt medical attention:

  • fever
  • severe pelvic pain
  • sudden pain, especially if you may be pregnant
  • foul-smelling vaginal discharge

When trying to find out what the underlying cause of painful menstruation is, your doctor will likely take your medical history and perform a physical exam. This will include a pelvic exam to check for any abnormalities in your reproductive system and to look for signs of infection.

If your doctor thinks an underlying disorder is causing your symptoms, they may perform imaging tests. These can include:

Depending on the results of your imaging tests, your doctor may order a laparoscopy. This is a test in which a doctor makes small incisions in the abdomen into which they insert a fiber-optic tube with a camera at the end to see inside your abdominal cavity.

If at-home treatment doesn’t relieve your menstrual pain, medical treatment options exist.

Treatment will depend on the severity and underlying cause of your pain. If PID or sexually transmitted infections (STIs) are causing your pain, your doctor will prescribe antibiotics to clear the infection.

Your doctor may also prescribe medications that include:

  • Nonsteroidal anti-inflammatory drugs (NSAIDs). You can find these drugs over the counter or get prescription-strength NSAIDs from your doctor.
  • Other pain relievers. This includes over-the-counter options like acetaminophen (Tylenol) or stronger prescription pain medications.
  • Antidepressants. Antidepressants are sometimes prescribed to help lessen some of the mood swings associated with PMS.

Your doctor may also suggest that you try hormonal birth control. Hormonal birth control is available as a pill, patch, vaginal ring, injection, implant, or IUD. Hormones prevent ovulation, which can control your menstrual cramps.

Surgery can treat endometriosis or uterine fibroids. This is an option if other treatments haven’t been successful. The surgery removes any endometriosis implants, uterine fibroids, or cysts.

In rare cases, a hysterectomy (the surgical removal of the uterus) is an option if other treatments haven’t worked and pain is severe. If you have a hysterectomy you will no longer be able to have children. This option is usually only used if someone isn’t planning on having children or is at the end of their childbearing years.