Doctors Note Logo

Published on: 9/22/2026

What causes flank pain, and when could it be your kidneys?

Flank pain, felt in the side and back between the ribs and hip, most often stems from muscle strain, but it can also signal kidney stones, a kidney infection (pyelonephritis), a urinary tract infection spreading upward, shingles, spinal arthritis, or a pinched nerve. Kidney-related causes are more likely when the pain comes in severe waves, radiates to the groin, or arrives with fever, chills, nausea, painful urination, or blood in the urine. Pain that worsens with movement and eases with rest points more toward a musculoskeletal origin, though overlapping symptoms make self-diagnosis unreliable. There are several important warning signs and timing factors to consider, including when flank pain becomes an emergency, so see below to understand more.

Because kidney infections and obstructing stones can escalate quickly, and because back strain and nerve pain can mimic them closely, a few minutes spent clarifying your symptoms now is time well spent. Take a free, instant, online symptom check to see which causes best match your pattern of pain and get clear guidance on your next steps.

Last reviewed for medical accuracy: 09/22/2026

answer background

Explanation

What Causes Flank Pain, and When Could It Be Your Kidneys?

Flank pain refers to discomfort in the area between your lower ribs and the top of your pelvis, on either side of your spine. It can range from mild and annoying to sharp and debilitating. Understanding the possible causes—and when to suspect a kidney problem—can help you seek appropriate care without unnecessary anxiety.


Anatomy of the Flank Region

  • Location: Sides of the torso, between the bottom of the rib cage and the hip bone.
  • Structures involved:
    • Muscles (e.g., latissimus dorsi, quadratus lumborum)
    • Ribs and spine
    • Kidneys, ureters
    • Portions of the colon
    • In women, parts of the reproductive organs

Common Non-Kidney Causes of Flank Pain

  1. Musculoskeletal Strain

    • Overuse injury from heavy lifting or twisting
    • Sudden movements causing muscle spasm
    • Poor posture, especially with prolonged sitting or standing
  2. Spinal Conditions

    • Herniated disc pressing on spinal nerves
    • Osteoarthritis or degenerative changes
    • Scoliosis or other spinal misalignments
  3. Gastrointestinal Issues

    • Gas or bloating causing referred pain
    • Constipation with pressure on nearby nerves
    • Irritable bowel syndrome (IBS)
  4. Gynecological Causes (in women)

    • Ovarian cysts or torsion
    • Endometriosis involving pelvic ligaments
    • Ectopic pregnancy (rare but serious)
  5. Vascular Problems

    • Abdominal aortic aneurysm (typically in older adults)
    • Blood clot or dissection of a major artery

Kidney-Related Causes of Flank Pain

When your kidneys are the source, the pain often has distinct features. Key kidney-related causes include:

  1. Kidney Stones

    • Hard mineral deposits (calcium oxalate most common)
    • Sudden, severe “colicky” pain that may radiate to the groin
    • Pain comes in waves, often accompanied by nausea and vomiting
    • Blood in the urine (pink or brown tinge)
  2. Urinary Tract Infection (UTI) and Pyelonephritis

    • Infection begins in the bladder and moves up to the kidney
    • Flank pain often occurs with:
      • Fever and chills
      • Frequent, painful urination
      • Cloudy or foul-smelling urine
  3. Hydronephrosis (Urinary Obstruction)

    • Back-up of urine due to stones, tumors or strictures
    • Dull, aching flank pain that may be intermittent or constant
    • Risk of kidney damage if left untreated
  4. Polycystic Kidney Disease

    • Genetic disorder causing multiple fluid-filled cysts
    • Gradual flank discomfort, often on both sides
    • May notice high blood pressure or blood in urine
  5. Renal Infarction

    • Blockage of blood flow to part of the kidney
    • Sudden, intense flank pain
    • May accompany nausea, fever or high blood pressure

How to Tell If It’s Your Kidneys

Certain clues suggest a kidney origin for flank pain:

  • Location: Deep, just under the ribs and closer to your back than your side.
  • Quality of Pain:
    • Sharp, cramping or colicky (stones)
    • Dull ache (infection or obstruction)
  • Associated Symptoms:
    • Changes in urine (color, smell, frequency)
    • Fever, chills, nausea/vomiting
    • Swelling in legs or around eyes (if kidneys aren’t filtering well)

If you note any of these signs, it’s reasonable to consider a kidney issue.


Diagnosing Flank Pain

  1. Medical History & Physical Exam

    • Questions about pain onset, severity, triggers
    • Checking vital signs (fever, blood pressure)
    • Gentle tapping over the kidney area to elicit pain
  2. Laboratory Tests

    • Urinalysis: looks for blood, bacteria, crystals
    • Blood tests: kidney function (creatinine, BUN), infection markers
  3. Imaging

    • Ultrasound: good for stones, hydronephrosis, cysts
    • CT scan (non-contrast): gold standard for kidney stones
    • MRI in special circumstances
  4. Additional Tests

    • Intravenous pyelogram (rarely used)
    • Nuclear medicine scans for blood flow

Treatment and Management

