Two types of vitamin D exist: vitamin D2 and vitamin D3. Both forms are essential, but vitamin D3 is a more stable form that lasts longer in the body. You can get both vitamin D2 and vitamin D3 by consuming foods or supplements. Foods rich in vitamin D include fatty fish, milk, oranges, and yogurt. You can also get vitamin D3 by exposing your skin to sunlight. However, sunlight and food alone rarely get you to optimal vitamin D status.
