Generally, your IRA and or company 401(k) distributions are taxed as ordinary income. That's because you funded them with tax-deductible contributions and all the earnings of these contributions have been tax-deferred. So nothing has been taxed. Taking a distribution before turning 59½ will add a 10% penalty tax to the income tax.
Nevertheless, you may have made some 'after-tax' contributions to them, and those – not their earnings – will come out tax free. So let's see how this to handle these.
Taxable and non taxable distributions for company-administered plans such as a 401(k)
This is pretty easy because it's your employer who is responsible for tracking both your tax deductible and after-tax contributions to the plan. They'll report those amounts to you, either on your statements or on a 1099-R when you take a distribution from the plan.
You're the administrator of your IRA. So keeping track of after-tax contributions is your job. That's done on IRS Form 8606 each year you make an after-tax contribution and each year you take an IRA distribution.
This form – each time it's filed - carries forward the total of prior year after-tax contributions and adds them to any current year contribution. It also formulates the non-taxable portion of any distribution you take in the year. And, of course subtracts out that amount from the total after-tax contributions among your IRAs. Normally, form 8606 is attached to your tax return.
The non-taxable portion of your IRA distributionsduring the year is the ratio of all your after-tax contributions (from your latest Form 8606) divided by the total value of your IRAs. No, you don't get to take out just the 'tax-free' part! Each time you take an IRA distribution, part is taxable, part is return of after tax money (not taxable).
What if you forgot to file your Form 8606 over the years? Just get the form and its instructions; it'll give you some suggestions on documentation you can use to substantiate your prior after-tax contribution amounts. If you think the amount of after tax contributions you have forgot to document is significant, then get help form a tax professional so that you don't need to pay tax twice when you take distributions.