We now have an RCT for megadoses of vitamin D as treatment for diagnosed cases of COVID-19 infection. According to Chris Masterjohn's summary:
50% of the control group (13 people) required admission to the ICU. Only 2% of those in the vitamin D group (one person) required admission to the ICU.
The study used megadoses of a special more active form of vitamin D. Quoting again from Masterjohn's summary:
The vitamin D was provided as oral calcifediol, also known as calcidiol, 25(OH)D, and 25-hydroxyvitamin D. [...] 25(OH)D [...] is five times as potent as vitamin D [...] Whereas one microgram (mcg) of vitamin D is 40 IU, 1 mcg of 25(OH)D is 200 IU.
Megadoses may have been needed because these were already-infected people with what's effectively a preexisting condition of vitamin D deficiency. As a prophylactic, ordinary vitamin D in doses of a few thousand IU per day is most likely sufficient. I use NOW vitamin D gel caps, and also take extended outdoor walks most days.
At this point I'm no longer worried about COVID personally, though I'll keep cooperating with public safety efforts to wear masks in public, in part because this sort of prosocial signaling is likely to be helpful if we get a worse plague sometime.
Related: Covid 9/10: Vitamin D
ETA: Another RCT found no effect from "a single oral dose of 200,000 IU of vitamin D3." This is some evidence against D3's efficacy, but it's weak in the light of the prior strong positive result. The dosage schedule of D3 in the earlier Spanish RCT mentioned above was very different, and much more similar to what I'd expect from someone taking 8,000 IU daily as a preventative. From Chris Masterjohn's summary:
The treatment in this RCT [...] is equivalent to 106,400 IU vitamin D on day 1, 53,200 IU on days 3 and 7, and 53,200 IU weekly thereafter. If this were given as daily doses, it would be the equivalent of 30,400 per day for the first week, followed by a maintenance dose of 7,600 IU per day.
My guess would be that absorption of oral doses scales less well than absorption of injected calcifediol, so I would be worried about oral dosage less often than daily. Still worried about external validity, which is why I'd like to see a credible attempt at a replication.
ETA: A new, carefully designed study shows that 3200 IU/day doesn't significantly reduce COVID infection rates. The study is underpowered to say anything directly about the endpoints covered in the Spanish RCT - only 3 people needed ventilation assistance in the prevention study, vs 14 in the Spanish RCT. The dosage is also less than half the dosage in the Spanish study, but given the very large effect size in the Spanish study I'd expect that to be enough to matter. So I'm still supplementing vitamin D but I'm less confident it works, and I'm gonna be more careful to specify that the evidence ONLY points to a reduction in severity, not infection or transmission rates.