Taxes in TEA and TDA

Janet Lowell is a financial advisor meeting with a new client, Jim Harris. Harris is
subject to the following tax rates: interest (25%), dividends (15%), short-term gains
(25%), and long-term gains (20%). Short-term capital gains include realized capital
gains on investments held for less than one year. Harris’s objective is to minimize
taxes payable whenever possible.
Harris has $700,000 of cash that he recently inherited. Based on her recommended
asset allocation with annual rebalancing, Lowell estimates that Harris could earn an
average annual pre-tax return of 8% if the portfolio is invested in a balanced mix of
stocks and bonds. Harris has an investment horizon of 20 years.
Lowell also addresses the tax implications of asset allocation. Because Harris has
never contributed to a tax-deferred account (TDA), the tax laws in his jurisdiction
permit him to contribute up to $450,000 of funds into a TDA immediately in the
current year. An immediate tax deduction would be provided to Harris for the
contribution to the TDA and he will reinvest the entire tax refund from his tax
deduction in the TDA. Therefore, Harris is considering investing half of his $700,000 in
a TDA and the other half in a taxable account. The relevant tax rates for both accounts
are assumed to be 20%.
In the following year, Harris earns $120,000 of pre-tax employment income and is
subject to a flat income tax rate of 20%. He is permitted by the tax laws to set aside
one-third of the pre-tax income to invest in either a TDA or a tax-exempt account
(TEA). Both accounts are estimated to have an average annual pre-tax return of 8%
Assuming that Harris sets aside one-third of his pre-tax employment income in the
following year, he should most likely contribute his funds to:
A) the tax-deferred account (TDA).
B) the tax-exempt account (TEA).
C) either the TDA or the TEA.

Can someone please example how the following calculation for the TDA was done?
For example, taking into account the immediate tax deduction for the TDA, we can calculate the value of the contribution at the end of 20 years for the TDA as:
TDA: [$40,000 × (1 – 0.20) + ($40,000 × 0.20)] × [(1.08)20(1 – 0.20)] = $149,151

I thought that for TDA we apply FV = (1 + R)^n x (1 − t), and I anyway do not understand how they computed the tax deduction before this term? Thanks!

It seems like they wrote it out in a very weird way. If we use your formula FV = (1 + R)^n x (1 − t) you get to $149,151 as well.

It looks like they are showing you the $40,000 after tax + the savings on tax = the pre-tax amount ($40,000), then compound at 8% for 20 years, then tax affect at the end.

If you look in the square brackets [ ] you get to $40,000.