How Kidney Stones Form (and How to Prevent Them)
A kidney stone is chemistry gone wrong. Minerals that normally stay dissolved in your urine — mostly calcium and oxalate — crowd together when the urine gets too concentrated, cross the saturation line, and lock into crystals. The crystals grow and clump into a solid over weeks to months. Watch the urine concentrate, the crystals appear, a stone build on the floor of the kidney — and then drop into the narrow ureter, where a silent stone suddenly becomes the worst pain of someone’s life.
Try this: start on Concentrated and watch a stone grow, then hit Cut dietary calcium and notice supersaturation climb higher, not lower — the calcium myth in one click. Then press Prevention and watch water and citrate dissolve it back.
Live urine chemistry
1.028
2.2×
250 mg/day
0.0 mm
0 / 10
What’s happening
Real clinical anchors: specific gravity 1.005–1.030, urine citrate <320 mg/day is low, calcium-oxalate is ~80% of stones, and the <5 mm / >7 mm passing thresholds. The single “relative supersaturation” number and the crowding animation are an illustrative model of a real principle, not a measured value from any one person.
The Science in Plain Language
Supersaturation: the whole game in one idea
Urine is not pure water — it is a concentrated soup of waste minerals your kidneys pulled out of the blood. A glass of water can only dissolve so much sugar; past that point, sugar sits on the bottom. Urine works the same way. As long as the minerals stay dissolved, there is no stone. The trouble starts when urine holds more of a mineral than it can keep dissolved — a state called supersaturation. That happens two ways: too little water (concentrated urine) or too much of the mineral. On the diagram, watch the dashed saturation line: when the crowded ions rise above it, crystals appear. A quick real-world proxy is urine specific gravity — roughly 1.005 when you are well-hydrated and 1.030 when you are parched. The lower that number, the safer your urine.
From a speck to a stone: nucleation, growth, aggregation
A stone does not appear all at once. First a handful of ions lock together into a microscopic seed — nucleation. That seed then adds layers (growth) and bumps into other crystals that stick to it (aggregation). This is slow: a clinically meaningful stone usually builds over weeks to months, often anchored to a tiny calcium-phosphate patch on the kidney’s inner lining called a Randall’s plaque. That slowness is good news — it means the chemistry that builds a stone is the same chemistry you can reverse with steady habits, long before it ever hurts.
Four types, four stories
Not all stones are the same, and the type decides the fix. Calcium oxalate is by far the commonest — about 80% — driven by low fluid, a high-oxalate diet and low urine citrate. Uric acid stones (roughly 5–10%) form when urine is too acidic and urate is high; this is the gout connection, and these stones can sometimes be dissolved simply by making the urine less acidic. Struvite stones are infection stones: certain bacteria split urea and drive the urine alkaline, letting these stones balloon into huge branched staghorn casts that fill the whole collecting system. Cystine stones are rare and inherited — a defect that leaks the amino acid cystine into the urine, where it does not dissolve well. Same organ, four completely different mechanisms.
Your built-in defence: citrate and water
Your body is not helpless. The star protector is citrate, a small molecule that grabs onto calcium and holds it in solution, so that calcium is no longer free to pair up with oxalate. Citrate also directly coats budding crystals and stops them growing. A urine citrate below about 320 mg/day (hypocitraturia) is a genuine stone risk, which is why doctors sometimes prescribe potassium citrate. The other, simpler defence is sheer volume: the more water flowing through, the more dilute everything is, and the less time any crystal has to settle and grow. On the diagram, raising citrate (green) or water pulls supersaturation back below 1.0 and the crystals melt away.
The calcium paradox — the myth worth un-learning
Here is the counter-intuitive part that trips up almost everyone. If your stone is made of calcium, it feels obvious to cut calcium from your diet. Do the opposite — that backfires. Dietary calcium’s most useful job for a stone-former happens in the gut: calcium binds oxalate in your intestine so the oxalate leaves in the stool instead of being absorbed into the blood and dumped into the urine. Starve the gut of calcium and more oxalate gets absorbed, urine oxalate rises, and calcium-oxalate stones get worse. In a landmark trial, men who ate a normal-calcium (but low-salt, low-animal-protein) diet had fewer recurrences than those on a low-calcium diet. Press Cut dietary calcium on the animation and watch supersaturation climb the wrong way. Get calcium mainly from food, and take it with meals so it meets the oxalate.
Why a silent stone suddenly becomes agony
A small stone sitting inside the kidney often causes nothing at all — people carry them for years unaware. The pain, called renal colic, comes at one specific moment: when a stone drops out of the roomy kidney into the pencil-thin ureter and jams. Urine backs up, the ureter stretches and spasms, and the result is waves of severe pain in the flank that radiate down toward the groin — often with visible or microscopic blood in the urine (haematuria) as the stone scrapes the lining. It is frequently described as worse than childbirth. Fever with that pain is an emergency: it can mean an infected, blocked kidney, which needs urgent drainage.
Passing it vs. treating it
Size largely decides the plan. Stones under about 5 mm usually pass on their own with time, fluids and pain control; a drug called tamsulosin (an alpha-blocker) can relax the lower ureter and help a suitable stone slip through — so-called medical expulsive therapy. Stones bigger than roughly 7–10 mm, or ones that stall, usually need a procedure: shock-wave lithotripsy (SWL) focuses sound waves through the skin to shatter the stone into passable gravel, or a surgeon passes a thin scope up to grab or laser it (ureteroscopy). Large staghorn stones may need keyhole surgery through the back. None of these fix the chemistry — that is what prevention is for.
Prevention that actually works
The best part: prevention maps straight onto the mechanism, and it is powerful. Drink enough — aim to make roughly 2.5 litres of urine a day, pale and dilute. This single step is the most effective thing most people can do. Keep dietary calcium normal (about 1,000 mg/day, from food, with meals) — do not cut it. Go easy on salt: high sodium makes the kidney spill more calcium into the urine. Ease off very high-oxalate foods if you are a calcium-oxalate former (spinach, rhubarb, almonds, beets) — and pair them with a calcium food. And add citrate: a squeeze of lemon or lime in your water is a cheap, natural citrate boost. If you have had a stone, ask about a 24-hour urine test — it shows exactly which of these levers is yours to pull.
What a 24-hour urine test actually measures
If you have had a stone, the single most useful test is not another scan — it is a 24-hour urine collection. You pee into a jug for a full day, and the lab measures the exact levers this animation models: total urine volume (are you drinking enough?), calcium, oxalate and uric acid (how much stone-forming material is there?), citrate (how strong is your defence?), sodium (a proxy for salt intake, which drives calcium into the urine) and pH (acidic urine favours uric acid stones; persistently alkaline urine hints at infection or struvite). Instead of guessing, the profile shows precisely which knob is yours — low volume, high oxalate, low citrate — and prevention is then aimed, not generic. It is also worth having a passed or removed stone chemically analysed, because the composition decides the strategy.
The plate: what raises and what lowers your risk
Because prevention is mostly chemistry you eat and drink, it helps to see it as a plate. Things that raise calcium-oxalate risk: not drinking enough; a very salty diet (salt drags calcium into the urine); a lot of animal protein (it acidifies urine and lowers protective citrate); large sugary drinks, especially those sweetened with fructose; and heavy loads of very high-oxalate foods — spinach, rhubarb, beets, almonds, and for some people a great deal of black tea. Things that lower risk: water above all, all day; citrus — a squeeze of lemon or lime, or lemonade, adds natural citrate; normal-calcium foods eaten with meals (dairy or fortified alternatives) so the calcium can trap oxalate in the gut; and plenty of fruit and vegetables, which tend to raise citrate and make urine less acidic. You do not have to eat a joyless diet — you have to keep the urine dilute and pair oxalate foods with a calcium food. For uric acid stones the emphasis shifts to less red meat and shellfish and making the urine less acidic, and any of this is best tuned to your own 24-hour urine result.
Who gets stones — and why they come back
Kidney stones are common: roughly 1 in 11 people will have one in their lifetime, and the rate has been rising, partly with diet and body weight. They are more frequent in men, though the gap has been narrowing. The sting in the tail is recurrence: without prevention, something like half of people who form one stone will form another within about 5 to 10 years. That statistic sounds discouraging, but it is really an argument for the levers on this page, because recurrence is highly preventable. The people who make the mechanical changes — more fluid, normal calcium, less salt, sensible oxalate, added citrate, and treatment of any underlying condition such as gout or a metabolic problem — cut their recurrence dramatically. A stone is a warning shot, not a life sentence.
When to seek urgent care. Most stone pain, though brutal, is not immediately dangerous and can be managed while a small stone passes. But some situations are emergencies: fever or chills with the pain (a blocked, infected kidney can become life-threatening within hours and needs urgent drainage), being unable to keep fluids down because of vomiting, pain that is uncontrollable at home, heavy visible blood in the urine, or having only one working kidney that may be blocked. If any of those apply, this is a hospital problem, not a home-remedy one — the animation explains the mechanism, but it is not a substitute for being seen when there are red flags.