Flank pain
Flank pain is pain in the side of your body or upper back, between the bottom of your ribs and the top of your hip.
Clinician view: includes diagnostic criteria, management and safety detail.

Overview
Flank pain is pain you feel in your side or the side of your upper back, in the area between the bottom of your ribs and the top of your hip bone. It can be on the left, the right or both sides. Doctors use the medical term flank pain for this, and many people call it "kidney pain" because the kidneys sit deep in this area, close to the back muscles.
Flank pain is a symptom, not a disease. It tells you that something in this part of the body is irritated, injured or inflamed. Common causes include a strained back muscle, a kidney stone or a kidney infection. Less often, it comes from a problem with the spine, the skin and nerves (such as shingles), the bowel, or a major blood vessel.
Most flank pain is not dangerous and settles with time or simple treatment. But some causes need quick medical care, so it helps to know which warning signs to watch for.
What it can feel like
Flank pain can feel very different depending on its cause:
- Dull and achy: a steady ache that may get worse when you move, bend or twist. This is common with muscle strain.
- Sharp and wave-like: intense pain that comes and goes in waves and may spread (radiate) to your lower belly, groin or genitals. This is typical of a kidney stone moving through the tube that drains urine from the kidney (the ureter). This pattern is called renal colic.
- Deep and constant, with fever: a steady pain on one side along with fever, chills and feeling unwell. This can be a kidney infection.
- Burning or tingling: pain in a band on one side that may come before a rash. This can be shingles.
Other symptoms that may come with it
- Pain or burning when you pee, or needing to pee often
- Blood in your urine (pink, red or brown pee)
- Cloudy or bad-smelling urine
- Fever, chills or shaking
- Nausea or vomiting
- Stiffness or pain when you move your back
- A skin rash or blisters on one side
Causes
Kidney and urinary causes
- Kidney stones: hard deposits that form in the kidney. When a stone moves into the ureter, it can block urine and cause severe, wave-like pain.
- Kidney infection (pyelonephritis): usually a bladder infection that has spread up to the kidney. It often causes fever and needs antibiotics.
- Blockage of urine flow: urine backing up and swelling the kidney (called hydronephrosis), for example from a stone, an enlarged prostate or, rarely, a growth.
- Less common kidney problems: cysts, a blood clot in a kidney blood vessel, or a kidney tumour.
Muscle, bone and nerve causes
- Strained or sprained back muscles, often after lifting, sport or awkward movement
- Problems with the spine, such as arthritis or a pinched nerve
- Injury, such as a fall or a blow to the side, which can bruise muscles, break a rib or, rarely, injure the kidney
- Shingles, a viral infection of a nerve that causes pain and then a rash
Other causes
- Bowel or digestive problems, such as constipation, diverticulitis or appendicitis (which can sometimes cause pain in the right side or back)
- Gallbladder or pancreas problems, which can cause pain that spreads to the back
- Lung problems, such as pneumonia or a blood clot in the lung, which can cause pain at the lower ribs
- Pregnancy-related problems, including an ectopic pregnancy (a pregnancy outside the womb)
- An abdominal aortic aneurysm, a bulge in the body's main blood vessel. This is rare but serious, especially if it leaks or bursts.
Risk factors
You may be more likely to have some causes of flank pain if you:
- Do not drink enough fluids, live in a hot climate or sweat a lot (kidney stones)
- Have had kidney stones before, or they run in your family
- Have diabetes, are pregnant, or have a urinary catheter (kidney infections)
- Have a condition that affects how your bladder empties, or an enlarged prostate
- Do heavy lifting or physical work, or have weak core muscles (muscle strain)
- Are older, smoke, or have high blood pressure (aortic aneurysm)
Diagnosis
Your doctor or nurse will ask where the pain is, when it started, what it feels like, and what makes it better or worse. They will ask about urinary symptoms, fever, injuries and any past kidney problems. They will examine your belly and back, and may gently tap over the kidneys to check for tenderness.
Common tests
- Urine test: checks for blood, signs of infection or crystals. A urine culture can find which germ is causing an infection.
- Blood tests: check for infection and show how well your kidneys are working.
- Pregnancy test: for anyone who could be pregnant.
- Imaging: a CT scan (a detailed X-ray) is the most accurate test for kidney stones. An ultrasound uses sound waves and no radiation, so it is often used in pregnancy, in children and to check for swelling of the kidney.
If your pain is clearly from a strained muscle and you have no warning signs, you may not need any tests.
Treatment
Treatment depends on the cause.
Pain relief
Anti-inflammatory medicines (NSAIDs) such as ibuprofen, naproxen or, in hospital, ketorolac reduce pain and swelling. They work well for kidney stone pain and muscle strain. Acetaminophen (also called paracetamol) is another option, especially if you cannot take NSAIDs. NSAIDs are not suitable for everyone, such as people with kidney disease, stomach ulcers or some heart conditions, or during pregnancy (especially from about 20 weeks), so check with a pharmacist or doctor first. Stronger pain medicines are sometimes used for a short time.
Kidney stones
Many small stones pass on their own over days to weeks. Your doctor may suggest tamsulosin, a medicine that relaxes the ureter and can help some stones pass. Larger stones, or stones causing a blockage or infection, may need a procedure. Options include shock-wave treatment to break up the stone, or a thin telescope passed up through the urethra to remove it.
Kidney infection
Kidney infections are treated with antibiotics. Many people can take tablets at home, but some need antibiotics through a drip in hospital. Always finish the course your clinician prescribes.
Muscle strain and other causes
Muscle pain usually improves with gentle activity, heat and pain relief. Shingles is treated with antiviral medicines such as valacyclovir, which work best when started early. Other causes are treated by addressing the underlying problem.
Self-care at home
Once a doctor has checked you, or if your pain is mild and clearly from a muscle, these steps can help:
- Stay gently active. Short walks are better than bed rest for muscle and back pain.
- Use heat. A warm pack or warm shower can ease muscle tension and may also help with stone pain.
- Drink enough fluids, unless your doctor has told you to limit them. Pale yellow urine is a good sign you are drinking enough.
- Strain your urine if your doctor asks, so a passed stone can be tested.
- Take pain medicines as directed on the package or by your clinician.
- Watch for changes. New fever, vomiting or worsening pain means you should be seen again.
Complications
Most causes of flank pain clear up without lasting problems. Possible complications depend on the cause:
- A blocked kidney combined with infection can quickly become serious and can lead to sepsis, a life-threatening reaction to infection.
- Repeated or untreated kidney infections or blockages can damage the kidney over time.
- Kidney stones often come back if the cause is not addressed.
- Shingles can leave lasting nerve pain in some people, especially older adults.
- A burst aortic aneurysm is a medical emergency.
Outlook
The outlook for flank pain is usually good. Muscle strains often improve within a few days to a few weeks. Most kidney stones pass or can be treated, and most kidney infections clear with antibiotics. If your pain keeps coming back or does not go away, your doctor can look for a less common cause.
Prevention
Not all flank pain can be prevented, but you can lower your risk of common causes:
- Drink plenty of water through the day, especially in hot weather or when exercising.
- Limit salt and very large amounts of animal protein, which can raise the risk of some stones. Your doctor may suggest a specific diet if you have had stones.
- Do not hold your urine for long periods, and see a doctor promptly for bladder infection symptoms.
- Lift with your legs, keep loads close to your body, and build core strength.
- Ask about the shingles vaccine if you are an older adult or have a weakened immune system.
- Do not smoke, and keep blood pressure under control.
In the United States
In the US, the recombinant shingles vaccine is recommended by the CDC for adults 50 and older and for adults 19 and older with weakened immune systems. Rectal diclofenac is not commonly available, so intravenous or intramuscular ketorolac is often used for kidney stone pain in emergency departments.
Assessment
Flank pain (between the 12th rib and iliac crest) is most often musculoskeletal or renal. Key differentials: ureteric colic, acute pyelonephritis, obstructive uropathy, musculoskeletal strain, herpes zoster (pre-eruptive), renal infarction or renal vein thrombosis, and non-renal mimics including appendicitis, cholecystitis, pancreatitis, diverticulitis, basal pneumonia, pulmonary embolism, ectopic pregnancy and abdominal aortic aneurysm (AAA). Consider AAA in any patient over 50, particularly men and smokers, presenting with presumed first-episode renal colic.
History: onset, colicky versus constant pain, radiation to groin, LUTS, fever, haematuria, prior stones, trauma, pregnancy status. Examination: vital signs, costovertebral angle tenderness, abdominal and pulsatile mass examination, skin inspection, spinal examination.
Investigations
- Urinalysis and culture; urine pregnancy test where relevant.
- Bloods: FBC, creatinine and electrolytes, CRP; calcium and urate in stone formers; lactate and blood cultures if septic.
- Imaging for suspected stone: low-dose non-contrast CT KUB is the reference standard (NICE NG118 recommends within 24 hours of presentation in adults). Point-of-care or formal ultrasound is first line in pregnancy and children and reasonable to detect hydronephrosis in selected adults. Haematuria is absent in a minority of stones.
- Contrast CT or CT angiography if vascular causes or renal infarction are suspected.
Management
- Analgesia for renal colic: NSAIDs first line (e.g. IV or IM ketorolac, oral or rectal diclofenac where available) if no contraindication; IV acetaminophen (paracetamol) if NSAIDs unsuitable; opioids as rescue.
- Medical expulsive therapy with an alpha-blocker (tamsulosin) for distal ureteric stones up to 10 mm (AUA/EAU; NICE NG118 for distal stones under 10 mm).
- Urgent decompression (ureteric stent or percutaneous nephrostomy) for an obstructed infected kidney, obstructed solitary or transplant kidney, bilateral obstruction, AKI, or intractable pain. An obstructed infected system is a urological emergency.
- Pyelonephritis: antibiotics guided by local resistance and culture; admit if septic, vomiting, pregnant, or failing oral therapy. Image if no response within 48 to 72 hours or if obstruction is suspected.
- Musculoskeletal pain: reassurance, activity, heat and NSAIDs; avoid routine imaging without red flags.
- Herpes zoster: antivirals ideally within 72 hours of rash onset.
Red flags and follow-up
Red flags: fever with suspected obstruction, haemodynamic instability, anuria or rising creatinine, solitary kidney, pregnancy, age over 50 with no prior stone history (exclude AAA), and trauma. After a first stone, offer stone analysis and advise fluid intake to achieve over 2.5 L of urine daily; metabolic evaluation for recurrent or high-risk formers. Persistent unexplained haematuria warrants urological evaluation.
When to get medical help
See a doctor or nurse soon (within a day or two) if:
- Your pain lasts more than a few days or keeps coming back
- You have pain or burning when you pee, or need to pee often
- You see blood in your urine
- You have a rash or blisters on one side of your body
- You have had kidney stones before and the pain feels the same
Go to the emergency department or call emergency services right away if:
- You have flank pain with fever, chills or shaking
- The pain is severe and you cannot get comfortable, or pain medicine does not help
- You are vomiting and cannot keep fluids down
- You are passing very little or no urine
- You feel faint, dizzy, confused or very unwell
- You are pregnant, or could be pregnant, and have flank or belly pain
- You are over 50, especially if you smoke, and have sudden severe pain in your back, side or belly
- The pain started after an injury, such as a fall, car crash or blow to the side
- You have only one working kidney, a kidney transplant, or a weakened immune system
In an emergency, call 911.
References
- U.S. National Library of Medicine. MeSH: Flank Pain. meshb.nlm.nih.gov
- NICE: Renal and ureteric stones: assessment and management (NG118). nice.org.uk/guidance/ng118
- NIDDK: Kidney stones. niddk.nih.gov/health-information/urologic-diseases/kidney-stones
- NIDDK: Kidney infection (pyelonephritis). niddk.nih.gov/health-information/urologic-diseases/kidney-infection-pyelonephritis
- MedlinePlus: Kidney stones. medlineplus.gov/kidneystones.html
- NHS: Kidney stones. nhs.uk/conditions/kidney-stones/