Treatment depends on the underlying cause:

  • Kidney Stones

    • Small stones often pass on their own with pain medications and increased fluids
    • Medical therapy (alpha-blockers) to relax ureter muscles
    • Procedures (lithotripsy, ureteroscopy) for larger stones
  • Infection (Pyelonephritis)

    • Oral or IV antibiotics
    • Hydration and pain control
    • Follow-up urine tests to confirm clearance
  • Obstruction/Hydronephrosis

    • Relief of blockage (stent placement, catheter)
    • Treat underlying cause (e.g., remove stone, address tumor)
  • Musculoskeletal Pain

    • Rest, heat or ice packs
    • Nonsteroidal anti-inflammatory drugs (NSAIDs)
    • Physical therapy for posture and strengthening

Self-Care and Prevention

  • Hydration: Aim for 2–3 liters of water daily to reduce stone formation.
  • Dietary Changes:
    • Limit salt and animal protein to lower stone risk.
    • Include calcium-rich foods but avoid excess oxalate (e.g., spinach, nuts).
  • Regular Exercise: Strengthens core muscles and supports spine health.
  • Good Posture: Ergonomic workstations and mindful lifting techniques.
  • Monitor Urinary Changes: Promptly note any blood, foul odor or change in frequency.

When to Seek Medical Help

Flank pain can be benign, but certain “red flags” warrant immediate attention:

  • Severe, unrelenting pain not relieved by over-the-counter painkillers
  • High fever (over 101°F/38.3°C), chills or sweating
  • Blood in urine or inability to urinate
  • Vomiting that prevents fluid intake
  • Signs of shock: rapid heartbeat, low blood pressure, dizziness

If you’re unsure about the severity of your symptoms, you might consider doing a free, online symptom check, using the doctor approved Ubie Symptom Checker. This can help you decide whether to seek urgent medical care.


Speak to a Doctor

This overview is designed to inform, not replace professional advice. If you experience serious or persistent flank pain—or any symptoms that concern you—please speak to a doctor promptly. Early evaluation and treatment can prevent complications and ensure the best outcome.

(References)

  • * Chiang CC, Jong YS, Wang WJ. Emphysematous pyelitis. CMAJ. 2010 Apr 20;182(7):698. doi: 10.1503/cmaj.091055. Epub 2010 Mar 15. PMID: 20231336; PMCID: PMC2855919.

  • * Nicholson TM, Lloyd GL, Wu G. Pelvic angiomyolipoma. Urology. 2012 Feb;79(2):e15-6. doi: 10.1016/j.urology.2011.04.019. Epub 2011 Jun 30. PMID: 21722945; PMCID: PMC3760516.

  • * Leung JC. Inherited renal diseases. Curr Pediatr Rev. 2014;10(2):95-100. doi: 10.2174/157339631002140513101755. PMID: 25088262.

  • * Gourley E, Digman G, Nicolas M, Kaushik D. Primary renal angiosarcoma. BMJ Case Rep. 2018 Jul 30;2018. doi: 10.1136/bcr-2017-222672. Epub 2018 Jul 30. PMID: 30061122; PMCID: PMC6069902.

  • * Schoolmeester JK, Erickson LA. Renal Leiomyoma. Mayo Clin Proc. 2019 Sep;94(9):1913-1914. doi: 10.1016/j.mayocp.2019.07.014. PMID: 31486390.

  • * Wu BS, Ho Y, Yang CY. A Nautilus kidney. Clin Exp Nephrol. 2020 Oct;24(10):971-972. doi: 10.1007/s10157-020-01915-7. Epub 2020 Jun 26. PMID: 32592079.

  • * Feit L, John D, Delgado Torres N, Sinert R. Flank pain and hematuria is not always a kidney stone. Am J Emerg Med. 2021 Feb;40:225.e1-225.e2. doi: 10.1016/j.ajem.2020.07.046. Epub 2020 Jul 24. PMID: 32958382.

  • * Franke M, Kneip J, Mückner K. Eine ungewöhnliche Ursache für akute Flankenschmerzen und Mikrohämaturie: Diagnose einer Antopol-Goldman-Läsion als „tumor-like lesion“. Rofo. 2021 Nov;193(11):1332-1335. doi: 10.1055/a-1460-9119. Epub 2021 May 12. PMID: 33979871.

  • * Maharaj D, Mohammed SR, Caesar K, Dindyal S. Nutcracker syndrome: a case-based review. Ann R Coll Surg Engl. 2024 May;106(5):396-400. doi: 10.1308/rcsann.2023.0090. Epub 2023 Dec 1. PMID: 38038139; PMCID: PMC11060856.

  • * Rometti M, Patel D, Bryczkowski C. Xanthogranulomatous Pyelonephritis: Case Report. J Emerg Med. 2024 Apr;66(4):e534-e537. doi: 10.1016/j.jemermed.2023.11.021. Epub 2023 Dec 5. PMID: 38485571.

Thinking about asking ChatGPT?Ask me instead

Tell your friends about us.

We would love to help them too.

smily Shiba-inu looking

For First Time Users

What is Ubie’s Doctor’s Note?

We provide a database of explanations from real doctors on a range of medical topics. Get started by exploring our library of questions and topics you want to learn more about.

Was this page helpful?

Purpose and positioning of servicesUbie Doctor's Note is a service for informational purposes. The provision of information by physicians, medical professionals, etc. is not a medical treatment. If medical treatment is required, please consult your doctor or medical institution. We strive to provide reliable and accurate information, but we do not guarantee the completeness of the content. If you find any errors in the information, please contact us.