No one told you selling an investment does not mean the whole sale is taxable.
If you sell an investment for $20,000 that originally cost $15,000, the gain is $5,000.
Capital-gains tax generally applies to the gain, not the entire $20,000.
Retirement money does not all get taxed the same way.
A dollar from a checking account, brokerage account, traditional IRA and Roth account can have four different tax results.
You do not need to memorize the tax code.
You do need to know which kinds of money create taxable income.
If you sell an investment for $20,000 that originally cost $15,000, the gain is $5,000.
Capital-gains tax generally applies to the gain, not the entire $20,000.
At lower taxable-income levels, some long-term capital gains may fall into the 0% federal capital-gains bracket.
The gain may still count as income for calculations that affect Social Security taxation or Medicare premiums.
Home-sale taxes generally depend on your gain, not the entire sale price.
Eligible homeowners may also exclude part of that gain.