If you're married to someone who isn't earning a paycheck right now, or you're the one who isn't working, you still have two retirements to plan for. But to fund a retirement account, you need to earn income from a job or your own business.

Fortunately, there's an easy work-around. Married couples can use a spousal individual retirement account (IRA) to save for both retirements, even when one person isn't employed. Here's how a spousal IRA works.

A young couple looks worried about their finances.

Image source: Getty Images.

What is a spousal IRA?

A spousal IRA isn't a special type of retirement account. It's more of a strategy. Basically, the IRS allows you to fund an individual retirement account on behalf of your spouse as long as you file a joint tax return, even if only you are earning income. That makes a spousal IRA a good way for couples to save if one person is a stay-at-home parent, unemployed -- or not working for any reason, really.

You can contribute to a Roth IRA or a traditional IRA for your spouse, but all the regular IRA rules apply. You can only contribute up to $6,000 a year in 2020, or $7,000 if you're 50 or older. Your contributions are limited to your earned income. So if you only make $10,000 for the year, $10,000 is the maximum amount you can contribute to both of your IRAs combined. If you're putting money in your spouse's Roth IRA, you'll also need to make sure your income is within the limits.

Should you fund a spousal IRA?

Maxing out both of your IRA contributions is always a smart move, provided that you can afford to do so. But if you're struggling to make ends meet on a single income, particularly if one of you has lost your job, it may not be realistic. Your first priority in this case is to make sure you have enough to pay bills without slipping into debt.

You should also aim to have an emergency fund that you could survive on for a minimum of six months. Having that cash reserve as a cushion is especially important in this case since you're relying on a single income.

But as long as you can afford it, investing as much as you can in both accounts can have a big payoff. The returns are especially significant if it allows you to invest more while in your 20s or 30s, to take advantage of compounding.

Here's an example: Suppose your spouse leaves the workforce for five years beginning at age 30 to become a stay-at-home parent. By returning to work at 35 and then maxing out an IRA with a $500 monthly contribution that earned 8% annually, the account would have just over $745,000 once your spouse is 65. What if you'd used a spousal IRA to make the $500 monthly contribution during those five years out of the workforce? Your spouse's IRA would have well over $1.1 million. 

Don't forget about Social Security

Even if you don't have a long-enough work history to qualify for Social Security benefits on your own, you can still claim benefits based on your spouse's record. You're even allowed to collect based on their behalf if you've divorced, in some cases.

You can collect up to 50% of the benefits your spouse is eligible for at full retirement age. If you qualify based on your own record, you'll receive the higher of the two, but not both.

Whether you live off one paycheck or two, it's crucial that you save for both of your retirements. Taking advantage of the spousal IRA rules and planning your Social Security strategy are good ways to get there.