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.
If you take $10,000 out of a traditional IRA, the cost of that decision may be more than the tax on $10,000. The withdrawal can create federal tax, state tax, make more of your Social Security taxable and, in some years, raise your Medicare premiums later. That’s because traditional IRA withdrawals are considered to be income, not savings. The retirement question is not “What tax bracket am I in?” It is “How much do I need to take out to have the amount I want to spend?”