If 20% tax is paid on distributions and the net is to be $25,000 the gross per year needs to be
25000/(1 - 0.2) = 31250
However these amounts need to be adjusted for inflation so at the end of year 1 the gross distribution should be
31250 (1 + 0.03) = 32187.50
and at the end of year 2:
31250 (1 + 0.03)^2 = 33153.125 etc.
This means at the end of year 3 when the expected gross distribution is
31250 (1 + 0.03)^3 = 34147.71875 this is the inflation-adjusted future value, equivalent to $31,250 in present value, which after 20% tax yields £25,000 present day value.
Using the model for an ordinary annuity from here: Calculating The Present And Future Value Of Annuities
The summation for your fund would be
giving the present value required as $513,866.47
The formula for this summation is
r are inflation and the growth rate respectively.
p = 31250
i = 0.03
r = 0.05
n = 20
((1 + i) p (1 + r)^-n ((1 + i)^n - (1 + r)^n))/(i - r) = 513866.47
P = p = 31250
g = i = 0.03
r = r = 0.05
n = n = 20
the formula referred to by THEAO produces a different result: $498,899.49
As the page describes, it is derived as follows:
So we can see, if the distribution at the end of year 1 is $31,250 we need present value capital of $498,899.49. However, at the end of year 1 the value of the distribution should be inflation-adjusted by 1 year to be equivalent to present value gross $31,250 or $25,000 net.
If we adjust for one year's inflation and start with
P = 31250 (1 + 0.03) = 32187.50 then the formula referenced by THEAO also results in $513,866.47, as I calculated.