That $1 million in your 401(k) account looks mighty good. It’s more than you’ve ever had in your life, and that money will fund your retirement. But it’s not quite yours. Your retirement account is tax-deferred, not tax-free. And Uncle Sam hasn’t been paid yet.

“Some people have this notion that when they retire, they don’t have to pay taxes,” says Nicolas Abrams, president of AJW Financial Partners in Baltimore. “I don’t know who started that rumor, but I have to dispel that myth.”

Income tax is due on each traditional 401(k) and IRA withdrawal. Traditional retirement account distributions are taxed at ordinary income tax rates, not the typically lower long-term capital gains rates, regardless of the investments held within the account. If you’re younger than age 59 1/2, there is typically an additional 10 percent early withdrawal penalty. “Not only can they trigger tax, if they are in an IRA and under 59 1/2, unless they have an exception, there is also a 10 percent penalty,” says Mike Piershale, president of Piershale Financial Group in Barrington, Illinois.

Some people want to take a large 401(k) or IRA withdrawal to pay off a mortgage or other debt. Financial planners and accountants often caution against taking a big distribution in a single year because it can trigger a huge tax bill and even push you into a higher tax bracket. Abrams says he frequently gets calls from potential clients about to retire who want to take a large withdrawal from their 401(k), 403(b) or Thrift Savings Plan for government employees. “One of the things they want to do is take part of the money and pay off their mortgage,” Abrams says. “If you owe $200,000 on your house, that whole $200,000 in your account will be counted as income and you will be in a high tax bracket. It will cost $50,000 to $100,000.”

Abrams says there are better ways to pay off your mortgage than taking a large 401(k) withdrawal in a single year. “We sit down and let them see how we can create an income stream that will pay their mortgage,” Abrams says. “They are using income to pay off the mortgage and are not getting hit with that huge tax bill.”

Some people consult financial experts only after they’ve taken a large 401(k) or IRA withdrawal and realize that they will face major tax consequences. “They usually come to me after they made a mistake to figure it out,” Piershale says. “They pulled money out and didn’t think about the tax or penalty. If they are in the 24 percent tax bracket, they will lose 24 percent of the withdrawal, and then another 10 percent penalty.”

Consulting a financial planner or accountant in advance of a retirement account withdrawal can help you to minimize taxes on the transaction. “When you’re dealing with a pre-tax retirement account, especially accounts like a 401(k), 403(b) or IRA, we tell (clients), ‘Don’t touch it until you call us,'” Piershale says. “If you handle it wrong, you can trigger unnecessary tax losses.”

You need a plan to pay taxes on a retirement account distribution before initiating the withdrawal. Harvey Bezozi, a financial planner, accountant and founder of Your Financial Wizard, a tax consulting firm in Boca Raton, Florida, says if the tax is not withheld at the source, you could trigger additional penalties if the tax is not paid on time. He often tries to negotiate tax relief for clients. “I will look at what happened, assess the situation and determine how the IRS calculated the regular income tax and the penalty on that,” Bezozi says. “Then I make a determination if any of the penalty can be reduced due to a hardship withdrawal or potential first-time penalty abatement or abatement due to a reasonable cause.”

People who inherit retirement accounts can also be hit with expensive tax bills if they withdraw the money all at once. “I’ve seen a young person in their 30s receive a half million dollars in an IRA,” Piershale says. “They want the money now. They pull it out. It throws them into a higher tax bracket. They end up losing 40 percent in taxes.” Those who inherit tax-deferred dollars in a retirement account can minimize taxes by putting the money in an inherited IRA and more gradually drawing down the balance.

Large retirement account withdrawals can also impact your Medicare premiums. Each 401(k) and IRA distribution is considered income for tax purposes, and high income retirees are subject to more expensive Medicare premiums. “For that next year, they have to pay higher Medicare premiums because they crossed a certain (income) threshold,” Abrams says.

The timing of your retirement account withdrawals can play a big role in how heavily your distributions are taxed. “Before you make any decision, talk to a financial professional and your tax professional as well. Bring your team to the table to see how to work this out,” Abrams says. “You have spent a lifetime building up this money. Having a team in place to work out a strategy can help you and help save your retirement.”