It depends. If the excess contribution is removed from your Roth IRA by your tax-filing deadline plus any extensions, along with any net attributable income (NIA), the 6% excise tax does not apply. If the excess contribution is not removed by the deadline, you owe the IRS a 6% excise tax for every year the amount remains in your Roth IRA as an excess contribution. An exception applies if the market value of your Roth IRA for the previous year-end is less than the excess contribution. Under this exception, the 6% excise tax would apply to the market value of your Roth IRA for the previous year-end, instead of to the contribution amount.
Note: Bear in mind that excess contributions that remain in your Roth IRA gets applied as a Roth IRA contribution for the following year, and continues until the excess is used up.
When you overcontribute to your Roth, the 6% penalty applies on the amount contributed, regardless of its current value. For example, if an excess contribution of $5,000 was made and the market value declined to $2,500 by the end of the year, the 6% penalty would still apply to the $5,000. The loss of market value does not change the rules. That may seem unfair, but look at it another way: if the original amount had grown to $10,000, the penalty would still only apply to the $5,000.
This question was answered by Denise Appleby.