Skip to main content
Read about

Flank Pain

How to know if your flank pain is from kidney stones, a muscle strain, or something else
Tooltip Icon.
Last updated February 1, 2024

Flank pain quiz

Take a quiz to find out what's causing your pain.

9 most common cause(s)

Illustration of various health care options.
Illustration of a health care worker swabbing an individual.
Charley Horse
Kidney Stone
Illustration of a doctor beside a bedridden patient.
Lung disease
Illustration of a person thinking with cross bandaids.
Degenerative disc disease

Flank pain quiz

Take a quiz to find out what's causing your pain.

Take flank pain quiz

⚡️ Powered by AI

Get personalized answers to your health questions

Our clinically-backed AI will ask you questions and provide an answer specific to your unique health situation.


Your response today was provided by ChatGPT trained on the proprietary content of this page. Please note, this tool is for information purposes only and not intended to be used as a substitute for professional advice. You assume responsibility for decisions made with your individual medical situation.

Was this information helpful?

Thank you! Buoy values your feedback. The more we know about what’s working – and what could improve – the better we can make our experience.

What is flank pain?

Flank pain is pain that occurs on the side and back of your torso. It may be a sign that something is wrong with one of the organs in that area, including your kidneys, gallbladder, appendix, and intestines. Or it could be a muscle strain or pain from your spine, like a herniated disc.

Depending on the cause, flank pain can range from mild to severe, and can feel like a sharp, stabbing pain or a throbbing or dull ache. It can be acute, meaning it comes on quickly, or chronic, meaning it has developed over a longer period of time.

When is flank pain serious?

Flank pain can be a sign of a serious medical condition that needs immediate attention and treatment. Paying attention to other symptoms can help you decide how serious it is.

If you also have a fever, it may mean you have an infection of the kidney, gallbladder, lung, or intestine. Severe nausea, vomiting, and diarrhea can be a symptom of kidney stones, appendicitis, pancreatitis, or gallbladder disease.

Chest pain and difficulty breathing may mean your heart, circulatory system, or lungs are affected.

Even if you don’t have any other symptoms, contact your doctor if your flank pain is severe or is getting worse. But seek treatment immediately If you have flank pain along with any of these symptoms:

Locations of flank pain

Where your flank pain is located can give a clue about what might be causing it.

Pain on both sides: Degenerative disc disease, muscle spasms, herniated disc

Pain on right side: Gallbladder disease, appendicitis

Pain on left side: Pancreatitis, diverticulitis

Pain radiating to back: Ruptured abdominal aortic aneurysm, diverticulitis, gallstones, appendicitis, inflammatory bowel disease

Pain when breathing deep: Lung infection, pulmonary embolism (blood clot in lung)

Pain on either sideKidney stone, kidney infection, shingles, degenerative disc disease, muscle spasm, herniated disc, inflammatory bowel disease

Other symptoms experienced with flank pain

Flank pain is often accompanied by some other symptoms, including:

  • Gas, bloating: May be a sign of gastrointestinal causes, like gallstones, appendicitis, inflammatory bowel disease, and liver disease.
  • Nausea: May be a sign of kidney stones, urinary tract infections, kidney infections, gallbladder disease, appendicitis, pancreatitis, and the life-threatening rupture of an abdominal aortic aneurysm.
  • Diarrhea: Can occur with gastrointestinal issues like appendicitis, diverticulitis, or inflammatory bowel disease.
  • Blood in urine: Can occur when the lining of the urinary tract is irritated, like with a kidney infection, kidney stone, or tumor in the kidney or bladder. Blood in the urine is never normal—you should always tell your doctor about it as soon as possible.

Dr. Rx

Some important questions I would ask include, but are not limited to: Where is the flank pain located? Is it on one or both sides? What were you doing when it started? Is it sharp? Stabbing? Crampy? Dull? Achy? Is it always there or does it come and go? What makes it better or worse? Have you had pain like this before? Is there any blood in urine or stool? Are you experiencing any urinary symptoms such as pain or burning when urinating, increased frequency or hesitancy? Any fevers or chills? —Dr. Elizabeth Grand

Main causes of flank pain

1. Kidney stones

Kidney stones are deposits that form in the urinary tract. They usually are made up of substances normally found in urine like calcium, oxalate, and uric acid. Certain conditions like dehydration can cause them to be concentrated and form stones.

The stones then travel down the tubes of the urinary tract (ureters) into the bladder. Along the way, they irritate the lining of the urinary tract, causing flank pain and blood in the urine.

The pain from kidney stones is usually severe, sharp, and stabbing and can occur on either side, depending on where the stone is located. As the stone moves around, the intensity and location of the pain can change.

