The "sunshine vitamin" may come with a dark side. Just as a lack of vitamin D can lead to health dangers, so too can an excess.

For years now, scientists have warned that not everyone needs to take vitamin D supplements, and that, in rare cases, high-dose versions can be toxic, especially for young kids and older adults.

As the supplement grows in popularity, it's more important now than ever that patients and doctors are aware of the dose and the downsides. The risks might be rare, but they're on the rise, and in the worst-case scenarios, they can be life-threatening.

Too much vitamin D raises calcium absorption, which can lead to hypercalcemia, in which calcium forms dangerous deposits in arteries or soft tissues. This can raise the risk of kidney stones, disrupt bone metabolism, and bring on a whole host of nasty symptoms, including nausea, vomiting, constipation, fatigue, muscle weakness, or bone pain.

The vast majority of people recover from vitamin D toxicity after the supplements are discontinued and they receive IV fluids or medication to lower calcium levels. But in rare cases, if left untreated, vitamin D toxicity can lead to kidney failure requiring hemodialysis, or even cause fatal intestinal bleeding.

Some studies even suggest that older folk with high levels of vitamin D in the blood may be more at risk of falls.

In a 2018 review, researchers in the US warned of "considerable complacency" regarding vitamin D's potential for toxic effects. Scientists still can't agree on exactly how much vitamin D is too much.

"Combined with the dramatic expansion in vitamin D interest arising, in part, from popular books extolling the virtues of high‐dose vitamin D, it is perhaps not surprising there has been such an increase in the number of cases of vitamin D toxicity," the 2018 review authors concluded.

Vitamin D is called the sunshine vitamin because it is produced by the body when we are exposed to sunlight. Typically, this route provides roughly 90 percent of the vitamin D an individual requires, and the rest comes from foods containing the vitamin, such as fatty fish or fortified dairy.

Sources of Vitamin D and possible factors affecting its absorption. Diet and lifestyle factors with downward arrows are associated with decreased vitamin D absorption and biosynthesis. (Šimoliūnas et al., Medicina, 2019)

Vitamin D helps the body absorb calcium and maintain immune function, cell growth, metabolism, and neuromuscular activity. A lack of vitamin D for an extended period can raise the risk of neurological conditions, autoimmune conditions, bone disorders, and cardiovascular disease.

But it remains controversial whether vitamin D supplements help. While some studies suggest that these supplements can slow aging, boost cognition, or even ease depressive symptoms, other scientists have cast doubt on their effectiveness.

Plus, these supplements are not without their risks. Much of the time, cases of vitamin D toxicity are due to mistakes in treating vitamin D deficiency.

One notable case involving an 80-year-old man, for instance, found that the patient was accidentally taking a weekly high-dose vitamin D tablet, prescribed by his naturopathic practitioner, each and every day. Thankfully, his hypercalcemia resolved once the mistake was recognized and the supplement was discontinued.

It's not just older folk, though, who need to be careful of their dose. In 2016, the national health authority in Denmark issued a recall for a supplement containing 75 times the recommended level of vitamin D. Roughly 20 children experienced toxic effects because of the capsules.

The same problem is becoming more common in the US, too.

From 2000 to 2014, there were more than 25,000 cases of vitamin D toxicity reported in the US. From 2005 to 2011, these cases increased by 1600 percent, and many involved children or teenagers.

Thankfully, there were no fatalities during this time, but there were five cases with serious medical outcomes.

Subscribe to ScienceAlert's free fact-checked newsletter

"Watch your numbers," warns a recent piece on vitamin D from Harvard Medical School, reviewed by journalist and practicing physician Mallika Marshall.

"If you're taking a vitamin D supplement, you probably don't need more than 15 mcg to 20 mcg (600 IU to 800 IU) per day. Unless your medical team recommends it, avoid taking more than 100 mcg (4,000 IU) per day, which is considered the safe upper limit."

Related: Can Vitamin D Slow Aging? A New Study Says Yes – But There's a Catch

Doctors at Harvard advise that if someone has a vitamin D deficiency, they start with foods fortified with the vitamin, as these are much less likely to cause toxicity.

As always, when starting or ceasing any medication or supplement, it is best to consult a medical professional.