Free date and time calculators

DateMath adds or subtracts days from a date, counts the days between two dates, and works out durations, hours worked, ages, business days and week numbers by the Gregorian calendar, ISO 8601 and the US federal holiday law, and counts down to any date, holiday or length of time. Free, instant, and nothing to sign up for.

Pick a start date and a whole number.

Worked examples and answers on the date calculator page.

All date and time tools

Each tool runs in your browser: the calculators update as you type, and the countdowns tick live.

Which calculator answers your question

Most date questions start from one of two things: a date you want to move from, or two dates you want to compare. Times, hours worked, ages, workdays and week numbers each add a rule of their own, so each has its own calculator.

Your questionCalculator
What date is 90 days from today, or 6 months before a deadline?Date Calculator
How many days are there between two dates?Date Calculator
How long is it from 9:00 on Monday to 17:30 on Wednesday?Date Duration Calculator
What time will it be 8 hours and 45 minutes after 10:30 PM?Time Calculator
How many hours is a shift from 10:00 PM to 6:30 AM with a 30-minute break?Hours Calculator
How many hours did I work this week, and what is my gross pay?Time Card Calculator
What is 7 hours 45 minutes in decimal hours, and 7.3 hours in minutes?Hours to Decimal Calculator
How old am I in years, months and days, and when is my next birthday?Age Calculator
What date is 10 business days from now, and how many workdays are left this month?Business Days Calculator
What week number is it, and which dates belong to week 27?Week Number Calculator
How long is left until my wedding, a trip or midnight, to the second?Day Countdown
Can I set a 10-minute timer with an alarm?Countdown Timer
How many days until Christmas?Christmas Countdown
How long until midnight on New Year's Eve?New Year Countdown
How many days until Halloween?Halloween Countdown

What DateMath does

DateMath is a set of focused calculators for the date and time questions that come up in work and everyday life: deadlines, notice periods, trips, shifts, ages, payroll weeks and project schedules. Each page does one job, shows the answer as you type, and explains the rule behind the number, so you can check the result against a contract, a policy or a spreadsheet.

  • Answers as you type. There is no calculate button. Change a date or an amount and the result updates at once, together with the same span in other units: weeks and days, years, months and days, and business days.
  • Runs in your browser. The math is done on your device. The dates you enter, including a date of birth, are not sent to us.
  • Shareable calculations. Every tool with inputs has a copy-link button ("Copy a link to this calculation", or to this countdown or timer) that opens the same tool with the same inputs, to send to a colleague or keep with your notes. The holiday countdowns have no inputs and need none.
  • Worked examples on every page. Each tool page shows examples on fixed dates, computed with the calculator's own code, so the page and the calculator can never disagree.
  • Free, with nothing to install. No account and no sign-up; it works the same on a phone and on a desktop.

How the date math works

Date math looks simple until months, leap years, weekends and week numbers come in. These are the rules every DateMath calculator follows, with the cases where calculators most often disagree.

Days between dates: the difference, or both ends

DateMath counts the difference between the two dates: the days after the start date up to and including the end date. From Monday, March 1, 2027 to Friday, March 5, 2027 is 4 days. That is what you want for "how long until" and for most deadlines. When both the first and the last day count, as for the days of a trip, a course or a leave, tick the box that counts both ends, and the same span becomes 5 days. Disagreements between calculators of exactly one day almost always come from this choice.

Months and years keep the day number

Adding a month moves to the same day number in the next month, whatever its length. When that day does not exist, the result is the last day of the month: January 31 plus one month is February 28, 2027, and in a leap year February 29, 2028. Years work the same way, so February 29 plus one year is February 28. This is also how Excel's EDATE function behaves. Weeks are different: they are always 7 days, so 4 weeks is 28 days, not a month.

Leap years follow the Gregorian rule

A year divisible by 4 is a leap year, except century years, which are leap years only when divisible by 400. So 2000 was a leap year and 2100 will not be. Every count that crosses a February 29 includes it, and an age or a duration that crosses one is still measured in calendar months and days, not in averaged years.

Business days skip weekends and US federal holidays

A business day is a weekday that is not a holiday. DateMath skips the 11 annual US federal holidays on the days they are observed: a holiday on a Saturday is observed on the Friday before, one on a Sunday on the Monday after. In 2027 that leaves 249 business days. You can switch the holidays off to count weekdays only, for example when your office has its own calendar.

