The whole point of ROTH IRA is that you don’t pay taxes on gains…
It's more complicated then that. The money you put into the Roth IRA you can withdraw any time, because you already paid taxes on it. The gains/earnings work differently, more info here. Basically if you don't have a qualified withdrawal you have to pay taxes on the earnings, and a 10% penalty.
reply