Not my problem than the S&P 500 only returned 4% from 1998 to today. What do you want me to do, start counting from the bottom of the market? Nobody knows to buy at the bottom of the market because the bottom can only be known retrospectively.
Sure, if you invested in 2002 then your returns might be 2.5x today and the inflation lower, and the tax rate might be 20% (or whatever, I'd have to redo the numbers)
If you invested in 2000, however, you'd make 40% on your investment, lose money to inflation and THEN pay capital gains tax. You'd be getting taxed for losing money.
So I picked a more neutral date like 1998 where it wasn't a bubble yet, but not close after a crash. I didn't include dividends because I'd have to add those constantly as the divident yield from S&P 500 changes from month to month. It's around 2% (actually under 2% for the majority of the last 15 years), though, so that does change the numbers.
I would say then the inflation is around ~2%, dividends around 2%, stocks grew around 4%, so around 6% year-to-year nominal profit which you would pay 0.9% capital gains tax, and 4% real profit which is 22.5% capital gains tax (0.9/4 = 0.225)
Consider the following:
A single individual with $200,000 salary with two personal exemptions would pay $45,000 in total taxes which is the same overall rate even though the marginal rate is 33%
So a rich individual who doesn't work, but only sits on $5,000,000 that yield him $300,000 a year (and that 5M loses $100,000 of purchasing power a year) would pay the same federal taxes as an individual who just works for his $200,000