Capital gains earned inside a Roth IRA are not taxable while the money stays in the account, and they come out completely tax-free when you take a qualified distribution. Because you funded the Roth with money you had already paid tax on, the IRS trades the upfront deduction for tax-free growth on the back end. The catch: your earnings only qualify for that tax-free treatment if you meet two conditions, and withdrawing too early can convert what would have been tax-free gains into ordinary taxable income plus a 10% penalty.
Growth Inside the Account Is Never Taxed
While your money sits in a Roth IRA, nothing that happens inside it triggers a tax bill. You can sell a stock at a profit, collect dividends, or earn interest, and none of it shows up on your return that year. That is very different from a regular brokerage account, where selling a winning position creates a taxable event even if you reinvest every dollar.
The shelter covers all investment activity in the account. Rebalance the portfolio, swap one fund for another, take profits on an appreciated stock, and you report none of it to the IRS.1Internal Revenue Service. Roth Comparison Chart Your gains compound on a larger base because no slice comes off the top each year for taxes.
When Capital Gains Come Out Tax-Free
For gains to leave the account without tax, the withdrawal has to be a “qualified distribution.” Two conditions must be satisfied at the same time:
- You are age 59½ or older at the time of the withdrawal.
- At least five tax years have passed since you first contributed to any Roth IRA in your name.
Meet both, and every dollar coming out, including decades of accumulated capital gains, is free from federal income tax.2Office of the Law Revision Counsel. 26 USC 408A – Roth IRAs
A few narrow situations can make a distribution qualified before age 59½: death (distributions to a beneficiary or estate), total and permanent disability, and up to $10,000 of lifetime earnings used toward a first home. Each of these still requires the five-year holding period to be met.2Office of the Law Revision Counsel. 26 USC 408A – Roth IRAs
How the Five-Year Clock Works
The five-year clock starts on January 1 of the tax year of your first contribution to any Roth IRA. Open a Roth in April 2026 and designate the contribution for tax year 2025, and the clock runs from January 1, 2025 through December 31, 2029. After that, distributions of earnings can be qualified if you also meet the age or exception requirement.2Office of the Law Revision Counsel. 26 USC 408A – Roth IRAs
The clock only needs to start once. If you opened a Roth in 2015 and open a second Roth years later, the newer account inherits the original clock. You don’t restart the five years with each account.
Money converted from a traditional IRA to a Roth carries its own separate five-year rule for the 10% early withdrawal penalty. If you convert funds and then withdraw them within five years while under 59½, the taxable portion of that conversion faces the 10% penalty even though you already paid income tax when you converted.3Internal Revenue Service. Publication 590-B, Distributions from Individual Retirement Arrangements
Withdrawals Come Out in a Set Order
You don’t choose which dollars come out first. The tax code fixes the sequence, and the order works in your favor:
- Regular contributions come out first. You already paid tax on this money, so it is always tax-free and penalty-free regardless of your age or how long the account has been open.
- Conversion and rollover amounts come out next, on a first-in, first-out basis. Within each conversion, the taxable portion comes out before the nontaxable portion.
- Earnings come out last. Only after contributions and conversions are exhausted does the IRS treat you as withdrawing capital gains, dividends, and interest.2Office of the Law Revision Counsel. 26 USC 408A – Roth IRAs
That ordering is real protection. Someone who has contributed steadily for years can often take a substantial withdrawal without ever reaching the earnings tier, even if the timing wouldn’t have counted as a qualified distribution.
What a Non-Qualified Earnings Withdrawal Costs
If a withdrawal does reach the earnings tier and doesn’t qualify, the tax treatment is worse than in a regular brokerage account. Those earnings, including your capital gains, are taxed as ordinary income, not at the preferential long-term capital gains rates.1Internal Revenue Service. Roth Comparison Chart Depending on your bracket, that could mean 22%, 24%, or 37% on gains that would have been taxed at 15% or 20% outside the Roth.
If you are under 59½, the IRS adds a 10% early withdrawal penalty on the earnings portion.4Internal Revenue Service. Topic No. 557, Additional Tax on Early Distributions from Traditional and Roth IRAs Combined, the hit can consume a third or more of the gains you pull out. The ordering rules are your main defense against stumbling into it.
Exceptions That Waive the 10% Penalty
Several exceptions eliminate the 10% penalty on an early distribution, though the earnings portion still owes ordinary income tax if the distribution isn’t fully qualified. The IRS recognizes these penalty-free exceptions for IRA distributions taken before age 59½:5Internal Revenue Service. Retirement Topics – Exceptions to Tax on Early Distributions
- Qualified higher education expenses for you, your spouse, or your children and grandchildren, including tuition, fees, books, and room and board for at least half-time students at an eligible institution.
- Birth or adoption, up to $5,000 per child, taken within 12 months of the birth or legal adoption.
- Unreimbursed medical expenses exceeding 7.5% of your adjusted gross income.
- Health insurance premiums paid after receiving unemployment compensation for at least 12 weeks.
- A series of substantially equal periodic payments based on your life expectancy, continuing for at least five years or until you reach 59½, whichever is longer.
- First-time home purchase, up to $10,000 lifetime.
- IRS levy on the account.
- Emergency personal expenses, one withdrawal per year of up to $1,000 for unforeseeable financial needs, for distributions after December 31, 2023.
- Domestic abuse victim distributions, up to the lesser of $10,000 or 50% of the account, for distributions after December 31, 2023.
- Federally declared disaster distributions, up to $22,000 for qualified individuals with economic losses.
- Qualified military reservist distributions for reservists called to active duty.
These exceptions remove the penalty only. If the distribution reaches the earnings tier and isn’t qualified, ordinary income tax on the earnings still applies.
If You Inherit a Roth IRA
The rules shift when the account isn’t yours. If the original owner had already satisfied the five-year holding period, withdrawals of both contributions and earnings are generally tax-free to you as beneficiary. If the account was less than five years old when the owner died, earnings you withdraw may be subject to income tax.6Internal Revenue Service. Retirement Topics – Beneficiary
Most non-spouse beneficiaries who inherited a Roth IRA from someone who died in 2020 or later must empty the account by the end of the tenth year following the year of death.6Internal Revenue Service. Retirement Topics – Beneficiary Spouses have more flexibility, including the option to treat the inherited Roth as their own. Even with the ten-year deadline, an inherited Roth typically comes out tax-free as long as the original five-year clock was satisfied.