User:FiveK/Taxable account after-tax balance

Investment growth in a taxable account is reduced by annual dividend taxation and by capital gain taxes when the balance is withdrawn. A relatively simple formula calculates the final after-tax value: $$ Amount = P * [(1+e)^n*(1-f) + f] $$. This article shows a short derivation of that formula.

Formula for the final after-tax value of a single contribution
Converting the summation in the above table's last formula into the closed form equation for the sum of a geometric series gives

(1) $$Basis = P + \tfrac{P*d*(1-z)*((1 + r - d*z)^n - 1)}{(r - d*z)}$$

(2) $$ EOY = P*(1 + r - d*z)^n$$

(3) $$ Amount = EOY-w*(EOY-Basis)$$

(4) $$ Amount = \tfrac {P*(( 1 + r - d*z)^n*(r - d*z -(r-d)*w) + (r-d)*w)}{(r - d*z)}$$

Divide by P and let $$ e = r - d*z $$

(5) $$ \tfrac {Amount}{P} = \tfrac{((( 1 - (1+e)^n)*r + d*(1+e)^n - d)*w + e*(1+e)^n)}{e}$$

Let $$g = r - d $$

(6) $$ \tfrac {Amount}{P} = \tfrac{(( g - (1+e)^n*g)*w + e*(1+e)^n)}{e} $$

Let $$ f = \tfrac{w*g}{e} $$

(7) $$ \tfrac {Amount}{P} = (1+e)^n*(1-f) + f $$

(8) $$ Amount = P * [(1+e)^n*(1-f) + f] $$

Formula for the final after-tax value of an annuity due
Instead of a single contribution, we can consider the future value of a stream of equal payments, similar to the Future value of an annuity due. Assuming constant tax rates, this is the sum of multiple instances of equation 8, each calculated for a different number of years. In summation form,

(9) $$ Amount = P * \sum_{k=1}^{n} [(1+e)^k *(1-f) + f]$$

Using the sum of a geometric series formula for the exponential term, and noting the sum of a constant term is simply the constant times the number of years, we get

(10) $$ Amount = P * [\tfrac{(( 1+e)^{n+1} - (1+e))}{e} *(1-f) + n*f]$$