Hi Bogleheads community!

I've read The Bogleheads' Guide to Investing, and this is my first post.

I have a 401k, Rollover IRA, Roth IRA, and taxable account. In each of them, I've placed both stocks and bonds.

After reading the book and some wiki pages, I'm moving funds to create a more tax-efficient portfolio.

One of the pages in the book shows the differences between placing assets in more appropriate accounts.

Stocks in Tax Deferred Bonds in Taxable

Initial Investment $50,000.00 $50,000.00

Value After 30 Years $872,470.11 $232,077.55

Taxes at Distribution $218,117.53 $0.00

Final Value $654,352.59 $232,077.55

Bonds in Tax Deferred Stocks in Taxable

Initial Investment $50,000.00 $50,000.00

Value After 30 Years $380,612.75 $820,490.16

Taxes at Distribution $95,153.19 $100,499.00

Final Value $285,459.56 $719,991.16

This assumes a 10% return on stocks, 7% return on bonds, 1.5% dividend yield, 15% capital gains and dividend tax rate, and 25% income tax rate.

I'm a bit of a math nerd, and like to know how one arrived at the numbers.

Using Excel and the FV function, I was able to calculate the final values for all four scenarios except the Stocks in Taxable. I understand that the interest rate used was 9.775% (.09775) to account for the annual taxation of dividends.

But how do you arrive at the taxes owed amount of $100,499.00? I assume that the 15% tax rate would be applied to the difference between the final value of $820,490.16 and the beginning value of $50,000.00. This is $770,490.16, and 15% of that is $115,573.52, not $100,499.00.

I'm guessing that I didn't account for dividends, but still can't figure this out after doing all sorts of calculations.

How do you arrive at the taxes owed amount of $100,499.00?