Skip to content
TinySolve

Date Difference Calculator

How long between two dates — in years, months, days, and working days.

Runs in your browser — nothing you type is sent anywhere

Fill in the fields above

Pick two dates and you get the gap in years, months and days, plus the totals in weeks, days and working days.

About the Date Difference Calculator

Counting days by hand goes wrong in predictable ways: months have different lengths, February occasionally has an extra day, and it is never obvious whether the answer should include the day you started on. This does the arithmetic and shows the result several ways, because which one you want depends on why you are asking.

The years-months-days breakdown is how people describe a span in conversation. The total in days is what a deadline or a notice period needs. Working days matter for anything measured in business terms, and are counted properly rather than by dividing by seven.

The option to count both end days deserves its own mention, because it is where most disagreements come from. Monday to Friday is four days of elapsed time and five days at work. A hotel booking from the first to the fifth is four nights. Neither is wrong; they are answers to different questions, so the tool lets you pick.

Leap years are handled correctly, including the century rule that makes 1900 an ordinary year and 2000 a leap one. All the arithmetic runs in UTC, which avoids a subtler bug: subtracting local timestamps across a daylight saving change gives a period of 23 or 25 hours and can silently lose or gain a whole day.

Working days count every day that is not a Saturday or Sunday. Public holidays differ by country, state and year, so they are not deducted — subtract the ones that apply to you.

How to use the Date Difference Calculator

  1. Pick the first date

    Anything from a birth date to a project start. The day of the week is shown so you can check it.

  2. Pick the second date

    Either order works — the answer is the same span whichever way round you enter them.

  3. Decide whether both ends count

    Leave it off for elapsed time, turn it on for leave days, notice periods and hotel bookings.

  4. Read whichever total you need

    Years and months for conversation, days for a deadline, working days for anything measured in business terms.

Frequently asked questions

Should I count the first and last day?
It depends what you are counting. Monday to Friday is four days of elapsed time and five days at work. Leave, notice periods and hotel bookings usually count both ends; a deadline usually does not. The checkbox lets you answer either question.
How are working days counted?
Every day that is not a Saturday or Sunday, counted individually rather than estimated by dividing the total by seven — which is off by up to two days depending on which day the range starts on.
Are public holidays excluded?
No, because they differ by country, by state and by year, and guessing would be worse than leaving them out. Subtract the holidays that apply where you are.
Does it handle leap years?
Yes, including the century rule: 2000 was a leap year and 1900 was not. A span across 29 February is one day longer, and the total reflects that.
Why do the months not divide evenly into the days?
Because months are not all the same length. The years-months-days breakdown walks the calendar forward month by month, which is how people count, so it will not equal the total days divided by thirty.