VitMode

Does Coffee Flush Out Magnesium? Caffeine and Magnesium in the Light of Studies

Coffee does increase the excretion of magnesium in urine — that is true — but the scale is far smaller than popular claims about 'flushing out' suggest. In a study of healthy volunteers, two doses of caffeine produced a net extra loss of 0.16 mmol of magnesium over 24 hours, about 4 mg, a fraction of the daily intake on a controlled diet. The real problem is usually not the coffee but the fact that many adults do not get enough magnesium from food anyway. This article shows what exactly was measured, who may be affected and what to do in practice.

MNMichał NowakOctober 17, 202612 min read
Table of contents

Does coffee flush magnesium out of the body? The short answer

The answer in brief

Caffeine does temporarily increase the excretion of magnesium in urine, but in studies of healthy people the net effect over 24 hours was small — a few milligrams, against a daily requirement counted in hundreds. Coffee does not 'flush out' magnesium in the sense of causing a dramatic deficiency; it can, however, add to other factors if your diet is already low in this mineral.

The claim that 'coffee flushes out magnesium' has circulated online for years, usually bundled with similar ones about calcium and B vitamins. It sounds reasonable: caffeine is mildly diuretic and magnesium leaves the body in urine, so intuitively more urine means less magnesium. Reality is more complex and, importantly, measurable — there are studies in which healthy volunteers' urine was collected after doses of caffeine and analysed for magnesium. Thanks to them we can replace generalities with numbers.

This text answers the three questions that really lie behind searching for this phrase: how much magnesium you lose through coffee, whether it matters on a typical diet, and whether you should change your habits — drink less coffee or supplement magnesium. It is not medical advice for people with kidney disease, heart rhythm disorders, or those taking diuretics or proton pump inhibitors; in such situations the magnesium balance needs individual assessment.

How does caffeine affect magnesium excretion by the kidneys?

Magnesium is freely filtered in the kidney glomeruli and then largely reabsorbed in the tubules, mainly in the thick ascending limb of the loop of Henle. It is this reabsorption that decides how much magnesium finally ends up in urine. Anything that reduces the reabsorption of sodium and water in the kidney therefore tends to increase the excretion of magnesium and calcium as well. Caffeine is an adenosine receptor antagonist, and in the kidney adenosine takes part in regulating blood flow and sodium reabsorption; blocking this signal leads to greater excretion of sodium and water, and with them small amounts of calcium and magnesium.

This description of the mechanism is simplified and partly based on physiological reasoning rather than on measurements in a single person. The effect itself — higher concentrations of magnesium, calcium and sodium in urine after caffeine — is well documented, whereas the exact contribution of individual nephron segments is debated. What matters for the reader is that the mechanism is plausible and consistent with the data, but its size is measured in experiments, not in theory.

Importantly, increased urinary excretion does not automatically mean an equally large drop in the body's stores. The body has built-in compensation mechanisms: it adjusts intestinal absorption and renal reabsorption according to its current magnesium content. So the observation 'more magnesium in urine after coffee' is only the first step; the key question is whether the increase lasts the whole day and translates into a negative balance.

How much magnesium do we actually lose after coffee? A study in volunteers

Effect of caffeine on circadian excretion of urinary calcium and magnesium

Moderate evidence

Kynast-Gales SA, Massey LK · Journal of the American College of Nutrition · 1994

A before-after trial in 17 healthy people (aged 17–41) on a metabolic ward, on a controlled diet containing 11.3 mmol of calcium and 12.7 mmol of magnesium. On the second day participants took two doses of caffeine of 3 mg/kg lean body mass, at 7 and 10 a.m. Urinary calcium and magnesium excretion was significantly elevated for six hours after the second dose (p=0.01 and p=0.04 respectively). Between 4 p.m. and 1 a.m. caffeine had no significant effect, and between 1 and 4 a.m. magnesium excretion was significantly lower than without caffeine (p=0.01), indicating compensatory renal conservation. The night-time conservation did not, however, offset the morning losses: the net 24-hour increase was an additional 0.32 mmol of calcium and 0.16 mmol of magnesium.

