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 + e)^n - 1)}{e}$$

The total capital gain is the sum of the annual gains, or

(2) $$ CG = P*g*\sum_{k=0}^{n-1} (1 + e)^k = P*g*\tfrac{(( 1 + e)^n - 1)}{e}$$

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

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

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

(5) $$ Amount = P * (( 1+e)^n - f * (( 1+e)^n - 1))$$

or

(6) $$ 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 6, each calculated for a different number of years. In summation form,

(7) $$ 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

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

(9) $$Basis = \sum_{k=1}^{n} [P + \tfrac{P}{e}*d*(1-z)*(( 1 + e)^k - 1)]$$

(10) $$Basis = n*P + \tfrac{P}{e}*d*(1-z)* [\tfrac{(( 1 + e)^{n+1} - (1 + e))}{e} - n]$$