Vitamin D is both a nutrient we eat and a hormone our bodies make. It is a fat-soluble vitamin that has long been known to help the body absorb and retain calcium and phosphorus; both are critical for building bone. Also, laboratory studies show that vitamin D can reduce cancer cell growth, help control infections and reduce inflammation. Many of the body’s organs and tissues have receptors for vitamin D, which suggest important roles beyond bone health, and scientists are actively investigating other possible functions.

Few foods naturally contain vitamin D, though some foods are fortified with the vitamin. For most people, the best way to get enough vitamin D is taking a supplement because it is hard to eat enough through food. Vitamin D supplements are available in two forms: vitamin D2 (“ergocalciferol” or pre-vitamin D) and vitamin D3 (“cholecalciferol”). Both are also naturally occurring forms that are  produced in the presence of the sun’s ultraviolet-B (UVB) rays, hence its nickname, “the sunshine vitamin,” but D2 is produced in plants and fungi and D3 in animals, including humans. Vitamin D production in the skin is the primary natural source of vitamin D, but many people have insufficient levels because they live in places where sunlight is limited in winter, or because they have limited sun exposure due to being inside much of the time. Also, people with darker skin tend to have lower blood levels of vitamin D because the pigment (melanin) acts like a shade, reducing production of vitamin D (and also reducing damaging effects of sunlight on skin, including skin cancer).

Read More: https://www.hsph.harvard.edu/nutritionsource/vitamin-d/