View study

Let us translate these numbers into practical terms. An extra 0.16 mmol of magnesium is about 3.9 mg (the molar mass of magnesium is about 24.3 g/mol). The controlled diet in this study contained 12.7 mmol of magnesium a day, about 309 mg; the extra daily loss after caffeine was therefore a little over 1% of that intake. The caffeine dose totalled 6 mg per kilogram of lean body mass — for a person with 60 kg of lean mass that is about 360 mg, i.e. several cups of strong coffee drunk within three hours in the morning. That is a much more intense exposure than a single espresso.

Another study showed a similar direction of effect, in 39 people with calcium kidney stones: after 6 mg/kg lean body mass of caffeine given after a 14-hour fast, urinary excretion of calcium, magnesium, citrate and sodium rose (expressed per creatinine), and the risk index for calcium oxalate stone formation increased moderately. This shows that the effect is reproducible and goes beyond one laboratory, but also that it concerns an acute, one-off dose after fasting. The authors judged that caffeine may slightly increase the risk of stones, not that it leads to magnesium deficiency.

Does coffee dehydrate you? Caffeine's diuretic effect and fluid balance

The idea of 'flushing out' rests on the picture of coffee washing water out of the body, and minerals with it. So it is worth checking how strongly caffeine actually increases urine production. A meta-analysis of 16 studies in healthy adults (median caffeine dose 300 mg) showed a small diuretic effect: on average 109 ± 195 ml more urine, about 16% more than without caffeine. The effect was clearer at rest than during exercise and larger in women than in men; the authors concluded that concerns about unwanted fluid loss after caffeine are unwarranted, especially before exercise.

No evidence of dehydration with moderate daily coffee intake: a counterbalanced cross-over study in a free-living population

Moderate evidence

Killer SC, Blannin AK, Jeukendrup AE · PLoS One · 2014

A randomised crossover study in 50 men who regularly drank coffee (3–6 cups a day). For three consecutive days participants drank 4 × 200 ml of coffee containing a total of 4 mg/kg caffeine, or the same amount of water. There were no differences in total body water (51.5 vs 51.4 kg), 24-hour urine volume (2409 vs 2428 ml) or blood and urine markers of hydration. Urinary sodium excretion was higher in the coffee condition (p=0.02). The authors conclude that moderate coffee intake by caffeine-habituated people provides hydration comparable with water.

View study

An important conclusion for the magnesium topic follows: if with regular, moderate coffee drinking the daily urine volume does not change and the body stays fully hydrated, then the scenario of 'coffee flushes everything out of the body' has no justification. At the same time, the rise in sodium excretion in Killer's study reminds us that caffeine affects ion handling in the kidney even if the overall water balance does not change. It is a consistent picture: a mild, transient effect increasing the excretion of some ions, largely compensated within the day.

Adaptation matters too. People who drink coffee every day develop partial tolerance to caffeine's diuretic action, as widely described in the physiology literature. The greatest effect is therefore seen in people not used to caffeine and after a large single dose; the more regular and moderate the drinking pattern, the smaller the influence on mineral balance.

When might coffee actually contribute to magnesium deficiency?

If caffeine's own effect is small, when can coffee play a role? The answer: when it overlaps with other factors. The first is low magnesium intake from the diet. A review by Rosanoff and colleagues notes that in 2005–2006 nearly half (48%) of the US population consumed less magnesium from food than the required amount. These data concern the USA, not Poland, but the trend is similar in countries with a diet based on refined products: few nuts, seeds, legumes, whole grains and green vegetables. When the margin of safety is narrow, even small additional losses begin to matter.