Week numbers: ISO 8601 and US

The international ISO 8601 standard starts weeks on Monday and makes week 1 the week that contains the year's first Thursday. Early January can therefore belong to the previous year: Friday, January 1, 2027 is in ISO week 53 of 2026. The US system starts weeks on Sunday and always puts January 1 in week 1. The week number calculator shows both.

Times are clock times

Dates and times are plain calendar dates and clock times, without a time zone. A link therefore gives every visitor the same answer, wherever they open it. The one thing this leaves out is daylight saving time: across the night the clocks change, the real elapsed time is one hour shorter or longer than the clock difference shown. The countdowns are the exception: they count the real time left until your own clock shows the target, so that hour is included.

Why DateMath's answers are right

You can check every answer DateMath gives: it follows published standards, handles the cases where calculators most often disagree by a stated rule, and is tested against answers worked out by hand.

The standards DateMath follows

  • The Gregorian calendar. DateMath treats every date as a Gregorian date, with its leap-year rule: a year divisible by 4 is a leap year, except century years not divisible by 400, so 2000 had a February 29 and 2100 will not. Source: Gregorian calendar.
  • ISO 8601 week dates. DateMath numbers weeks by ISO 8601: weeks start on Monday, week 1 is the week with the year's first Thursday, and a year has 52 or 53 weeks. Source: ISO 8601.
  • US federal holidays. DateMath skips the 11 annual holidays of 5 U.S.C. 6103 on the days they are observed for federal employees, as the US Office of Personnel Management (OPM) lists them: a Saturday holiday on the Friday before, a Sunday holiday on the Monday after. Source: 5 U.S.C. 6103, OPM federal holidays.
  • US hours-worked rules. DateMath counts exact minutes and subtracts only the breaks you enter. The federal Fair Labor Standards Act rules count rest breaks of about 5 to 20 minutes as work time but not bona fide meal periods (ordinarily 30 minutes or more), and allow rounding clock times to the nearest 5 minutes, tenth or quarter of an hour only if employees are still paid for all the time they work. Source: 29 CFR 785.18, 29 CFR 785.19, 29 CFR 785.48.
  • Your device's local time. DateMath's countdowns read the current time from your device and count to the target in your own time zone. In the US, the standard time zones are set by 15 U.S.C. 261 and daylight saving time by 15 U.S.C. 260a (from 2:00 AM on the second Sunday in March to 2:00 AM on the first Sunday in November); your device applies them. Source: 15 U.S.C. 261, 15 U.S.C. 260a.

The edge cases DateMath handles

  • Month ends: When the target month is shorter, DateMath moves to its last day: January 31 plus one month is February 28, or 29 in a leap year, and March 31 minus one month is February 28.
  • Leap days: Every count that crosses a February 29 includes it, 1900 had none, and a February 29 birthday is counted on February 28 in common years.
  • Holidays on weekends: A Saturday New Year's Day is observed on December 31 of the year before, so DateMath skips that Friday in the old year's count.
  • Holidays added by law: Juneteenth is counted from 2021 and Martin Luther King Jr. Day from 1986, the years they were first observed.
  • Weeks across New Year: January 1 to 3 can belong to ISO week 52 or 53 of the year before, and December 29 to 31 to week 1 of the next year.
  • Times past midnight: 8:00 PM plus 8 hours is 4:00 AM the next day, and 90 minutes or 36 hours roll over into the next unit.
  • Night shifts: An end time earlier than the start is on the next day, so 10:00 PM to 6:30 AM is 8 hours 30 minutes worked, never a negative number.
  • Decimal hours: Decimal hours are minutes divided by 60, so 7 hours 18 minutes is 7.3 hours, not 7.18, and DateMath adds exact minutes before it rounds.
  • Spans that run backward: When the end is before the start, DateMath gives a negative count instead of an error.
  • Daylight saving: The calculators' times are clock times without a time zone, so a shared link gives everyone the same answer. DateMath doesn't add or remove the hour the clocks move, and the time and duration pages say how that changes the real elapsed time.
  • Countdowns and time zones: A countdown ends when your own clock shows the target, so a New Year countdown reaches zero at your local midnight, and a shared countdown counts to the same clock time in each viewer's zone. The time left is real time: it never jumps when the clocks change, and across a daylight saving change it is one hour more (fall) or less (spring) than the clock difference.