Very common: Kidney stones affect 1 in 11 adults in the U.S., according to a study in the journal European Urology.

Co-occurring symptoms

  • Nausea
  • Vomiting
  • Sweating
  • Blood in urine

Treatment and urgency: If you think you might have a kidney stone, call your doctor right away. If the pain is severe, you should go to the emergency room in case you need something stronger for the pain, and so the doctors can check for any complications. Kidney stones are treated with intravenous fluids, pain medications like non-steroidal anti-inflammatory (NSAIDs) and occasionally opioids, and sometimes medications to help relax the lining of the urinary tract (such as tamsulosin).

Whether you need a procedure depends on the size and location of the stone. If the stone is very small, it may pass on its own (meaning it comes out when you urinate). If the stone is medium-sized or small but stuck in a location where it cannot pass naturally, then a procedure called shock wave lithotripsy may be performed. This uses shock waves to break up the stone into smaller pieces so that they can pass through the urinary system. If the stone is large, shock wave lithotripsy may not work and surgery may be necessary.

2. Kidney infection

A kidney infection, also known as pyelonephritis, can cause flank pain since the kidneys are located just below the rib cage. Pyelonephritis is often a complication of a lower urinary tract infection. That’s when bacteria infect the bladder, then travel up the ureters to the kidney. The pain can be on either or both sides and may start off as dull before becoming sharp as the infection progresses.

Uncommon: Kidney infections affect about 15 to 17 out of every 10,000 females and 3 to 4 out of every 10,000 men each year. It most commonly occurs in young, sexually active women.

Co-occurring symptoms

  • Fever
  • Chills
  • Blood in urine
  • Pain or burning when urinating
  • Increased frequency of urination
  • Urinary urgency
  • Nausea

Treatment and urgency: A kidney infection is a serious condition. Call your doctor or go to the ER if pain is severe. If left untreated, the infection can spread to the bloodstream and cause sepsis, which is life-threatening. Kidney infections are treated with antibiotics in either pill form or intravenously, depending on how severe the infection is and the type of bacteria causing it.

3. Muscle spasm

A muscle spasm is a painful tightening or contraction of one or more muscles. Sometimes they happen without an obvious reason, but they are often caused by overuse or underuse of a muscle, dehydration, or electrolyte imbalances, like low potassium or magnesium. Muscle spasms can cause flank pain when they happen to muscles in your mid to lower back.

Depending on which muscles are affected, the pain may be on only one side or on both sides. It will likely come on suddenly, may be sharp and severe, and can feel better or worse when you do certain movements. You might have recently done some heavy lifting, strenuous exercise, or vigorous movement.

Very common

Co-occurring symptoms

  • Back tightness
  • Back stiffness

Treatment and urgency: Muscle spasms can be quite painful, but usually go away after a few days or weeks. If the muscle spasm comes on during a physical activity, such as heavy lifting, you should stop what you are doing and rest.

You can stretch and massage the area to help relax the muscle and use ice or heat to reduce your pain. If you think you have a muscle spasm and the pain does not improve after a few days, is getting worse, or is severe, you should contact your doctor.

Your doctor may recommend physical therapy so you can learn exercises to reduce the pain. You can also take NSAIDs, like ibuprofen, or prescription muscle relaxants, such as carisoprodol, cyclobenzaprine, or baclofen.

Pro Tip

Muscle spasms can sometimes take days to weeks to improve. Stretching, massage, and physical therapy can be extremely helpful in alleviating pain, sometimes even more than medication. —Dr. Grand

4. Degenerative disc disease

Your spine is made up of bones called vertebrae, which are stacked on top of each other to form a column. The discs between the vertebrae act like cushions. When those discs get worn down, the bones start to rub against each other. This is called degenerative disc disease, also known as osteoarthritis of the spine.

Depending on where the damaged discs are, it can cause chronic flank pain that feels dull and achy and often is worse when sitting, bending, or twisting.

Common: Degenerative disc disease becomes more common with age. Over 16 million people in the U.S. and Canada are affected by degenerative disc disease each year, according to a study in Global Spine Journal.

Co-occurring symptoms

  • Low back pain
  • Back stiffness
  • Numbness or tingling in the feet or legs
  • Difficulty moving, especially bending or twisting
  • Difficulty sitting for prolonged periods of time
  • Leg weakness

Treatment and urgency: Degenerative disc disease is a chronic and irreversible condition. While you should talk to your doctor about it, you only need immediate care if you have severe pain or find it difficult to move. Your doctor will likely recommend physical therapy or aquatic therapy in a pool, which is especially helpful since it reduces the pressure on your discs while improving your range of motion.