The second factor is other causes of loss or poorer absorption: diuretics (especially loop and thiazide), long-term proton pump inhibitors, chronic diarrhoea, alcohol misuse, poorly controlled diabetes with polyuria, and heavy sweat loss during intense exercise. In such a situation caffeine is not the cause but one addition to the sum. We cover these issues separately in our articles on diuretics and potassium and magnesium deficiency and on PPIs and magnesium and B12 deficiency.

The third factor is the amount of caffeine. The study we described used doses equivalent to several strong coffees in a short time. A person who drinks one or two cups a day is far from that scenario. But someone who combines coffee with several energy drinks, caffeinated pre-workout products and tea may exceed these amounts in total, and their diet may at the same time be lower in magnesium. In this group it is worth looking at the overall balance, not only at coffee.

Check your profile

Wondering if your diet covers everything you need?

Instead of guessing, check your wider profile. Answer a few questions about your diet, lifestyle, sun exposure, and goals.

Takes about 2 minutesBased on scientific evidence

Recommendations take your answers and the strength of the scientific evidence into account. A supplement's popularity has no bearing on whether it gets recommended.

Will a blood magnesium test detect 'flushing out'?

Many people want to check their magnesium with a blood test after a period of heavy coffee drinking. You should know that serum magnesium reflects only about 1% of the body's total stores; most is in bone and in muscle cells. The body keeps the serum level within a narrow range at the expense of tissues, so a 'normal' result does not rule out intracellular deficiency, and a slightly low result is usually a sign of an already advanced problem. The Rosanoff review points out that for this reason reference values and calculated requirements may give an overly reassuring impression.

Practical conclusion: do not try to 'prove' or 'refute' the effect of coffee with a single blood measurement. Far more informative is an analysis of the diet (do you regularly eat magnesium-rich foods) and symptoms, combined with an assessment of risk factors. If you suspect a deficiency, discuss it with a doctor and tailor the diagnostics instead of choosing supplement doses yourself.

Typical symptoms that prompt a magnesium check include recurrent muscle cramps, eyelid twitching, fatigue, palpitations and trouble sleeping. None of them is specific — the same complaints are caused by iron deficiency, thyroid disorders, dehydration or lack of sleep, and sometimes by too much caffeine itself. So the honest answer to 'is it because of coffee?' is usually: coffee may be part of the picture, but is rarely the only cause.

What to do in practice: coffee, diet and supplementation

Practical takeaways for coffee drinkers

  • If you drink 1–3 cups of coffee a day and your diet includes nuts, seeds, groats, legumes and green vegetables, you have no reason to cut coffee 'for magnesium'
  • Take care of magnesium intake from food: a handful of nuts or pumpkin seeds, a portion of buckwheat or oats, legumes and dark green vegetables easily add tens to over a hundred milligrams a day
  • If you combine coffee with energy drinks, pre-workout products and strong tea, add up your total caffeine — doses of several hundred milligrams in a short time are the scenario in which the losses matter more
  • With diuretics, long-term PPI use, chronic diarrhoea, diabetes or alcohol misuse, ask your doctor to assess the risk of magnesium deficiency instead of relying on changing your coffee habits alone
  • If you supplement magnesium, there is no firm evidence that coffee significantly weakens its absorption, but for good order it is worth separating them by an hour or two, especially with large caffeine doses; this is common sense, not a proven rule
  • Do not draw conclusions from a single serum magnesium result — it reflects a small part of the body's stores

Myth or fact: 'Every coffee flushes out magnesium, so I must supplement it'

Myth

Every cup of coffee flushes magnesium out of the body, so people who drink coffee surely have a deficiency and must supplement magnesium.

Fact

Caffeine temporarily increases magnesium excretion in urine, but in a study of healthy volunteers the net extra loss over 24 hours was only about 0.16 mmol (about 4 mg), partly offset by the kidneys conserving it at night. On a typical diet this is a small quantity. Magnesium deficiency more often results from a poor diet, medicines and diseases than from coffee alone, and the decision to supplement should rest on an assessment of diet and risk, not merely on drinking coffee.