How DateMath is tested

DateMath's date math is tested against more than 100 cases worked out by hand. Every worked example and table on the site is computed with the same code the calculators run, so a page and its calculator can't disagree. If a result still looks wrong to you, send the link to the calculation to hello@datemath.app.

Date math at a glance

The numbers that most date questions come back to.

UnitLength
A week7 days
A common year365 days = 52 weeks and 1 day
A leap year366 days = 52 weeks and 2 days
A month28 to 31 days (February has 28, or 29 in a leap year)
Leap years from 2024 to 20402024, 2028, 2032, 2036, 2040
The Gregorian 400-year cycle146,097 days = 20,871 weeks, 97 leap years
An ISO week-numbering year52 or 53 weeks
US business days in 2027249 (weekdays minus the observed federal holidays)

Because a common year is 52 weeks and 1 day, a date falls one weekday later each year, and two weekdays later after a February 29. And because the 400-year cycle is a whole number of weeks, the Gregorian calendar repeats exactly every 400 years.

Where date calculations come up

  • Deadlines and notice periods: 30 days from an invoice date, 10 business days to respond, a notice period of 3 months. Check whether the rule counts calendar days or business days, and whether the first day counts.
  • Planning and countdowns: the days until a trip, a wedding or a launch, the date 90 days after a start, the weeks left in a quarter, a live day countdown to any date, and a countdown timer for a set length of time.
  • Work and payroll: the end of a shift that runs past midnight, the hours worked in a shift or a week, decimal hours for a timesheet, the workdays in a month, the ISO week number on a timesheet or a production plan.
  • Ages and anniversaries: an exact age on a given date, the weekday someone was born on, the days to the next birthday or anniversary.

Frequently asked questions

Which calculator answers my date question?
It depends on what you know and what you want back. To move from a date by days, weeks, months or years, or to count the days between two dates, use the date calculator. For the exact time between two dates and times, use the date duration calculator; to add hours and minutes to a time, the time calculator. For the hours between two clock times, such as a shift, use the hours calculator, and for a week of shifts the time card calculator. Ages, workdays, week numbers and decimal hours each have their own calculator. To watch the time left tick down, use the day countdown for a date, the countdown timer for a length of time, or the Christmas, New Year and Halloween countdowns.
Why do date calculators sometimes disagree by one day?
Usually because one counts both the start and the end date and the other counts only the difference. From Monday to Friday is 4 days as a difference but 5 days if both Monday and Friday count. The other common causes are how a month is added to the 29th, 30th or 31st, which holidays a business-day count skips, and time zones. Every DateMath page states its rule, and the date calculator has a checkbox for counting both ends.
Why can't I just divide days by 30 to get months?
Because months are 28 to 31 days long, so a fixed 30-day month drifts from the calendar within a few months. A calendar month runs from a day number to the same day number in the next month, whatever its length. DateMath counts whole calendar months first and gives the rest in days, so the result matches what you would count on a wall calendar.
How long is a year in days?
365 days, or 366 in a leap year. In the Gregorian calendar 97 of every 400 years are leap years, so the average year is 365.2425 days, and every 400 years the calendar repeats exactly: 146,097 days, which is exactly 20,871 weeks.
Why does a date fall on a different weekday each year?
Because 365 days is 52 weeks and 1 day, so a date moves one weekday later each year, and two weekdays later when a February 29 falls in between. A date that is a Friday this year is a Saturday next year, unless a leap day comes first.
Can I rely on the results for legal, contract or payment deadlines?
The results follow the counting rules stated on each page, but a deadline is set by its own rules: whether it counts calendar or business days, whether the first day counts, and which holidays apply. Check those in the contract, court rule or policy, then set the calculator to match. DateMath does not give legal advice.
Do the calculators work on a phone?
Yes. Every calculator works in a mobile browser and uses your phone's own date and time pickers. Once a page has loaded, its calculations run on the device, and the dates you type are not sent to us.
Is a calculator I need missing?
Write to hello@datemath.app with the question you were trying to answer. The calculators today cover adding and counting dates, durations, times, hours worked, decimal hours, ages, business days, week numbers and countdowns.

More answers in the FAQ and on the about page.