Retirement tax questions

So if I invested $100 pre-tax 25 years ago and over time that money grew to $300, would I now have to pay tax on the entire $300?  In that case it would have been cheaper to pay the tax on the original $100......