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.
Use a minus sign to subtract, for example -30.
Enter dates to see the result.
Enter dates to see the result.
Separate dates with commas or new lines. No holiday data is built in, so only the dates you type are skipped.
Find the date N business days after the start date, or before it with -N. The start day itself is not counted.
Business daysEnter 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
- 2025-01-01 to 2025-01-31 is 30 days without the start day and 31 days with it.
- 2024-01-31 plus 1 month has no February 31, so it becomes 2024-02-29 (leap year). In 2023 it is 2023-02-28.
- 2024-02-29 plus 1 year has no 2025-02-29, so it becomes 2025-02-28.
- One business day after Friday 2024-06-07 is Monday 2024-06-10. Add 06-10 as a day off and it is 06-11.
- If today is 2024-06-10 and the target is 06-20, it is D-10. Counting today as day 1 makes it day 11.
Calendar reference tables
| Month | Common year | Leap year |
|---|---|---|
| January | 31 | 31 |
| February | 28 | 29 |
| March | 31 | 31 |
| April | 30 | 30 |
| May | 31 | 31 |
| June | 30 | 30 |
| July | 31 | 31 |
| August | 31 | 31 |
| September | 30 | 30 |
| October | 31 | 31 |
| November | 30 | 30 |
| December | 31 | 31 |
These tables are built by the same code as the calculator, so they cannot drift from the results.
| Start | Add | Result |
|---|---|---|
| 2023-01-31 (Tue) | +1 month | 2023-02-28 (Tue) |
| 2024-01-31 (Wed) | +1 month | 2024-02-29 (Thu) |
| 2024-03-31 (Sun) | +1 month | 2024-04-30 (Tue) |
| 2024-05-31 (Fri) | -3 months | 2024-02-29 (Thu) |
| 2024-02-29 (Thu) | +1 year | 2025-02-28 (Fri) |
| 2024-02-29 (Thu) | +4 years | 2028-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
- Comparing day counts without deciding whether the start day counts. The same period is 30 days without it and 31 days with it, so check which one your contract or notice uses.
- Treating one month as 30 days. Months run from 28 to 31 days, so adding a month and adding 30 days can land on different dates.
- Adding one month to January 31 and then subtracting one month. The result is January 28 or 29, because the month-end clamp happened once.
- Assuming public holidays are already skipped. This calculator treats only Saturday and Sunday as days off (a customary assumption) and skips holidays only when you type them.
- Relying on it for legal deadlines. Article 157 of the Korean Civil Code generally leaves out the first day of a period, and Article 161 moves a deadline that falls on a Saturday or public holiday to the next day, so legal counts can differ from calendar days.
Assumptions used
- The weekend is Saturday and Sunday. Some countries and companies rest on other days (a customary assumption).
- The years-months-days breakdown uses the month-end clamp and then counts leftover days (a customary assumption).
- Dates run from 1900-01-01 to 2200-12-31. Nothing outside that range is calculated.
References
- Korean Civil Code Articles 157, 160, 161 (law.go.kr)
- Leap year (Wikipedia)
- Howard Hinnant, chrono-Compatible Low-Level Date Algorithms
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.