If you’re planning for retirement, it’s easy to get sucked into focusing on the “magic number” you think you’ll need to finally stop working and live comfortably.

In fact, you could spend so much time running calculators and constructing spreadsheets to optimize your nest egg that you completely neglect another key element of retirement: withdrawals.

How you draw down your nest egg could be just as crucial as how you build it. A poorly constructed or complacent withdrawal strategy can end up costing you hundreds of thousands of dollars over the course of your golden years.

With that in mind, here are the top three mistakes most retirees make when withdrawing their assets.

A simple retirement plan involves selling some assets or collecting dividends from your portfolio to meet living needs. However, this approach exposes you to what T. Rowe Price describes sequencing risk. (1)

Put simply, this is the risk that the stock market experiences a major correction early in your retirement, which can permanently leave you with less retirement income.

Let’s say you have a $1 million retirement portfolio and you sell 5% of it, raising $50,000, to meet living expenses for the first year of retirement. If your portfolio gains 5% in value that year, you have effectively offset your withdrawal.

However, if the portfolio loses 5% of its value during this first year, you have diminished your nest egg by roughly 10% overall (withdrawal + market loss).

One way to mitigate this issue is to keep some portion of your portfolio in cash or short-term bonds to meet short-term needs. You can rely on this cash buffer when the market is down, your investments have lost value and selling them is a bad idea.

When the market and prices recover, you can then sell some investments to replenish this cash buffer.

The 4% rule for withdrawals is incredibly popular, but also widely misunderstood. That’s according to William Bengen, the creator of the rule itself. (2)

Bengen explains that the 4% rule was never meant to be a rigid withdrawal limit. Instead, he considers it a starting point — an initial withdrawal rate for the first year of retirement. After that, he encourages retirees to adjust their rate higher or lower to account for market performance and the impact of inflation.

Put simply, to ensure the longevity of your nest egg, you need to adopt a flexible and dynamic approach to withdrawals.

Read More: Vanguard reveals what could be coming for U.S. stocks, and it’s raising alarm bells for retirees. Here’s why and how to protect yourself

Minimizing taxes and maximizing investment returns are natural strategies when you’re building up a robust nest egg. However, in retirement, these techniques could backfire.

That’s because of the required minimum distribution (RMD) law. Once you reach a certain age, you’re required to withdraw a minimum amount of money annually from certain retirement accounts, like Traditional IRAs, SEP IRAs, SIMPLE IRAs, and qualified employer-sponsored plans like 401(k)s.

This law exists to ensure taxes are eventually paid on the tax-deferred growth in retirement accounts, and the age it kicks in depends on when you were born. It’s 73 for those born between 1951 and 1959, and 75 for those born in 1960 or later.

If you retire at 63, you have roughly a decade before you’re required to take minimum withdrawals. If you focus on minimizing taxes, your retirement accounts could balloon and create a larger tax liability later. When you turn 73, or 75 if you were born in 1960 or later, these RMDs are beyond your control.

You can mitigate this by strategically harvesting capital gains and implementing Roth conversions before you hit the RMD age threshold.

Put simply, instead of thinking of taxes as something you should always defer, think of them as a cost you can minimize by spreading them across several years.

We rely only on vetted sources and credible third-party reporting. For details, see our editorial ethics and guidelines.

T. Rowe Price (1); CNBC (2).

This article provides information only and should not be construed as advice. It is provided without warranty of any kind.