Metformin is the most widely prescribed diabetes medication in the world, but it isn’t safe for everyone. People with significantly reduced kidney function, severe liver disease, unstable heart failure, or conditions that reduce oxygen delivery to tissues should not take it. Beyond these absolute restrictions, several other groups need careful consideration before starting or continuing the drug.
People With Reduced Kidney Function
Kidney function is the single most important factor in determining whether metformin is safe for you. Your kidneys are responsible for clearing metformin from your body, and when they can’t keep up, the drug accumulates to dangerous levels in the bloodstream. This buildup can trigger a rare but serious condition called lactic acidosis, where acid levels in the blood rise to life-threatening levels.
The key measurement is your eGFR (estimated glomerular filtration rate), a number your doctor calculates from a routine blood test. The thresholds break down like this:
- eGFR 45 or above: Metformin can be used safely at standard doses.
- eGFR 30 to 44: New patients should not start metformin. Those already taking it may continue at a reduced dose of no more than 1,000 mg per day.
- eGFR below 30: Metformin is contraindicated entirely.
Adults over 80 are more likely to have age-related kidney decline that may not show obvious symptoms. If you’re in this age group and have any degree of kidney impairment, metformin is generally not recommended. Even if your kidneys are currently fine, your doctor will likely check your eGFR regularly, since kidney function can change over time, especially during illness.
Severe Liver Disease
The liver plays a central role in clearing lactate from the blood. When liver function is severely impaired, this process slows down, and metformin’s tendency to increase lactate production becomes a real hazard. European and American cardiology guidelines both list severe hepatic impairment as a contraindication for metformin.
Mild liver conditions, including well-managed fatty liver disease, don’t automatically rule out metformin. In fact, some evidence suggests metformin may benefit people with non-alcoholic fatty liver disease. The concern is specifically with advanced liver damage where the organ can no longer do its metabolic job effectively. If you have cirrhosis or significantly elevated liver enzymes, your doctor will weigh the risks carefully.
Unstable Heart Failure
Heart failure creates a nuanced situation. For people with stable, well-controlled heart failure and preserved kidney function, metformin is considered safe and is even recommended as a first-line diabetes treatment by European Society of Cardiology guidelines. The danger arises when heart failure becomes unstable or acute.
When the heart can’t pump effectively, blood flow to the kidneys and other organs drops. This reduced circulation, called hypoperfusion, impairs the body’s ability to clear both metformin and lactate. People who are hospitalized for heart failure, experiencing worsening symptoms, or in cardiogenic shock should not be on metformin. The same applies to anyone in septic shock or any condition where tissues aren’t getting enough oxygen.
Before Certain Medical Procedures
If you’re scheduled for a CT scan or other imaging that uses iodinated contrast dye (the kind injected into a vein), you may need to pause metformin. The concern is that contrast dye can temporarily stress the kidneys, and if kidney function dips while metformin is still in your system, the drug can accumulate.
The rules depend on your kidney function and how much contrast you’ll receive. If your eGFR is below 60, you should stop metformin at the time of contrast administration and wait at least 48 hours before restarting, and only after confirming your kidney function hasn’t changed significantly. If your kidneys are healthy and you’re receiving a small amount of contrast, such as for a brain scan, stopping metformin may not be necessary.
For surgery, the picture is less clear-cut. Professional guidelines actually disagree on this one. Some recommend continuing metformin through the day of surgery, while others suggest withholding it. A randomized trial of 70 patients undergoing non-cardiac surgery found no problems with continuing metformin perioperatively. The bigger concern is any surgery or illness that leads to dehydration, prolonged fasting, or reduced blood flow to the kidneys, all of which impair metformin clearance.
During Acute Illness or Dehydration
Temporary conditions can make metformin unsafe even if you normally tolerate it well. Severe vomiting, diarrhea, high fever, or any illness causing significant dehydration reduces blood flow to the kidneys and can cause metformin to accumulate. Many diabetes educators recommend “sick day rules” for metformin: if you’re too ill to eat or drink normally, or if you’re losing fluids through vomiting or diarrhea, stop taking it until you’ve recovered and are eating and drinking again.
Any situation involving oxygen deprivation is also a reason to stop. This includes heart attacks, severe infections, respiratory failure, and shock. In these scenarios, the body is already producing excess lactate, and adding metformin to the mix increases the risk of lactic acidosis. The overall incidence of metformin-associated lactic acidosis is low, estimated at 1 to 9 cases per 100,000 people, but it carries a high mortality rate when it does occur, especially in the presence of kidney, heart, or liver failure.
Pregnancy and Breastfeeding
Metformin crosses the placenta, which means the developing baby is exposed to the drug. It’s commonly prescribed for gestational diabetes and polycystic ovary syndrome during pregnancy, but insulin remains the preferred first-line treatment for blood sugar control in pregnancy for most guidelines. If you’re pregnant or planning to become pregnant, the decision to use metformin involves balancing its benefits against the less-established long-term safety data compared to insulin.
For breastfeeding, the news is more reassuring. Metformin does pass into breast milk, but at very low levels. Infants receive less than 0.5% of their mother’s weight-adjusted dose. A prospective study following over 60 breastfed infants for six months found no differences in weight, height, motor development, or illness rates compared to formula-fed infants. Metformin is generally considered compatible with breastfeeding, though extra caution is warranted when nursing premature or newborn infants, whose kidneys are still maturing.
People Taking Certain Medications
Some drugs interfere with how your body absorbs and processes metformin. Cimetidine (an older heartburn medication) and verapamil (a blood pressure and heart rhythm drug) both block the transport system that moves metformin through the kidneys, potentially causing it to build up.
Proton pump inhibitors, the widely used acid-reducing drugs like omeprazole, pantoprazole, and lansoprazole, also inhibit this same transport system. Lab studies show these drugs reduce metformin uptake in a dose-dependent manner, with omeprazole and pantoprazole being the most potent inhibitors. If you take a proton pump inhibitor daily alongside metformin, it’s worth discussing with your doctor whether this combination needs monitoring.
People With Severe GI Problems
About 5% of people who start metformin have to stop because of intolerable gastrointestinal side effects: nausea, diarrhea, bloating, and stomach cramps. If you already have a condition like inflammatory bowel disease, chronic diarrhea, or severe gastroparesis, metformin may worsen your symptoms to the point where the drug isn’t practical. Extended-release formulations cause fewer gut problems than immediate-release tablets, so switching forms is often worth trying before giving up entirely.
Long-Term Users and B12 Deficiency
Metformin isn’t necessarily off-limits for long-term use, but it does carry an underappreciated nutritional risk. The drug interferes with vitamin B12 absorption in the gut. One cross-sectional study of patients who had taken metformin for at least a year found that nearly half (48.9%) were deficient in B12. Severe B12 deficiency causes nerve damage, numbness and tingling in the hands and feet, fatigue, and cognitive changes, symptoms that can easily be mistaken for diabetic neuropathy. If you’ve been on metformin for more than a year, periodic B12 testing is a reasonable precaution.

