About DateMath
Date and time math, done in your browser
DateMath's free date and time calculators run in your browser: days added, subtracted or counted, ages, business days, hours worked, time zones and countdowns.
How DateMath counts
- Days between two dates
- The difference between the dates: the days after the start date up to and including the end date. A checkbox counts both ends where both the first and the last day count, as for a trip or an event.
- Days from today
- Today's date on your device is day 0 and tomorrow is day 1, so 30 days from today is the date after 30 midnights. Calendar days include weekends and holidays; business days from today skip weekends and US federal holidays and don't count today, like Excel's WORKDAY.
- Adding months and years
- The result keeps the start's day number. When the target month is shorter, it is moved to that month's last day, so January 31 plus one month is February 28, or 29 in a leap year. Spreadsheet functions such as Excel's EDATE do the same.
- Ages and durations
- Whole calendar months are counted first, then the remaining days (and, for durations, hours and minutes). Adding the result back to the start always lands on the end.
- Business days
- Monday to Friday, without the US federal holidays of 5 U.S.C. 6103. A holiday on a Saturday is observed on the Friday before and one on a Sunday on the Monday after, the rule for federal employees.
- Deadlines
- Court deadlines follow Federal Rule of Civil Procedure 6(a): the trigger day is left out, every day after it counts, and a last day on a weekend or federal holiday moves to the next court day, or to the court day before when the count runs back from a hearing. Invoice due dates add the net days to the invoice date, or to the end of its month for EOM terms, as calendar days.
- Hours worked
- The end time minus the start time; an end earlier than the start is on the next day, so a night shift needs no date. Only the unpaid break you enter is taken off, a week is the sum of its exact minutes, and decimal hours are minutes divided by 60, rounded to two places at the end. A shift ends after the hours to work plus the unpaid break, and amounts of time are added in seconds and carried at 60.
- Weekdays and calendars
- Every date from the year 1 to 9999 gets its weekday in the Gregorian calendar, numbered both ways: Sunday = 1 on US calendars, Monday = 1 in ISO 8601. Calendars and the holidays tool show each US federal holiday on its own date and on the day it is observed, from 1978.
- Birthdays and anniversaries
- Half, quarter and golden birthdays and anniversaries are whole months or years added to the date itself, so month ends follow the same rule as adding months, and a February 29 date falls on February 28 in common years. Hebrew birthdays come from the browser's Hebrew calendar data, and graduation years from the first fall a child is 5 by the cutoff date you enter.
- Julian dates
- The astronomical Julian Date counts days from noon UT on January 1, 4713 BC, the ordinal "Julian" date is the year and the day of the year (YYDDD), and Julian calendar dates are converted to Gregorian through the Julian Day Number, the same number for the same day in both calendars.
- Times
- Dates and times are calendar dates and clock times without a time zone, so a link gives everyone the same answer. Daylight saving changes are not applied.
- Time zones
- A time in one zone is turned into one moment and read on every other zone's clock, with the UTC offset each zone has on that date, from the IANA time zone database in your browser. Daylight saving is applied per date, a time the clocks skip is flagged, and a time they repeat is converted as the first of the two. The meeting planner counts an hour as inside someone's working day when the whole hour is, on their own clock.
- Countdowns
- A countdown subtracts the current time on your device from the moment your clock will show the target date and time, so it reaches zero then, in your own time zone; a release countdown runs to 12:00 AM on the date the publisher announced, from the publisher's own page. The season countdown runs to the moment of an equinox or solstice instead, the same instant everywhere, shown on your clock. The time left is real time, so a daylight saving change in between adds or takes away its hour instead of making the count jump. The countdown timer measures a length of time against the clock, so it stays exact in a background tab.
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 observances set by law. DateMath dates a selection of the national observances Congress has designated in Title 36 of the US Code, such as Flag Day, Mother's Day and Patriot Day, by the rule each one's section gives, Election Day by 2 U.S.C. 7, Tax Day by 26 U.S.C. 7503 (April 15, moved past a weekend or a Washington, D.C. holiday) and the daylight saving time changes by 15 U.S.C. 260a. These are days of note, not days off. Source: 36 U.S.C. chapter 1, 26 U.S.C. 7503.
- The date of Easter. DateMath computes Easter Sunday with the Gregorian computus, the church's tables in arithmetic form: the first Sunday after the church's full moon on or after March 21, so between March 22 and April 25. Mardi Gras, Ash Wednesday, Palm Sunday and Good Friday are counted from it, and Orthodox Easter uses the same rule in the Julian calendar. Source: Date of Easter.
- Equinoxes and solstices. DateMath takes the moment of each equinox and solstice from the US Naval Observatory's table, in UTC to the minute. The holidays by date tool dates it on the US Eastern clock, and the season countdown shows it on your own clock. Near midnight the date differs between time zones. Source: USNO Earth's Seasons.
- UN international days. DateMath lists the international days with a fixed date as the United Nations' own list gives them; days the UN moves from year to year, such as World Habitat Day, are left out. They mark a cause, not a day off. Source: UN list of international days.
- Federal Rule of Civil Procedure 6(a). DateMath counts court deadlines by FRCP 6(a)(1): the day of the event that triggers the period is left out, every day after it counts, weekends and holidays included, and a last day on a Saturday, Sunday or legal holiday moves to the next day that is none of them; before an event the count runs backward (6(a)(5)). Legal holidays are the federal holidays of 6(a)(6)(A); days declared by the President or Congress and state holidays also count under the rule and must be added by hand. Source: FRCP Rule 6.
- Invoice payment terms. DateMath reads payment terms the way invoices commonly write them: Net 30 is due 30 days after the invoice date, EOM terms count from the end of the invoice's month (Net 30 EOM is due 30 days after it), due on receipt is due on the invoice date, and 2/10 Net 30 gives a 2% discount if paid within 10 days, with the full amount due in 30. Source: Invoice payment terms (SuperfastCPA), Net 30 and Net 30 EOM (Flexprice).
- Julian Day and the Julian calendar. DateMath counts the astronomers' Julian Date as the days since noon Universal Time on January 1, 4713 BC in the proleptic Julian calendar, so January 1, 2000 at 12:00 UT is JD 2451545.0, and the Modified Julian Date is JD − 2400000.5, which starts at midnight. Julian calendar dates have a leap year every 4 years, with no century rule. Source: Julian day, Julian calendar.
- The Hebrew calendar. DateMath reads Hebrew dates from the Hebrew calendar data built into your browser (the Unicode CLDR and ICU data every major browser ships). The Hebrew year has 12 months, or 13 in 7 of every 19 years, when Adar I is added before Adar II, and its day starts at sunset. A bar mitzvah is at 13; a bat mitzvah is at 12 in Orthodox communities and often at 13 in others. Source: Hebrew calendar, Bar and bat mitzvah.
- US hours-worked rules. DateMath counts exact minutes, unless you pick rounding in the hours calculator, 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.
- Units of time. DateMath uses the fixed units the International System of Units (SI) accepts for use with the second: a minute is 60 seconds, an hour 60 minutes (3,600 seconds) and a day 24 hours (86,400 seconds), so amounts of time carry at 60, not at 100. Source: SI Brochure (BIPM).
- 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 IANA time zone database. DateMath's time zone tools take each zone's UTC offset and daylight saving dates from the IANA time zone database (tz) built into your browser, the data computers and phones set their clocks by, so every date gets the rule in force on it. US daylight saving time runs from 2:00 AM on the second Sunday in March to 2:00 AM on the first Sunday in November (15 U.S.C. 260a); the EU and the UK change at 1:00 AM UTC on the last Sundays of March and October. Source: IANA time zones, 15 U.S.C. 260a, Directive 2000/84/EC.
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.
- Deadlines on a weekend: A court deadline that lands on a Saturday before a Monday holiday moves to the Tuesday, and one counted backward before a hearing moves to the court day before; DateMath shows every day it moved over. An invoice due date on a weekend stays where the terms put it, with the next business day named.
- Weekday numbers: US calendars and Excel's WEEKDAY count Sunday as day 1, while ISO 8601 counts Monday as day 1 and Sunday as day 7, so DateMath gives both numbers wherever a weekday has one.
- Half birthdays at month ends: A half birthday is 6 calendar months after the birthday, so the half birthday of August 31 is February 28, or 29 in a leap year, and DateMath works it out from the birth date each year rather than from the year before.
- Hebrew birthdays in Adar: Someone born in Adar of a common Hebrew year has the birthday in Adar II in a leap year, and someone born on a 30th that a month lacks that year has it on the day after the 29th; DateMath names the month it uses.
- Three kinds of Julian date: "Julian date" means the astronomers' day count (JD), a day-of-the-year code such as 26299 on labels, or a date in the old Julian calendar; DateMath names which one each result is.
- 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.
- Adding hours and minutes: Minutes and seconds carry at 60, so 1:45 plus 1:30 is 3:15, not 2:75, and DateMath adds exact seconds before it writes the total back as hours, minutes and seconds.
- Shift end times: An unpaid break is added to the hours to work, so an 8-hour shift from 9:00 AM with a 30-minute lunch ends at 5:30 PM, and an end past midnight is on the next day.
- 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. The time zone converter and the meeting planner are the exception: they apply each zone's own daylight saving dates.
- Times that are skipped or happen twice: On the night the clocks spring forward, a time such as 2:30 AM doesn't exist, and the time zone converter says so instead of guessing; on the night they fall back, 1:30 AM happens twice, and DateMath converts the first and names the second.
- Weeks when the time difference changes: The US moves its clocks two or three weeks before Europe in March and one week after it in the fall, so New York is 4 hours behind London in those weeks instead of 5. DateMath works out the difference for each date instead of using a fixed number.
- Countdowns and time zones: A countdown to a date ends when your own clock shows the target, so a New Year countdown reaches zero at your local midnight, a release countdown at midnight on release day, and a shared countdown counts to the same clock time in each viewer's zone. The season countdown is the exception: an equinox or solstice is one moment, so it reaches zero at once everywhere. 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.
Key facts
- 34 free calculators: Date Calculator, Days From Today Calculator, Date Duration Calculator, Time Calculator, Time Zone Converter, Meeting Planner, Hours Calculator, Shift Calculator, Time Card Calculator, Hours and Minutes Calculator, Hours to Decimal Calculator, Age Calculator, Half Birthday Calculator, Hebrew Birthday Calculator, Graduation Year Calculator, Anniversary Calculator, Golden Birthday Calculator, Business Days Calculator, Court Date Calculator, Invoice Due Date Calculator, Week Number Calculator, Day of the Week Calculator, Printable Calendar, US Federal Holidays, Holidays by Date, Leap Year Calculator, Julian Date Converter, Day Countdown, Release Countdown, Season Countdown, Countdown Timer, Christmas Countdown, New Year Countdown, Halloween Countdown
- Every calculation runs in your browser; the dates you enter are not sent to us
- No account, no sign-up, nothing to install
- Gregorian calendar with its leap-year rule, for every date
- Business days skip weekends and the 11 annual US federal holidays on their observed dates
- Week numbers follow ISO 8601, with the US Sunday-start number alongside
- Time zones follow the IANA time zone database, with daylight saving applied for each date
- Every calculation can be shared as a link
The tools
- Date Calculator: Add or subtract days, weeks, months or years from a date, or count the days between two dates, with weeks, months and business days. Free, no sign-up.
- Days From Today Calculator: Type a number to get the date that many days, weeks or months ahead of or before today, with its weekday, plus the business-day date for days. Free, no sign-up.
- Date Duration Calculator: Find the exact duration between two dates and times in years, months, days, hours and minutes, plus the total in days, hours, minutes and seconds.
- Time Calculator: Add or subtract days, hours, minutes and seconds from a date and time and see the resulting date, weekday and time. Free, works in your browser.
- Time Zone Converter: Convert a date and time between time zones, with daylight saving applied for the date you pick, the UTC offset of each zone and the difference between them.
- Meeting Planner: Plan a meeting across time zones: add each person's time zone, see the hours of the day side by side and find the hours inside everyone's working day. Free.
- Hours Calculator: Calculate the time duration between two times in hours and minutes and decimal hours, overnight shifts and military time included, minus an unpaid lunch break.
- Shift Calculator: Find when an 8-hour shift ends: enter the start time, the hours to work and the unpaid break, and get the clock-out time, night shifts included. Free.
- Time Card Calculator: Time in, time out and lunch per day, split shifts too, totaled for one or two weeks in decimal hours and gross pay. Free, no sign-up.
- Hours and Minutes Calculator: Add or subtract hours, minutes and seconds, or multiply and divide an amount of time, with the total in h:mm:ss, decimal hours, minutes and seconds. Free.
- Hours to Decimal Calculator: Convert hours and minutes to decimal hours and back, with a chart of every minute from 1 to 60 as a decimal of an hour.
- Age Calculator: Calculate exact age from a date of birth in years, months and days, plus total months, weeks and days, the weekday of birth and the next birthday.
- Half Birthday Calculator: Find your half birthday, 6 months after your birthday, with its weekday and the days until it, plus your quarter and three-quarter birthdays. Free, no sign-up.
- Hebrew Birthday Calculator: Find your Hebrew birthday from your date of birth, born before or after sunset, and the Gregorian date of your Hebrew birthday in the coming years.
- Graduation Year Calculator: Find the high school class (graduation year), the kindergarten start year and the grade now from a date of birth and your school's age cutoff date.
- Anniversary Calculator: Calculate how long you have been married, together or at a job in years, months and days, with the next anniversary, monthly anniversary and day milestones.
- Golden Birthday Calculator: Find your golden birthday (your age equals your birth day), the double golden birthday and the Beddian birthday, with each date and age. Free.
- Business Days Calculator: Count the business days between two dates, or add business days to a date, skipping weekends and, optionally, US federal holidays.
- Court Date Calculator: Count a court deadline from a trigger date in calendar or court days: the trigger day left out, a last day on a weekend or federal holiday moved to a court day.
- Invoice Due Date Calculator: Find an invoice's due date from its date and payment terms: Net 7 to Net 90 or any days, EOM and Net 30 EOM, due on receipt, plus the 2/10 discount date.
- Week Number Calculator: Find the ISO 8601 week number of any date, the US week number, and the Monday-to-Sunday dates of any week of the year. Free, no sign-up.
- Day of the Week Calculator: Find the day of the week for any date, past or future, with the day of the year, the ISO and US week number and the weekday number. Free, no sign-up.
- Printable Calendar: A calendar of any year or month, printable, with US federal holidays and ISO or US week numbers. Weeks start on Sunday or Monday. Free, no sign-up.
- US Federal Holidays: Every US federal holiday of any year with its date, weekday and the day it is observed when it falls on a weekend, plus the days until the next one.
- Holidays by Date: Pick a date to see every holiday and observance on it: US federal holidays, observances, Easter, Jewish holidays, equinoxes and UN days, with the next holiday.
- Leap Year Calculator: Check whether a year is a leap year, with the Gregorian rule spelled out, and count a February 29 birthday: the real birthdays so far and the age on any date.
- Julian Date Converter: Convert a date and time to a Julian Date (JD and MJD) and back, a date to a YYDDD or YYYYDDD Julian date code and back, or a Julian calendar date to Gregorian.
- Day Countdown: A live countdown to any date and time: the days, hours, minutes and seconds left, the weekday, calendar and business days to go, and a link to share. Free.
- Release Countdown: Live countdowns, to the second on your clock, to officially announced release dates (GTA 6 and Avengers: Doomsday), each with its source.
- Season Countdown: A live countdown to the next equinox or solstice: the days, hours and minutes to the next season, the exact moment on your clock, and the meteorological start.
- Countdown Timer: A countdown timer: set hours, minutes and seconds or pick 10 seconds to 24 hours, then start, pause or reset it, with an alarm at zero and a full-screen view.
- Christmas Countdown: How many days until Christmas? A live countdown to December 25 in days, hours, minutes and seconds on your own clock, with the weekday Christmas falls on.
- New Year Countdown: A live countdown to midnight on January 1 in your time zone: the days, hours, minutes and seconds to the New Year, with a full-screen view for New Year's Eve.
- Halloween Countdown: How many days until Halloween? A live countdown to October 31 in days, hours, minutes and seconds on your own clock, with the weekday Halloween falls on.
Who runs DateMath
DateMath is made by Dross Creative. Found a result that looks wrong, or missing a calculator you need? Write to hello@datemath.app.