Thank you, I sent it to them
I figured I'd add a little color since I just went through this for someone's return and there is a progression of steps to optimize the credit... that is, get as much credit as possible for as little retirement contributions as possible and get the optimal mix of traditional and Roth IRA contributions.
First, look at your Form 8880 before any contributions. The most that they will provide credit on is $2,000 of contributions. The first tier is 50c on the dollar and the second tier is 20c on the dollar.
Traditional IRA contributions reduce your income and move you towards the 50c tier. So first, I look at the 8880 to see if it might be possible to reduce income to get to the 50c tier. If so, do tIRA contributions to get into the 50c tier. It might be prudent to add $100 in case of an overlooked 1099 or something to make sure you don't later get thrown into the 20c tier.
Then, add Roth contributions as needed to adjust the credit so that either the credit is maximized or all federal income taxes withheld are refunded. The mazimum credit is $1,000 so if you are in the 50c tier or can make tIRA contributions to put you in the 50c tier, the maximum total retirement account contributions would be $2,000. Anything more than that doesn't benefit you.
Also, there isn't any point to making more contributions than needed to simply get all FWT refunded since any additional credit isn't refundable.
The return that I just completed, the taxpayer was in the 20c tier but just a little over the income level for the 50c tier. So first, I included tIRA contributions for the excess of their income over the income limit for the 50c tier plus $100 safety margin. After that tIRA contribution they still had net tax of $350, so I added $700 of Roth contributions which increased the credit by $350 at 50c on the dollar, so their net tax was $0 and their refund was for ALL federal income taxes withheld.
This person is in their 30s, so the small tIRA contribution is effectively locked up until they turn 59-1/2 unless they are willing to pay the 10% penalty, but the Roth contribution can be withdrawn at any time without penalty and can serve as a secondary emergency fund.
However, keep in mind that any tIRA or Roth withdrawals are counted as negative contributions for the purpose of the credit so to while one could contribute to a Roth, claim the credit and immediately withdraw the Roth contribution and have the money for spending, it would mess up your qualification for the credit in subsequent years (not just the next year because withdrawals for more than a single year are factored into the credit calculation).
While it is complicated and requires a little playing with the numbers, what is neat is that you can calibrate the tax-deductible and after-tax contributions to optimize the credit and end up with $0 tax.