«Vitamin D is a group of fat-soluble secosteroids responsible for increasing intestinal absorption of calcium, magnesium, and phosphate, and multiple other biological effects. In humans, the most important compounds in this group are vitamin D3 (also known as cholecalciferol) and vitamin D2 (ergocalciferol).
 Cholecalciferol and ergocalciferol can be ingested from the diet and from supplements. Only a few foods contain vitamin D. The major natural source of the vitamin is synthesis of cholecalciferol in the skin from cholesterol through a chemical reaction that is dependent on sun exposure (specifically UVB radiation). Dietary recommendations typically assume that all of a person's vitamin D is taken by mouth, as sun exposure in the population is variable and recommendations about the amount of sun exposure that is safe are uncertain in view of the skin cancer risk.
Vitamin D from the diet or skin synthesis is biologically inactive; enzymatic conversion (hydroxylation) in the liver and kidney is required for activation. As vitamin D can be synthesized in adequate amounts by most mammals exposed to sufficient sunlight, it is not an essential dietary factor, and so not technically a vitamin. Instead it could be considered a hormone, with activation of the vitamin D pro-hormone resulting in the active form, calcitriol, which then produces effects via a nuclear receptor in multiple locations. Cholecalciferol is converted in the liver to calcifediol (25-hydroxycholecalciferol); ergocalciferol is converted to 25-hydroxyergocalciferol. These two vitamin D metabolites (called 25-hydroxyvitamin D or 25(OH)D) are measured in serum to determine a person's vitamin D status. Calcifediol is further hydroxylated by the kidney to form calcitriol (also known as 1,25-dihydroxycholecalciferol), the biologically active form of vitamin D. Calcitriol circulates as a hormone in the blood, having a major role regulating the concentration of calcium and phosphate, and promoting the healthy growth and remodeling of bone. Calcitriol also has other effects, including some on cell growth, neuromuscular and immune function, and reduction of inflammation.
Vitamin D has a significant role in calcium homeostasis and metabolism. Its discovery was due to effort to find the dietary substance lacking in children with rickets (the childhood form of osteomalacia). Vitamin D supplements are given to treat or to prevent osteomalacia and rickets, but the evidence for other health effects of vitamin D supplementation in the general population is inconsistent. The effect of vitamin D supplementation on mortality is not clear, with one meta-analysis finding a small decrease in mortality in elderly people, and another concluding no clear justification exists for recommending supplementation for preventing many diseases, and that further research of similar design is unneeded in these areas.
Several forms (vitamers) of vitamin D exist. The two major forms are vitamin D2 or ergocalciferol, and vitamin D3 or cholecalciferol; vitamin D without a subscript refers to either D2 or D3 or both. These are known collectively as calciferol. Vitamin D2 was chemically characterized in 1931. In 1935, the chemical structure of vitamin D3 was established and proven to result from the ultraviolet irradiation of 7-dehydrocholesterol.
Chemically, the various forms of vitamin D are secosteroids, i.e., steroids in which one of the bonds in the steroid rings is broken. The structural difference between vitamin D2 and vitamin D3 is the side chain of D2 contains a double bond between carbons 22 and 23, and a methyl group on carbon 24.
The active vitamin D metabolite calcitriol mediates its biological effects by binding to the vitamin D receptor (VDR), which is principally located in the nuclei of target cell. The binding of calcitriol to the VDR allows the VDR to act as a transcription factor that modulates the gene expression of transport proteins (such as TRPV6 and calbindin), which are involved in calcium absorption in the intestine. The vitamin D receptor belongs to the nuclear receptor superfamily of steroid/thyroid hormone receptors, and VDRs are expressed by cell in most organs, including the brain, heart, skin, gonads, prostate, and breast.
VDR activation in the intestine, bone, kidney, and parathyroid gland cell lead to the maintenance of calcium and phosphorus levels in the blood (with the assistance of parathyroid hormone and calcitonin) and to the maintenance of bone content.
One of the most important roles of vitamin D is to maintain skeletal calcium balance by promoting calcium absorption in the intestines, promoting bone resorption by increasing osteoclast number, maintaining calcium and phosphate levels for bone formation, and allowing proper functioning of parathyroid hormone to maintain serum calcium levels. Vitamin D deficiency can result in lower bone mineral density and an increased risk of reduced bone density (osteoporosis) or bone fracture because a lack of vitamin D alters mineral metabolism in the body. Thus, vitamin D is also critical for bone remodeling through its role as a potent stimulator of bone resorption.
The VDR regulates cell proliferation and differentiation. Vitamin D also affects the immune system, and VDRs are expressed in several white blood cells, including monocytes and activated T and B cell. In vitro, vitamin D increases expression of the tyrosine hydroxylase gene in adrenalmedullary cell, and affects the synthesis of neurotrophic factors, nitric oxide synthase, and glutathione.
A diet deficient in vitamin D in conjunction with inadequate sun exposure causes osteomalacia (or rickets when it occurs in children), which is a softening of the bone. In the developed world, this is a rare disease. However, vitamin D deficiency has become a worldwide problem in the elderly and remains common in children and adults. Low blood calcifediol (25-hydroxy-vitamin D) can result from avoiding the sun. Deficiency results in impaired bone mineralization and bone damage which lead to bone-softening diseases, including rickets and osteomalacia. Being deficient in vitamin D can cause intestinal absorption of dietary calcium to fall to 15%. When not deficient, an individual usually absorbs between 60-80%.» (wikipedia)