Tapping IRA or 401(k) can be taxing affair

July 1 was an important anniversary for some Americans – the day the first baby boomers turned 59 1/2.

After passing this milestone, you can withdraw money from a traditional IRA, a 401(k) or similar tax-deferred plan without paying the 10 percent penalty on “early” withdrawals.

Should you start tapping these accounts?

Not unless you really, really have to.

The rule of thumb is to keep money in these tax-deferred accounts as long as possible, to supercharge your investment compounding. Unlike ordinary taxable accounts, there are no taxes in these accounts until money is withdrawn. By postponing tax payments, money you’ll eventually use for taxes will have more time to grow.

If you do have to tap your investments, it’s probably better to take money from any ordinary taxable accounts first.

Of course, financial matters are rarely this simple, so it pays to keep a few things in mind.

First, when you eventually do withdraw money from traditional IRAs, 401(k)s and similar retirement accounts, the money is taxed at a pretty high rate – your regular income tax rate. Depending on your income, that ranges from 10 percent to 35 percent.

This applies to any money in the account that was not already taxed – dividends, interest and the profit if the price of the stock or mutual fund rose while you owned it.

Also, if your contributions weren’t taxed when you put the money in the account, they are taxable at withdrawal.

For most people, in other words, every dollar withdrawn from a 401(k) is taxed as income.

The rules are the same for traditional IRAs – except contributions that were taxed when you put the money in are not taxed again.

Taxes can be much lower in “taxable” accounts, though they may not be postponed as long. Dividends and long-term capital gains are taxed at 15 percent for most investors, and only 5 percent for those with low incomes.

So imagine you’re in the 25 percent income tax bracket. Withdraw $10,000 from your 401(k) and you’d pay $2,500 in tax. Take the same amount from a taxable fund full of long-term capital gains and you’d probably pay no more than $1,500.

In fact, you might pay less, since the tax applies only to profits, not the money originally invested in the account. Suppose you’d originally invested $3,000 and it grew to $10,000. If you withdrew it all, the tax would apply only to the $7,000 gain, so the bill would be just $1,050.

To manage these accounts most profitably, you also should consider your future tax bracket. If you thought, for example, that your income would go up in retirement and push you into a higher bracket, it might pay to turn the rule of thumb upside down.

By taking money from your IRAs and 401(k)s in the early years of retirement rather than waiting, you’d pay tax at a lower rate.

Then you could reinvest any of the proceeds you didn’t need right away, perhaps choosing a fund that would be taxed at the low long-term capital gains rate.

Not many people expect their incomes to rise as they move through retirement. But the government could raise tax rates. Indeed, many of the tax cuts implemented several years ago are set to expire in 2011 unless Washington extends them.

These issues are so complicated, and the stakes so high, that anyone approaching retirement should consider getting professional advice.

I prefer the “fee-only” advisers who charge a flat rate or hourly fee. Steer clear of advisors paid through commissions or who will manage your accounts for an annual percentage of your assets.

To find a fee-only adviser, contact the National Association of Personal Financial Advisors at (800) 366-2732 or www.napfa.org.