This is a post from staff writer Robert Brokamp of The Motley Fool. Robert is a Certified Financial Planner and the adviser for The Motley Fool’s Rule Your Retirement service.

Financial success can be due to making good decisions or avoiding big mistakes. In many cases, the biggest mistakes happen after good decisions, because the stakes have become higher.

As an example, let’s consider the dilemma of Motley Fool reader Jim, who emailed us this question: “Did I make a substantial error when taking money out of my IRA?”

To help answer that question, Jim sent along some details:

  • He’s retired.
  • His IRA was worth $325,000.
  • He couldn’t get a mortgage.
  • He used $150,000 of his IRA to buy a house.
  • He receives $24,000 annually from Social Security.

Now, that’s not all the information we’d need to determine whether he treated his IRA with TLC. But from what he told us, I’m going to make an initial diagnosis: He made a few mistakes.

As a cautionary tale for all us retiree wannabes, let’s take a look at some important lessons from Jim.

Lesson #1: Crunch your numbers before you retire

The good thing that Jim did was save for retirement. In fact, he had a bigger nest egg than most retirees, according to the Employee Benefit Research Institute’s 2012 Retirement Confidence Survey. Only 15 percent of the participating retirees reported having more than $250,000 saved up.

Unfortunately, being significantly above average still may not be good enough, especially since it’s my opinion — based on studies and anecdotal evidence — that too many people retire too early. (NPR’s series about Americans working longer mentioned a woman in her 90s who had to go back to work.) Having more than most retirees may be like being one of the best players on the practice squad.

Determining whether you have enough to retire can be a complicated analysis, perhaps best done by paying a fee-only financial planner who charges by the hour or by the project — such as many of the folks in the Garrett Planning Network — to help with the ‘rithmetic. However, for the purposes of this article, we’ll use the 4 percent withdrawal rate rule: a rule of thumb that says retirees should withdraw no more than 4 percent of their portfolio in the first year of retirement, and then adjust that amount every subsequent year for inflation. (There’s plenty of debate about whether 4 percent is actually best number, but it’s good enough for this discussion.) So, 4 percent of Jim’s $325,000 IRA is $13,000. Add it to Social Security, and he has income of $37,000.

But wait! He no longer has $325,000. That’s because he didn’t know about Lesson #2, which is…

Lesson #2: Get a mortgage before you retire

Ideally, you kill your mortgage (after all, “mort” is “death” in Latin, and the “gage” part means “pledge”) before you quit your job. However, if you’re in the position of needing a mortgage in your 60s, you’ll be more likely to get one while you’re still working because you’re still earning a paycheck and likely have a higher income. Also, it’s against IRS rules to use an IRA as collateral for a loan.

Lesson #3: Avoid large traditional IRA distributions

Unfortunately for Jim, he didn’t get a mortgage, so he made a $150,000 withdrawal from his IRA. Assuming this is a traditional tax-deferred IRA, that withdrawal was taxed as ordinary income — likely vaulting him from the 15 percent tax bracket to the 28 percent tax bracket. Thus, to have $150,000 to spend on a house, he likely would have withdrawn something closer to $180,000 to cover both the price tag and tax tag.

All still may not be lost

Assuming Jim has $145,000 left in his IRA (i.e., he withdrew $180,000 from the $325,000 he had), applying the 4 percent rule of thumb to that amount (resulting in $5,800), and adding that to his Social Security ($24,000) gives Jim an estimated annual income of approximately $29,800. According to the Department of Labor’s 2010 Consumer Expenditure Survey, the average household led by someone age 65 or older has annual expenditures of $36,802. Jim might be OK if he keeps his retirement modest; he doesn’t have a mortgage, so he just needs to worry about maintenance as well as food, utilities, transportation, taxes (which will be low for him going forward), and health care (not so low, and growing). Also, if he needs extra funds, he can get a reverse mortgage, which could add another few thousand dollars of annual income, depending on his age. However, this doesn’t leave much room for unexpected big-ticket home repairs or health repairs.

Even though he’s retired, it’s not too late for Jim to crunch his numbers to determine whether he can be reasonably sure that his portfolio will last the rest of his life. If it looks like that isn’t likely, then he has to change one of the key variables – income (i.e., go back to work), expenses (lower them further), or life (shorten it — the least-attractive option). Even working for a few more years, even part-time, can have a powerful impact on your retirement security. And it’s better to do it now rather than wait until your 90s.