Calculate days between two dates, add or subtract days from a date, and find future or past dates.
Last reviewed: May 2026
This date calculator performs two essential operations: finding the number of days between two dates, and adding or subtracting days from a given date. These calculations appear simple but involve complex calendar rules โ varying month lengths (28โ31 days), leap years, and the irregular structure of the Gregorian calendar make manual counting error-prone, especially across year boundaries.1
Whether you are counting days until a deadline, calculating a contract duration, determining a due date, or planning a project timeline, this calculator handles the calendar math instantly and accurately.
The Gregorian calendar, used worldwide for civil purposes, has 365 days in common years and 366 in leap years. A year is a leap year if it is divisible by 4, except for century years, which must also be divisible by 400. This means 2024 and 2028 are leap years, 1900 was not, and 2000 was.2
To calculate the difference between two dates, the calculator converts each date to its absolute day number (counting from a reference epoch), then subtracts. This avoids the error-prone process of counting through individual months manually. When adding days to a date, the calculator advances through months sequentially, accounting for each month's length and any leap year February.
| Month | Days | Cumulative Days (non-leap) | Cumulative Days (leap) |
|---|---|---|---|
| January | 31 | 31 | 31 |
| February | 28/29 | 59 | 60 |
| March | 31 | 90 | 91 |
| April | 30 | 120 | 121 |
| May | 31 | 151 | 152 |
| June | 30 | 181 | 182 |
| July | 31 | 212 | 213 |
| August | 31 | 243 | 244 |
| September | 30 | 273 | 274 |
| October | 31 | 304 | 305 |
| November | 30 | 334 | 335 |
| December | 31 | 365 | 366 |
Many everyday and business scenarios require date math:
Pregnancy due dates: Estimated due date is typically 280 days (40 weeks) from the first day of the last menstrual period. Our Due Date Calculator handles this specifically.
Contract durations: A "90-day notice period" starting January 15 ends April 15 โ but is that 90 calendar days or business days? Calendar days: April 15. Business days (excluding weekends): roughly May 19. The distinction matters legally.
Loan terms: A 30-year mortgage starting June 1, 2026 matures June 1, 2056. Interest accrues daily, so the exact number of days in each period affects payment calculations.
Project planning: If a project needs 120 business days and starts March 1, the completion date falls around August 18 (accounting for weekends but not holidays). Add holidays and the date pushes further.
Age calculations: Determining exact age in days accounts for leap years โ someone born on March 1, 2000 and checked on March 1, 2026 has lived 9,497 days (including 7 leap days). See our Age Calculator for detailed breakdowns.
Business day calculations exclude Saturdays and Sundays, and optionally public holidays. This distinction is critical in legal, financial, and contractual contexts where "days" often means "business days" unless explicitly stated otherwise.3
| Calendar Days | Approx. Business Days | Common Usage |
|---|---|---|
| 7 | 5 | One work week |
| 14 | 10 | Two-week notice, pay period |
| 30 | 22 | Monthly billing cycle, return policy |
| 60 | 43 | Refund window, probation period |
| 90 | 64 | Quarterly review, visa validity |
| 180 | 130 | Half-year contract, COBRA coverage |
| 365 | 261 | Full calendar year |
Business days exclude weekends only. Actual business days vary by country and holiday schedule.
Leap years add one day to February every four years to correct for the fact that Earth's orbit takes approximately 365.2422 days, not exactly 365. Without this correction, the calendar would drift by about one day every four years โ after 100 years, January would arrive 24 days early, eventually shifting seasons entirely.2
The full leap year rule has three parts: (1) years divisible by 4 are leap years, (2) except years divisible by 100 are not, (3) except years divisible by 400 are. So 2024 is a leap year (divisible by 4), 1900 was not (divisible by 100 but not 400), and 2000 was (divisible by 400). This three-tier rule keeps the calendar synchronized with the solar year to within one day every 3,236 years.
Leap year complications affect date calculations that span February. The number of days between January 15 and March 15 is 59 in a common year but 60 in a leap year. Any date arithmetic crossing February must check for leap year status, which this calculator does automatically for every computation it performs.
Date representation varies significantly by region, which causes frequent confusion in international contexts. The United States uses month/day/year (MM/DD/YYYY), most of Europe and Asia use day/month/year (DD/MM/YYYY), and the international standard ISO 8601 uses year-month-day (YYYY-MM-DD). The date "03/04/2026" means March 4 in the US, April 3 in Europe, and is ambiguous without context. When precision matters โ contracts, software, data โ use the unambiguous ISO 8601 format or spell out the month name.4 Many international organizations, including NATO and the United Nations, have adopted ISO 8601 as their official date format to eliminate ambiguity in multinational communications, legal agreements, and documentation.
30-day return policy: You purchase an item on January 28. Adding 30 calendar days: January has 3 remaining days, leaving 27 to count in February. In a common year February has 28 days, so the deadline is February 27. In a leap year, it is still February 27 (28 remaining days would push to February 28, but we only need 27).
90-day probation period: Employment starts March 15. Add 90 days: 16 remaining in March + 30 in April + 31 in May = 77 days. Remaining: 13 days into June. Probation ends June 13.
Counting backwards: Tax filing deadline is April 15. You need 45 days to prepare. Subtracting 45 days: 15 days in April + 30 remaining from March = 45. Start date: March 1. Working backwards from deadlines is essential for project planning and never missing due dates.
Weeks and months between dates: "Six months from today" is ambiguous because months have different lengths. Six months from August 31 could be February 28 or March 2, depending on interpretation. For legal and financial precision, specify exact calendar dates or count in days rather than months.
| Date | Day of Year | Days Remaining | Significance |
|---|---|---|---|
| Jan 1 | 1 | 364 | New Year's Day, fiscal year start |
| Apr 15 | 105 | 260 | US tax filing deadline |
| Jul 1 | 182 | 183 | Midpoint of the year, fiscal Q3 start |
| Sep 30 | 273 | 92 | Federal fiscal year end, Q3 close |
| Oct 15 | 288 | 77 | Extended tax filing deadline |
| Dec 31 | 365 | 0 | Calendar year end, annual deadlines |
Day of year values shown for non-leap years. In leap years, add 1 to all dates after February 28.
Programmers frequently need date arithmetic for applications ranging from billing systems to scheduling software. Most programming languages store dates internally as a count of days or seconds from a reference epoch. Unix timestamps count seconds since January 1, 1970. Excel stores dates as serial numbers counting from January 1, 1900 (with a known bug treating 1900 as a leap year). Understanding these internal representations helps explain why date calculations sometimes produce unexpected results across different systems.
When working with dates programmatically, always store and compare dates in UTC (Coordinated Universal Time) to avoid time zone ambiguity. Convert to local time only at display time. This prevents the common bug where a date appears to shift by one day when viewed in different time zones โ for example, midnight UTC on March 15 is still March 14 at 7 PM Eastern time, causing event dates to appear one day early for US-based users.
Database date types also vary: SQL DATE stores only the date (no time), DATETIME or TIMESTAMP includes time, and INTERVAL represents a duration. Choosing the wrong type causes subtle bugs โ storing a birthday as a TIMESTAMP means it technically occurs at a specific instant in a specific time zone, which may not be what you want. For pure date calculations like "days between two events," DATE type is cleanest.
โ Clarify "days" in any agreement. Legal and business contracts should specify whether "days" means calendar days or business days โ the difference on a 90-day deadline is nearly four weeks.
โ Account for time zones in international deadlines. A deadline of "April 15" ends at midnight in the specified time zone. If you are working across zones, confirm which zone governs the deadline.
โ Use ISO 8601 for unambiguous dates. Write 2026-03-15 instead of 3/15/2026 or 15/3/2026 in any context where the audience might be international.
โ Remember month-end quirks. Adding "one month" to January 31 is ambiguous โ is it February 28, March 1, or March 2? Different systems handle this differently. When precision matters, count exact days instead.
See also: Age Calculator ยท Birthday Calculator ยท Business Days ยท Date Difference ยท Countdown Timer