Photo: asenal29, Wikimedia Commons.

Millions of Americans use IRAs for their retirement savings, and most of them likely expect that they'll end up using all of that money for their own needs. Yet with trillions of dollars set aside in retirement accounts, inevitably some IRA accountholders don't end up spending all of their IRA money before they pass away. In those cases, their heirs have to figure out how to deal with an inherited IRA without running afoul of the restrictions that the IRS imposes on these retirement accounts. In particular, the following three things are important to keep in mind as you navigate the rules that govern inherited IRAs.

1. Surviving spouses have more options with inherited IRAs.
The tax law recognizes that most married couples leave their remaining assets to their surviving spouse. Accordingly, the rules governing inherited IRAs are much more generous for spouses than for other beneficiaries.

The most useful right that surviving spouses have with inherited IRAs that other beneficiaries don't have is that a surviving spouse can do what's known as a spousal rollover. With this technique, a surviving spouse can take the IRA assets of the deceased spouse and transfer them directly into the surviving spouse's own IRA. At that point, the inherited funds become mixed with the surviving spouse's own IRA assets, and in following the rules governing early withdrawal penalties and required minimum distributions, the surviving spouse's age determines which rules apply.

In most cases, a spousal rollover is the simplest way to handle an inherited IRA from a deceased spouse. In isolated cases, though, spouses might prefer not to do a spousal rollover, in which case they have all the other choices available to non-spouse beneficiaries listed below.

2. It matters how old the deceased IRA accountholder was at death.
For whatever reason, age 70-1/2 is an important milestone with IRAs, as it's the age at which you have to start taking required minimum distributions from your traditional IRA. In dealing with an inherited IRA, age 70-1/2 plays a key role, as well.

If the deceased accountholder hadn't yet turned 70-1/2, then the beneficiaries have three options. First, you can take a lump-sum distribution of the entire amount. In that case, you'll pay taxes on the distribution if it's a traditional IRA, but there won't be any 10% penalty because the payment is made due to the death of the deceased accountholder.

Second, you can use what's known as the five-year method, in which you transfer the deceased accountholders IRA into an inherited IRA account, and then are required to take out all of the inherited IRA's assets within five years of the date of death.

Finally, you can do the same transfer to an inherited IRA, but take distributions based on your life expectancy, with the requirement that you withdraw a certain percentage of the IRA assets every year until the account is depleted. This third method, which is sometimes known as a stretch IRA, maximizes the amount of tax deferral you get; but you have to be careful and follow the required distribution rules each and every year in order to avoid potential penalties.

If the deceased accountholder had already turned 70-1/2, then the five-year option goes away. You can still use either the lump-sum method or the stretch IRA method, though, which covers most of the situations that people want.

3. You can always take bigger withdrawals from stretch IRAs if you need to.
The biggest benefit of the stretch IRA method is that you retain full flexibility with the account assets. You must take the required minimum distribution, but you're not limited to that minimum amount. If you want, you can take out every remaining penny.

That flexibility lets you do some valuable tax planning. With traditional IRAs, because withdrawals add to your taxable income, it makes the most sense to withdraw money when you're in a low tax bracket. So if you have a year with low income, you might want to boost your inherited IRA withdrawal above the required minimum amount just to save on taxes down the road.

Inherited IRA rules can be complicated, and it's easy to get confused with all the intricacies involved. Nevertheless, it's important to follow all the right steps to make sure that you get the full benefit of the IRA assets you inherit.

For even more on IRAs, head over to the Fool's IRA Center. We'll answer your questions and even help you get started investing.