Also, in addition to the general contribution limit that applies to both Roth and traditional IRAs, your Roth IRA contribution may be limited based on your filing status and income.
If you’ve contributed too much to your IRA and/or Roth IRA, you can either accept this 6% penalty or take measures to avoid it before the tax filing deadline.
If your Roth IRA contribution was limited by your MAGI and you want to avoid the 6% penalty then you can either recharacterize the contribution as a traditional IRA contribution or you request the withdrawal of the excess contribution plus earnings by the due date.
If you choose to withdraw the excess contribution plus earnings it is best to withdraw a little more than the excess contribution since the earnings will increase your MAGI and this will change how much you can contribute to the Roth IRA (if you are in the phaseout range).