Date calculator

Days between two dates, add or subtract time, D-day countdown and business days. Whether the first day counts changes the answer by one, so both results are shown. Everything is calculated in this browser only.

Use 2025-03-01, 2025.03.01, 20250301 or 2025/03/01. Years 1900 to 2200.

Enter dates to see the result.

Estimate for reference only — verify before relying on it.

How it works

Between dates
Enter two dates to see the day count both with and without the start day. Weeks and years-months-days are shown too.
Add or subtract
Add or subtract days, weeks, months or years from a date. The weekday of the result is shown.
D-day
Enter a target date to see the days left or passed from today. Today comes from this device, and you can type another day instead.
Business days
Counts days excluding Saturdays and Sundays. Holidays change from year to year, so none are built in; type the dates you want skipped.

Worked examples

Calendar reference tables

MonthCommon yearLeap year
January3131
February2829
March3131
April3030
May3131
June3030
July3131
August3131
September3030
October3131
November3030
December3131

These tables are built by the same code as the calculator, so they cannot drift from the results.

StartAddResult
2023-01-31 (Tue)+1 month2023-02-28 (Tue)
2024-01-31 (Wed)+1 month2024-02-29 (Thu)
2024-03-31 (Sun)+1 month2024-04-30 (Tue)
2024-05-31 (Fri)-3 months2024-02-29 (Thu)
2024-02-29 (Thu)+1 year2025-02-28 (Fri)
2024-02-29 (Thu)+4 years2028-02-29 (Tue)

Formulas and sources

Leap years
A year divisible by 4 is a leap year, unless it is divisible by 100, in which case it is a common year, unless it is also divisible by 400. So 1900 and 2100 are common years, while 2000 and 2024 are leap years. A 400-year cycle holds 97 leap years, giving 400 × 365 + 97 = 146,097 days. Source: the Gregorian leap-year rule (Wikipedia, "Leap year").
Day differences
Each date is turned into a count of days since 1970-01-01 and the two counts are subtracted. Dates are checked against the calendar first, so leap days and month ends are handled automatically. The conversion follows Howard Hinnant's civil_from_days algorithm, including the constants 719,468 and 146,097.
Weekdays
1970-01-01 was a Thursday, so (days since 1970-01-01 + 4) mod 7 gives 0 for Sunday up to 6 for Saturday. 2000-01-01 was a Saturday and 2024-02-29 a Thursday.
Adding months and years
When the target month has no such day, the last day of that month is used. This matches the rule in Article 160(3) of the Korean Civil Code for periods set in months or years.
Years, months and days
The largest whole number of months that can be added to the start date is found first, and the remaining days are shown as days. Because of the month-end clamp, January 31 to March 1 is 1 month 1 day. This breakdown is a customary assumption, not an official standard.

Common mistakes

Assumptions used

References

Frequently asked questions

What is the difference between including and excluding the start day?
Excluded is plain subtraction, counting from the day after the start. Included counts the start day as day 1, so it is one more. Elapsed time such as nights stayed usually excludes it; days that fall inside a period usually include it. Which one applies depends on your purpose or agreement.
How does adding months handle month ends?
If the target month has no such day, the last day of that month is used. January 31 plus one month is the end of February. Because of this, adding a month and then subtracting one may not return the original date.
Does the D-day count include today?
The main D-number does not count today. The value that counts today as day 1 is shown right beside it, so you can pick the one that matches how you count anniversaries or exam days.
Why are public holidays not skipped in business days?
Some holidays are announced or moved from year to year, and no unverified data is built in. Check an official calendar and type the dates to skip. Treating only Saturday and Sunday as days off is a customary assumption.
Can I use this for legal deadlines or contract periods?
We do not recommend relying on it alone. The Korean Civil Code generally leaves out the first day of a period (Article 157) and moves a deadline on a Saturday or public holiday to the next day (Article 161), so legal counts can differ from this calculator. Check the statute, the contract or the authority concerned. This tool only counts calendar days and gives no legal judgment.
Which date is today in D-day?
The date set on this device, read in the browser and never sent anywhere. If your device date is wrong, type a date into the Today field.
What range of dates works?
1900-01-01 to 2200-12-31, using Gregorian leap-year rules: divisible by 4, except multiples of 100 unless also divisible by 400.

More calculators (seewol.com)