Flank pain (loin pain)
Pain in the side or back between the ribs and the hip, where the kidney sits. The classic causes are a kidney stone (severe, waves of pain) or a kidney infection (with fever), but it can also be muscular — so pain with fever, blood in the urine, or severe colicky waves needs assessment.
What it means
Flank pain is pain felt in the side and back, in the area between the lower ribs and the hip, on one or both sides — the region where the kidneys lie. Because of that location, it often makes people think of the kidney, and two kidney causes are indeed classic. A kidney stone passing down the tube to the bladder causes renal colic: sudden, severe pain that comes in waves, often making the person restless and unable to get comfortable, frequently with nausea and sometimes blood in the urine. A kidney infection (pyelonephritis) causes a more constant flank pain with fever, chills and feeling unwell, often on the back of a bladder infection. But not all flank pain is the kidney: it is very commonly musculoskeletal — from a strained muscle, the spine, or the ribs — which tends to be worse with movement or pressing the area. Less commonly it reflects other abdominal or, rarely, more serious causes. What shapes the response is the pattern and the company it keeps — colicky waves, fever, or blood in the urine point toward a kidney cause needing prompt care.
Common causes
- Kidney stone (renal colic) — sudden, severe pain in waves, restlessness, nausea, often blood in the urine.
- Kidney infection (pyelonephritis) — more constant pain with fever, chills, feeling unwell.
- Musculoskeletal — a strained muscle, the spine or ribs; worse on movement or pressing.
- Urinary tract infection — can cause flank discomfort.
- Shingles — a band of pain before the rash appears.
- Rarely — other abdominal conditions or, uncommonly, more serious causes.
Lab work-up approach
Flank pain is assessed by the pattern and examination, urine tests, and imaging. A urine dipstick checks for blood (common with a stone) and signs of infection, and a urine culture confirms a kidney infection. Blood tests support this: kidney function (creatinine, eGFR), and a white cell count and CRP for infection. A CT scan is the main test to confirm a kidney stone, and an ultrasound may be used, especially in pregnancy. Mediora.AI can surface a kidney-function or infection pattern that fits, but flank pain with severe colicky waves, fever, or blood in the urine needs prompt in-person assessment and imaging, not a blood test alone.
Tests Mediora.AI can interpret
Related conditions
Panels to consider
When to see a doctor
Mild flank pain that is clearly muscular — worse on movement, tender to press, after exertion — often settles with rest and simple pain relief. Seek prompt medical care for severe flank pain coming in waves (a possible kidney stone), especially with nausea or blood in the urine, and for flank pain with fever, chills or feeling unwell (a possible kidney infection needing antibiotics). Seek urgent care if severe pain comes with a high fever and shaking chills, being unable to pass urine, or feeling very unwell, and for a kidney stone with signs of infection, which is an emergency. Any blood in the urine with flank pain should be assessed. Mediora.AI helps flag kidney and infection markers; flank pain with colic, fever or blood in the urine is assessed promptly by your doctor, with imaging.