You do not pay tax on Roth IRA investment gains when you withdraw them in retirement, as long as you follow the account rules

The core feature of a Roth IRA is that your investment earnings grow tax-free. When your stocks, bonds, or mutual funds gain value inside the account, you owe no federal income tax on those gains—not while the money sits in the account, and not when you take it out in retirement. This is the opposite of a traditional IRA, where you pay tax on withdrawals.

The catch is that this tax-free treatment only applies if you withdraw the money after age 59½ and the account has been open for at least five years. If you withdraw gains before meeting both conditions, you will owe income tax on those gains plus a 10 percent penalty in most cases. The five-year rule applies to each Roth IRA separately, so if you open a second Roth IRA later, that account has its own five-year clock.

Money you contributed to the account—not the gains, just your original deposits—can always come out tax-free and penalty-free, regardless of your age or how long the account has been open. The IRS treats contributions and gains as separate buckets.

Key Takeaways

  • Investment gains in a Roth IRA are never taxed as long as you withdraw them after age 59½ and the account has been open for at least five years.
  • Your original contributions can be withdrawn at any time without tax or penalty, even before age 59½.
  • Withdrawing gains before age 59½ triggers income tax on those gains plus a 10 percent early withdrawal penalty, with limited exceptions.
  • The five-year rule is tied to each individual Roth IRA account, not to your age or how many Roth accounts you own.

How the five-year rule actually works

The five-year clock starts on January 1 of the year you first contribute to any Roth IRA. If you open your first Roth IRA in March 2024 and contribute $7,000, your five-year period runs from January 1, 2024, through December 31, 2028. On January 1, 2029, the five-year requirement is satisfied for that account.

If you open a second Roth IRA in 2026, that second account does not inherit the five-year clock from your first account. The second account gets its own five-year period starting January 1, 2026. This matters if you plan to withdraw from the second account before 2031—you would owe tax and penalty on any gains, even though your first Roth IRA has already cleared the five-year hurdle.

Conversions from a traditional IRA to a Roth IRA have their own five-year rule. If you convert a traditional IRA to a Roth in 2024, that conversion amount has a separate five-year clock. This prevents people from converting large amounts, withdrawing them immediately, and avoiding the early withdrawal penalty.

What happens if you withdraw gains early

If you withdraw investment gains before age 59½ or before the five-year period ends, the IRS taxes those gains as ordinary income at your regular tax rate. You also owe a 10 percent penalty on the amount withdrawn. For example, if you withdraw $5,000 in gains at age 45 and your tax bracket is 22 percent, you would owe $1,100 in income tax plus $500 in penalty—a total of $1,600 on a $5,000 withdrawal.

Some situations allow you to withdraw gains early without the 10 percent penalty, though you still owe income tax. These exceptions include withdrawals for a first-time home purchase (up to $10,000 lifetime), medical expenses that exceed 7.5 percent of your adjusted gross income, health insurance premiums while unemployed, and disability or medical hardship. Even with these exceptions, the income tax still applies—only the penalty is waived.

Your contributions, again, are never subject to tax or penalty when withdrawn, so if you are unsure whether you can afford to leave money in the account, you can always pull out what you put in.

Why Roth gains are tax-free in retirement

The tax-free growth in a Roth IRA is a trade-off. With a traditional IRA, you get a tax deduction when you contribute—you reduce your taxable income in the year you deposit the money. With a Roth, you contribute after-tax dollars and get no deduction. The government lets you skip taxes on the gains as compensation for that upfront tax cost.

This makes Roths especially valuable if you expect to be in a higher tax bracket in retirement, or if you expect tax rates to rise in the future. Your gains compound tax-free for decades, and then you withdraw them without owing anything. A traditional IRA forces you to pay tax on withdrawals at whatever rate applies when you retire.

Inherited Roth IRAs and the SECURE Act rules

If you inherit a Roth IRA from someone other than your spouse, the tax treatment of gains changes. You can withdraw the original account owner's contributions tax-free, but you must withdraw all the money in the account within 10 years of the owner's death (under the SECURE Act rules that took effect in 2023). Any gains you withdraw are tax-free as long as the account had been open for at least five years before the original owner died.

If the account had not been open for five years when the original owner died, you owe income tax on the gains portion of your withdrawals, though you still avoid the 10 percent early withdrawal penalty. Spousal heirs have different options and can treat the inherited Roth as their own account.

State taxes on Roth IRA gains

Federal income tax is not the only tax that matters. Some states tax retirement account withdrawals, though most do not. States that tax IRA withdrawals typically exempt Roth withdrawals or treat them the same as traditional IRA withdrawals—meaning you owe state tax on the gains portion.

If you live in a state with income tax, check your state's rules on Roth IRA withdrawals. A few states, including Pennsylvania and Illinois, do not tax retirement income at all, which makes Roth accounts even more valuable if you plan to retire there. If you move states after opening a Roth, your account rules do not change, but your state tax obligations might.

How to track contributions versus gains

Your brokerage or bank sends you a statement each year showing your account balance, but it does not always clearly separate contributions from gains. If you plan to withdraw money before age 59½, you need to know how much is contributions (always tax-free) and how much is gains (taxable if withdrawn early).

Keep records of every contribution you make, including the year and amount. If you convert a traditional IRA to a Roth, record that conversion separately. Your brokerage can provide a cost basis report, which shows what you put in and what the gains are, but you should verify this against your own records. The IRS Form 8606 tracks conversions and is filed with your tax return if you do a conversion.

If you have multiple Roth IRAs at different institutions, you must track contributions across all of them. The IRS treats all your Roth IRAs as a single account for the purpose of calculating how much is contributions versus gains when you withdraw.

Frequently Asked Questions

Do I pay taxes on Roth IRA dividends and interest while the money is in the account?

No. Dividends, interest, and all other investment gains inside a Roth IRA are never taxed, whether the money stays in the account or you withdraw it in retirement. This is true even if you reinvest the dividends. You only owe tax on gains if you withdraw them before age 59½ and the account is less than five years old.

What if I withdraw only my contributions and leave the gains in the account?

You can do this without tax or penalty at any age. The IRS lets you withdraw contributions anytime. The gains stay in the account and continue to grow tax-free. This is useful if you need cash but want to preserve the tax-free growth on the rest of your money.

Can I avoid the early withdrawal penalty by withdrawing only contributions?

Yes. Contributions have no age restriction and no penalty. However, if you withdraw more than you contributed, the excess is treated as a gain withdrawal and is subject to tax and the 10 percent penalty if you are under 59½ and the account is less than five years old.

Do I owe tax on Roth IRA gains if I move the account to a different bank?

No. Moving a Roth IRA from one institution to another is called a trustee-to-trustee transfer and creates no tax event. The money moves directly between institutions, and your five-year clock continues uninterrupted. You owe no tax on gains during the transfer.

What if I have both a traditional IRA and a Roth IRA—do they share the five-year rule?

No. The five-year rule applies only to Roth IRAs. Traditional IRAs have no five-year requirement. If you have both types of accounts, each Roth IRA has its own five-year clock, and traditional IRAs are not affected by the Roth rules.