Medications to help control pain include NSAIDs (like ibuprofen) and Tylenol. If nerves in your spine are affected, you might be prescribed a medication called gabapentin. For severe pain, your doctor may recommend a steroid injection into the spine to decrease inflammation and control pain.

5. Gallbladder disease

The gallbladder, which stores and releases fluids to help digestion, is located in the upper right part of the abdomen. Gallbladder problems can cause flank pain on your right side. These include gallstones and gallbladder infection, which is known as cholecystitis.

Gallstones are small, hard deposits that form inside of the gallbladder. Sometimes they are painless, but other times they irritate the lining of the gallbladder and cause cramps and pain that can feel worse after eating fatty foods. They can also block fluids leaving the gallbladder, causing inflammation.

Cholecystitis is when the gallbladder becomes infected by bacteria, typically causing pain, nausea, fever, and chills.

Common: It is estimated that 10% to 15% of adults in the U.S. have or will have gallstones, according to a study in the journal Gut and Liver.

Co-occurring symptoms

  • Nausea
  • Vomiting
  • Yellowing of the skin or eyes
  • Pale stools
  • Dark urine
  • Fever

Treatment and urgency: Gallstones alone aren’t a medical emergency. Gallstones can cause discomfort that comes and goes, and does not necessarily need to be treated. If the pain is severe, frequent, or you also have nausea or vomiting, your doctor will likely recommend surgery to remove your gallbladder.

An infected gallbladder is an urgent medical condition that can be treated with antibiotics, pain relievers, and, ideally, surgery to remove the gallbladder.

6. Appendicitis

If the appendix becomes inflamed, you have appendicitis. The inflammation may be caused by an infection or a blockage in the appendix. Generally, appendicitis causes discomfort (from a dull ache to a severe, stabbing pain) in the center or lower right part of your abdomen. But since the exact location of the appendix can vary, appendicitis can also cause pain in the right flank.

Common: Appendicitis is most common in people between the ages of 10 and 30, and males are more likely to get it than females.

Co-occurring symptoms

  • Nausea
  • Vomiting
  • Loss of appetite
  • Fever
  • Gas, bloating
  • Diarrhea
  • Fatigue

Treatment and urgency: Appendicitis should be diagnosed and treated right away to prevent dangerous complications, which include the appendix bursting and causing sepsis (a dangerous infection). Treatment typically includes antibiotics and surgery to remove the appendix (appendectomy).

Pro Tip

One common misconception is that appendicitis only happens in childhood or young adulthood. Though appendicitis most commonly occurs in ages 10 to 30 years, anyone at any age can develop appendicitis. —Dr. Grand

7. Pancreatitis

Pancreatitis is the inflammation of the pancreas, an important organ that produces fluids used during digestion. There are many different causes of pancreatitis, including gallstones, alcohol use, certain medications, and even scorpion bites. Pain from pancreatitis, which typically comes on suddenly and is often sharp and severe, is usually felt in the upper abdominal area and can include the left flank.


Co-occurring symptoms

  • Nausea
  • Vomiting
  • Fever
  • Sweating
  • Palpitations

Treatment and urgency: Pancreatitis is serious and needs to be treated quickly, since it can get worse and become life-threatening. If you have pancreatitis, you will probably be given IV fluids, take pain medication, and be told to either completely fast or only consume clear liquids until symptoms start to improve. If gallstones are causing the pancreatitis, you may need the stone removed by a procedure called an endoscopic retrograde cholangiopancreatography (ERCP).

8. Shingles

After having chickenpox, the virus stays dormant in your nerves. It doesn’t do any harm, but the virus can get reactivated many years later, causing a painful rash known as shingles, or herpes zoster.

Though shingles can occur anywhere, it most often affects either the right or left side of the torso, wrapping around to the back. Symptoms may start off as a tingling sensation and become more of a throbbing, burning, or stabbing pain as the rash progresses. In some cases, the pain persists even after the rash goes away.

Very common: The Centers for Disease Control and Prevention (CDC) estimates that 1 in 3 people will experience shingles at some point in their lives, with the risk increasing with age.

Co-occurring symptoms

  • Tingling
  • Numbness
  • Rash, initially starting as red bumps that become filled with fluid and then crust over

Treatment and urgency: It’s best to start treatment as soon as possible to prevent complications (like spreading to the eye area). If you’ve had symptoms for less than 72 hours, you’ll be treated with antiviral medications such as acyclovir, valacyclovir, or famciclovir.

If it’s been more than 72 hours, antiviral medications may not work as well. In that case, anti- inflammatory drugs (NSAIDs), like ibuprofen, and acetaminophen (Tylenol) can reduce pain. If the pain is severe, you may be prescribed other medications like steroids (such as prednisone) or gabapentin.

