Q: I am retired, but I work part-time. Can I contribute to a Roth IRA? How much can I contribute if I just earned a few thousand dollars this year?

A: As long as you have earned income from a job, you can put money into a Roth IRA. You may contribute up to the amount of your earned income for the year, with a $5,500 maximum for 2016 (or $6,500 if you're 50 or older).

If you work and your spouse does not, you can contribute up to $5,500 (or $6,500) to a spousal Roth IRA on his or her behalf — as long as your total contributions for both accounts don't exceed the amount you earned from working. That means your earned income for the year would need to be at least $13,000 if you're 50 or older and want to contribute the maximum for yourself and your spouse.

To calculate your maximum contribution, include your earnings from working (such as wages, commissions, bonuses and self-employment income). Alimony and maintenance payments through a divorce are also included in the earned income calculation for determining Roth IRA contributions, says Keith McGurrin, a certified financial planner with T. Rowe Price. Pension and investment income, however, does not count.

There's no maximum age for contributing to a Roth IRA (you must be under age 701/2to contribute to a traditional IRA). To qualify to make Roth contributions in 2016, your modified adjusted gross income must be below $132,000 if you're single or $194,000 if you're married filing jointly (the contribution amount starts to phase out if your income is more than $117,000 if single or $184,000 if married filing jointly).

That “modified adjusted gross income” figure to determine if you earn too much to contribute to a Roth is calculated differently than the earned income figure used to determine how much you can contribute. See IRS Publication 590-A for the full calculation. You have until April 17, 2017, to contribute to a Roth IRA for 2016.

Retirees who want Roth IRA benefits but earn too little to make the full contribution may want to convert money from a traditional IRA to a Roth, McGurrin says. There are no minimum or maximum income limits for Roth conversions; you just need to pay taxes on the converted amount (or on a portion of the converted amount, if you made some nondeductible contributions through the years).

Kimberly Lankford is a contributing editor to Kiplinger's Personal Finance magazine. Send your questions and comments to moneypower@kiplinger.com.