Two bottles can sit side by side on the shelf, both saying "Vitamin D" and both showing the same number, and do quite different things once you swallow them. The number on the front is the dose. The word in smaller print underneath is the form, and for vitamin D the form is a big part of how much your blood level actually goes up.
There are two forms sold as vitamin D. D3 is cholecalciferol. D2 is ergocalciferol. If you only remember one thing from this guide, remember that D3 is the one you want.
Why the form matters more than the number
Both forms raise the level of vitamin D in your blood, the marker a doctor measures as 25-hydroxyvitamin D. But they do not do it equally. In head-to-head trials, D3 raises that blood level more than D2: by around 1.7 times in the most-cited comparison, with the gap somewhat smaller when both are taken as a regular daily dose rather than an occasional large one. Part of the reason is that D2 does not hold its effect as long: it binds less tightly to the protein that carries vitamin D around the body, so it clears sooner and the level drifts back down between doses.
So two capsules can both say "1000 IU" and the D3 one raises your blood level more, dose for dose, than the D2 one. That is not a small print technicality. Over time it can be the difference between correcting a deficiency and falling short of it.
Where each form comes from
D3 is the form your own skin makes in sunlight, and the form in oily fish. Most D3 supplements are made from lanolin, the oil in sheep's wool, although a vegan D3 made from lichen now exists and works the same way. D2 is made from yeast or fungi exposed to ultraviolet light, which is why it is the form you most often see labelled as suitable for vegans and the form sometimes used in higher-strength prescriptions.
If you are vegan, you no longer have to settle for D2. A lichen-derived D3 gives you the better-absorbed form without an animal source.
What to actually buy
Look past the big number on the front and find the form. Choose cholecalciferol (D3). Vitamin D is fat-soluble, so take it with a meal that contains some fat, which improves how much you absorb. And magnesium is one of the cofactors your body uses to activate vitamin D, which is why the two are often taken together.
Vitamin D is also one of the few nutrients where a blood test genuinely changes what you should do, because the right dose depends on how low you are starting from. If you are not sure, that is worth testing rather than guessing.
Two bottles, same number on the front. The long word underneath decides whether your blood level goes up properly or barely moves. Cholecalciferol wins. Ergocalciferol does not.
The form-over-dose point is true well beyond vitamin D, and it is one of the patterns behind how a supplement and a medicine can affect each other too.