9. Lung disease

Diseases that affect the lower part of your lungs, like pneumonia and pulmonary embolism, can cause flank pain. Pneumonia is a lung infection that can be bacterial, viral, or fungal. Pulmonary embolism is when there’s a blood clot in the blood vessels within the lung.

Both pneumonia and pulmonary embolism can cause irritation and inflammation in the tissue that lines the surface of the lung, causing a sharp, stabbing pain that gets worse with deep breathing, coughing, or sneezing.

Very common: Pneumonia is very common and leads to about 1 million hospitalizations each year in the U.S. Pulmonary embolism is less common but still occurs fairly frequently. The CDC estimates that it may cause about 60,000-100,000 deaths per year.

Co-occurring symptoms

  • Cough
  • Fever
  • Shortness of breath
  • Palpitations
  • Lightheadedness
  • Loss of consciousness
  • Swelling in arm or leg

Treatment and urgency: Both pneumonia and pulmonary embolism require immediate treatment. The most common types of pneumonia are treated with antibiotics. If you have shortness of breath, heart palpitations, and a high fever, you might need to be hospitalized.

Pulmonary embolism is a medical emergency that is usually treated in a hospital. Treatment includes anticoagulants, which are medications that help thin the blood so the clot can dissolve.

Other causes of flank pain

  • Inflammatory bowel disease
  • Diverticulitis
  • Herniated disc
  • Kidney tumor
  • Bladder tumor
  • Pleural effusion
  • Ruptured abdominal aortic aneurysm

Reducing flank pain at home

Depending on the cause, you can treat your flank pain at home with the following:

  • Over-the-counter medications, such as acetaminophen (Tylenol) and NSAIDs (ibuprofen)
  • Ice
  • Heat
  • Massage
  • Stretching exercises
  • Walking

Exercises for flank pain

If flank pain is because of a tight muscle, the following stretching exercises may help you feel better:

  • Tennis ball stretch: Lie down on the floor and place a tennis ball under the area that hurts. Gently move your back to massage the muscle with the tennis ball.
  • Back twist: Sit up on the floor with back straight and legs crossed. Twist your torso to the right, bringing your right hand to the floor behind you and your left hand to the right knee. Hold for several seconds, then relax and repeat on the left side.
  • Bridge pose: Lie on your back with your knees bent, feet on the floor, and arms at your sides. Push through your feet to lift your butt off of the floor. Hold for several seconds, then return to start.
  • Child’s pose: Kneel on the floor and sit back on your heels. Bend at the waist and bring your torso down to the ground, chest touching your thighs and arms extended on the ground above your head.
Hear what 2 others are saying
Once your story receives approval from our editors, it will exist on Buoy as a helpful resource for others who may experience something similar.
The stories shared below are not written by Buoy employees. Buoy does not endorse any of the information in these stories. Whenever you have questions or concerns about a medical condition, you should always contact your doctor or a healthcare provider.
Any updates to Unresolved Flank Pain?Posted February 10, 2024 by C.
I have been suffering from symptoms identical to those described by “Posted November 6, 2021 by B.” Have seen every type of specialist in the dictionary and undergone extensive testing. Wondering if there are any updates to that story.
Flank pain unresolvedPosted November 6, 2021 by B.
Beginning....Colonoscopy Jan 2021. All went fine, no issues. March 2021 started getting back/left flank pain at bottom of ribcage. Would only occur at night about 4-5 hrs after asleep. Would wake me up. Went to ER, gave blood and urine sample, had ultrasound on kidney(negative) ER doctor suggested to see Primary. She diagnosed muscle issues. Told me to take NSAIDS, ice and heat area. Had me get an MRI. Did as she said; nothing got better. After MRI she said lower lumbar issues. I had explained I had lower lumbar issues before. This pain isn't the same. Or in the same area. She has dismissed me after I disagreed with all her diagnosis. I haven't gone to doctor a lot except for yearly routine physical. So we're not on a personal level. On my own I have seen a kidney and urologist doctor. Both came back negative. I've gone back to the GI doctor for him to tell me muscular. It's been 9 months and same issue occurs same pain, same spot every night and sometimes during the day now. During the 9 months I've noticed moving around helps the pain. Lying down is not my friend. Any suggestions?
Dr. Grand is a board-certified Internal Medicine Physician. She received her undergraduate degree in Psychology from New York University (2010) and graduated from Rutgers-Robert Wood Johnson Medical School (2014) where she was inducted into the Gold Humanism Honor Society. She completed an Internal Medicine residency program at Cooper University Hospital (2017) where she served as a Chief Resident...
Read full bio

Was this article helpful?

18 people found this helpful
Tooltip Icon.