It is worth adding that coffee is not mineral-free — it contains small amounts of magnesium, though that is a marginal source compared with nuts or groats, so it should not be treated as a supply that offsets losses. What matters more is the overall view: diet, hydration, sleep and stress load affect how you feel more than a single drink.

When to see a doctor, and the limits of these data

What these studies do not prove and when to seek help

The studies described were short, covered small groups of healthy people and measured urinary excretion, not the real magnesium status of tissues after months or years of coffee drinking. They do not tell us how coffee affects magnesium balance in people with kidney disease, those taking diuretics, pregnant women or older adults. See a doctor if you have persistent muscle cramps, tremors, palpitations or rhythm disturbances, confusion, seizures, marked weakness, persistent diarrhoea or vomiting, or if you take medicines that affect electrolyte balance. Low magnesium should not be treated on your own with large supplement doses without assessing kidney function.

QuestionAnswerLevel of evidence
Does caffeine increase urinary magnesium excretion?Yes, temporarily, for about 6 hours after a doseModerate (before-after trial, 17 people)
How large is the net daily loss?About 0.16 mmol (around 4 mg) after 2 doses of 3 mg/kgModerate (one metabolic-ward study)
Does coffee dehydrate?The diuretic effect is small (about +109 ml urine) and not visible with regular drinkingModerate/strong (meta-analysis of 16 studies, crossover RCT)
Who is most exposed?People with low Mg intake, on diuretics or PPIs, with diarrhoea, drinking very large amounts of caffeineIndirect (physiological reasoning)
Will a blood Mg test detect 'flushing out'?Not necessarily — serum is about 1% of storesIndirect (review)
Do you have to give up coffee?Usually not; a magnesium-rich diet matters moreIndirect

Caffeine and magnesium at a glance

Our editorial recommendation

The myth of coffee 'flushing out' magnesium has a grain of truth, but a very small grain. Caffeine does change ion handling in the kidney, yet in controlled studies the difference in the daily balance was on the order of a few milligrams of magnesium, and the body largely compensates for it. Spending energy on giving up coffee 'for magnesium' is usually a worse investment than improving the quality of your food.

If you feel you may be short of magnesium, start with an assessment of diet and risk factors and only then consider supplementation, preferably after a consultation. For most healthy adults coffee remains a safe drink in moderate amounts. If you drink a great deal of it or notice symptoms that could point to electrolyte disturbances, that is a signal to talk to a doctor, not to experiment on your own.

It is not coffee that decides your magnesium but what is on your plate. A cup of espresso takes a few milligrams; a handful of nuts and a portion of groats can give back many times more.

Michał Nowak, VitMode editorial team

Frequently asked questions

Caffeine temporarily increases the excretion of magnesium in urine, but the scale is small. In the study by Kynast-Gales and Massey, two doses of 3 mg/kg lean body mass gave a net extra loss of about 0.16 mmol (about 4 mg) of magnesium over 24 hours, on a diet containing about 309 mg. That is not 'flushing out' in the sense of a dramatic deficiency.

There is no established threshold below which the effect disappears. Studies show the effect on urine is transient (about 6 hours) and partly compensated at night. With 1–3 cups a day and a magnesium-rich diet it is hard to expect a significant loss; caution is wise with very large amounts of caffeine from several sources at once.

Caffeine has a weak diuretic action: a meta-analysis of 16 studies showed on average about 109 ml more urine (around 16%), with a smaller effect during exercise. In a study of 50 men who regularly drank coffee, moderate amounts of coffee did not change daily urine volume or hydration compared with water, although sodium excretion increased.

Not automatically. The decision should depend on your diet (do you eat nuts, seeds, groats, legumes, green vegetables), symptoms and risk factors such as diuretics or PPIs. If you are thinking of a supplement, discuss it with a doctor, especially with kidney disease, because excess magnesium is excreted mainly by the kidneys.

