Most people think of April 15 as tax day -- the day on which they have to either file their tax returns for the year or request an extension. But as you get ready to prepare your 2017 tax return, you might get a pleasant surprise: You'll have another couple of days beyond April 15 to get everything done.

When are my 2017 taxes due?

Tax day for 2017 tax returns will be on April 17, 2018. That extension applies not only to the date on which you need to file your return but also to certain other tax laws tied to that date. For instance, if you want to make an IRA contribution for the 2017 tax year, you'll also have that extra two days to complete your transaction and still be treated as having done it in a timely manner.

Old-style metal alarm clock with bells on top of a table, in front of piles of coins and TAX refrigerator magnets.

Image source: Getty Images.

Why is tax day April 17?

In an era of electronic filing, it might not seem to make much sense that tax day would ever be on a day other than April 15. Yet much of the financial system still operates on a weekday schedule, and the IRS deadlines still acknowledge the reality that transacting business on weekends is challenging.

By law, filing and payment deadlines that apply to federal taxes and are on Saturdays, Sundays, or legally recognized holidays are treated as having been satisfied if they're met on the following business day. In 2018, April 15 falls on a Sunday, and so that law applies to push the filing deadline to the following day.

So why isn't tax day on April 16? At first glance, that would seem to be the most likely candidate, because April 16 is a Monday and not a federal holiday. However, an obscure law says that any holiday that the District of Columbia observes is treated as if it were a nationwide holiday for tax filing purposes. In the nation's capital, residents will celebrate April 16 as Emancipation Day in 2018, the day on which 3,100 individuals in Washington were freed from slavery. Therefore, tax returns aren't due until the following day, Tuesday, April 17.

How late can tax day go?

Two days might seem generous as an extension on tax returns, but occasionally, taxpayers have gotten an even bigger break. For instance, in 2017, tax day was April 18. That occurs in any year that April 15 falls on Friday or Saturday. If the 15th is Friday, then it's when Washington celebrates Emancipation Day, and so the following Monday becomes tax day. If the 15th is Saturday, then Emancipation Day occurs on Monday the 17th, and the following Tuesday the 18th becomes tax day.

Taxpayers in Massachusetts and Maine can sometimes have a tax day as late as April 19. The third Monday of April is celebrated as Patriot's Day in those two states, commemorating the battles of Lexington and Concord that started the Revolutionary War. When tax day for the rest of the country is Monday, April 18, then residents of Massachusetts and Maine get an extra day because of the local holiday. However, unlike the manner in which the District of Columbia's holiday is applied nationwide, the Patriot's Day holiday doesn't apply to taxpayers outside those two states.

Get ready for taxes!

There are many reasons why you won't want to let your tax return preparation go anywhere near the tax day deadline. Waiting until April 17 to file means waiting well beyond that to get any tax refund that you might have coming. Still, for the millions of procrastinators among us, those extra two days beyond April 15 might come in handy.