Are you going to have to pay taxes on your retirement income? The answer to this depends where you live and what sources of income you have.

Social Security is a primary source of income for most retirees -- and if you live in the vast majority of locales in the U.S., your state won't tax you on it. However, the federal government might tax you, depending how much you earn.

Older couple with calculator and financial paperwork.

Image source: Getty Images.

There are 37 states that don't tax Social Security benefits

No matter how much your Social Security benefits are or what other income you have coming in, 37 states won't tax any of it. Washington, D.C. isn't a state, but also doesn't tax Social Security benefits.

This means you can enjoy Social Security benefits free of state taxes if you live in Alabama, Alaska, Arizona, Arkansas, California, Delaware, Florida, Georgia, Hawaii, Idaho, Illinois, Indiana, Iowa, Kentucky, Louisiana, Maine, Maryland, Massachusetts, Michigan, Mississippi, Nevada, New Hampshire, New Jersey, New York, North Carolina, Ohio, Oklahoma, Oregon, Pennsylvania, South Carolina, South Dakota, Tennessee, Texas, Virginia, Washington, Washington D.C., Wisconsin, or Wyoming.

You may still end up paying federal tax on your benefits if your income exceeds a certain threshold. Income for purposes of determining if you'll pay federal tax equals all your taxable income from other sources, some non-taxable income, plus half your Social Security benefits.

If your income by that definition is at least $32,000 if you're married filing jointly or $25,000 for all other filing statuses, up to 50% of your Social Security benefits could be taxed by the federal government. If your combined income jumps to $44,000 for married joint filers or $34,000 for others, up to 85% of benefits could be taxed.

Some states also don't tax pensions

While it's increasingly rare for workers to retire with a defined benefit pension -- a pension that provides guaranteed income from an employer -- many government workers, most members of the military, and some private sector workers do receive retirement income from this source.

If you're getting a pension, you may prefer to live in one of the locales where pension income isn't taxed. These include Alaska , Florida , Illinois , Mississippi , Nevada , New Hampshire , Pennsylvania , South Dakota , Tennessee , Texas , Washington, and Wyoming .  

Other states limit taxes on pensions or exempt certain types of pensions from being subject to tax, such as military pensions or government pensions. These include Alabama, Arkansas, Colorado, Delaware, Georgia, Hawaii, Iowa, Kentucky, Louisiana, Maine, Maryland, Michigan, Missouri, Montana, New Jersey, New Mexico, New York, Ohio, Oklahoma, Oregon, South Carolina, Utah, Virginia, and Wisconsin

While your state my give you a break, the IRS generally taxes some or all money from a pension. Pension payments are fully taxed if you didn't contribute to the pension or annuity, your employer didn't withhold contributions from salary, and you received tax-free contributions to the pension. Pension payments are only partially taxable if you made contributions with after-tax dollars, as you aren't taxed on returns on your after-tax contributions.

Military retirement pensions based on length of service can also be subject to federal tax, although veterans' disability retirement benefits aren't.

And some states don't tax withdrawals from retirement accounts

If you have a Roth 401(k) or Roth IRA, money you take out of your account isn't subject to tax. But, if you make withdrawals from most other retirement accounts contributed to with pre-tax dollars -- such as traditional IRAs or 401(k)s -- you may be taxed on this money as ordinary income by the IRS.

Your state may or may not tax this income, depending where you live.

Alaska, Florida, Nevada, South Dakota, Texas, Washington, and Wyoming don't charge any state income tax, so you won't be taxed on distributions from retirement accounts if you live in these locales. The absence of a state income tax also explains why pension and Social Security benefits aren't taxed in these states.

Other states, such as Tennessee and New Hampshire, don't charge taxes on wage income but do impose tax on certain types of investment income.

And, finally, some areas treat distributions from retirement accounts differently than other income, with some places charging no tax on it and others allowing you to exempt large amounts of money.

For example, in Illinois, Mississippi, and Pennsylvania, you won't be taxed on any distributions from your retirement accounts, whereas in Colorado, Georgia, Kentucky, Michigan, Oklahoma, South Carolina, Virginia, and West Virginia, you can exempt a substantial amount of income from taxes. 

Choosing a tax-friendly state

If you have a choice of where to live as a senior, it makes senses to pick a tax-friendly state. After all, when you have a fixed income from Social Security, investments, and a pension, there's no sense in giving more of it to the government than necessary. 

Check out our guide to the 10 most tax friendly states for retirees to find the perfect place to put down roots as a senior if tax avoidance is part of your plan for making retirement savings stretch further.

The Motley Fool has a disclosure policy.