As if saving for retirement wasn’t a big enough worry, once you are enter your golden years it’s a good idea to educate yourself on taxes and how to time your withdrawals.

IRS rules state that you have to start withdrawing from your retirement accounts no later than age 70 1/2, which are known as “required minimum distributions.” These RMDs apply to almost all individual retirement accounts and work-based accounts like your typical 401(k)s, or the less common 403(b) plans.

“They’ve allowed you to defer taxes, but they need to come collecting at some point,” Nerdwallet’s Arielle O’Shea said, according to CNBC.

Roth IRAs aren’t taxed like other retirement accounts because they are funded after taxes. But an inherited Roth IRA will be subject to a levy.

Deadlines are important to know, as well. In most cases, the first mandatory withdrawal happens on April 1 the year after you hit 70 1/2. The deadline in years following is Dec. 31.

And while there are some workarounds for your 401(k) if you are still working, retirement savings expert Ed Slott says the “break never applies to your IRA, even if you’re still working.”

So how do you find out what you owe?

Basically, you take your account balance at the end of the last year and divide it by a certain number based on your age. There are tools like NerdWallet’s RMD calculator that can help you out because it does get complicated.

O’Shea says your IRA administrator can be a big help, too, and they can even set up a distribution schedule.

“It’s much easier to factor these RMDs into your income that way, and you’re not scrambling to meet the deadline — or risking forgetting,” she said.

Getting it wrong hurts, too. The IRS can nail you with a 50% tax on what you should have withdrawn if you mess it up. But you may be able to get out of it by filling out Form 5329 and explaining briefly why you missed the deadline.

Slott warns not to take too long on this, though: “You must make it up as soon as you discover the error.”