We found no firm evidence that coffee significantly weakens absorption of magnesium from a supplement. Out of caution many people separate them by an hour or two, but this is a practical habit, not a proven rule. Choosing a form of magnesium that your digestive system tolerates well is often more important than timing.

Not necessarily. Serum magnesium reflects only about 1% of the body's stores, and the body maintains its blood concentration at the expense of tissues. A normal result does not rule out intracellular deficiency, and a single result cannot assess the effect of coffee. It is worth asking a doctor to interpret it.

The mechanism concerns caffeine, so any caffeinated drink may have a similar, transient effect on urinary excretion; the total caffeine dose is what counts. The studies described in the article used caffeine given as such, not specific drinks, so we cannot compare the strength of effect of tea, coffee and energy drinks.

Sources

MN

Michał Nowak

MSc in Clinical Dietetics, certified sports-nutrition coach

Michał started out as a long-distance runner, before an injury forced him to rethink his career. Looking for a faster way back into shape, he discovered sports nutrition and never left — fascinated by the gap between the research and what "everyone knows" at the gym. He completed a degree in clinical dietetics, earned a sports-nutrition coaching certification, and ran his own practice for several years before joining VitMode. His writing keeps returning to one theme: a supplement won't replace the basics, but the right one, at the right time, makes a real difference — and that's the difference he tries to describe precisely, with citations instead of slogans. He still runs, though these days, as he puts it, purely for the fun of it.

Related articles

Czerwona filiżanka kawy na drewnianym spodku, na drewnianym stole

Coffee and Longevity: What Do Large Cohort Studies Show?

Coffee has a reputation as either "something that raises your heart rate and dehydrates you" or one of the few everyday pleasures that actually extends life — depending on who you ask. Large, multi-year cohort studies covering hundreds of thousands of participants give a much clearer answer to this question than the popular, contradictory opinions suggest.

12 min

August 24, 2026

Ciepła filiżanka kawy na drewnianym tarasie podczas wieczornej pory

Caffeine and Sleep: When Should You Actually Stop Drinking Coffee?

"No coffee after 3pm" sounds like a sensible rule — but a study published in the Journal of Clinical Sleep Medicine suggests even that cutoff may be too lenient. 400mg of caffeine (roughly the equivalent of 3-4 cups of coffee) disturbed sleep to a statistically significant degree regardless of whether it was given right at bedtime, 3 hours before, or a full 6 hours before bed — despite caffeine's roughly 5-hour half-life.

10 min

August 23, 2026

A white coffee mug surrounded by aromatic coffee beans, perfect for a cozy ambiance.

Caffeine and Insulin Sensitivity: The Short-Term Effect on Blood Sugar

One of the more surprising paradoxes in nutrition science: regular coffee drinking is linked in population studies to lower type 2 diabetes risk, while a single dose of caffeine taken before a meal acutely raises post-meal blood glucose and lowers insulin sensitivity. Both observations are true — and they aren't contradictory once you understand the difference between caffeine's acute effect alone and the long-term, complex effect of coffee as a whole beverage.

12 min

October 3, 2026

Trzy brązowe butelki z tabletkami magnezu na jasnoróżowym tle

Which Magnesium Should You Choose? Glycinate, Citrate or Lactate — Comparing the Forms

The supplement shelf can be overwhelming: glycinate, citrate, lactate, oxide, chelate... We compare the most popular forms of magnesium for absorption, price, and what each one is actually best suited for.

10 min

August 18, 2026

Related knowledge base entries

Comments (2)

  • KW

    Kasia W. 2 weeks ago

    Very clearly explained, especially the interactions section — I hadn't seen it laid out this well anywhere else.

  • MT

    Marek T. a month ago

    Are you planning to update this with the newest study from this year? I saw an interesting meta-analysis.