Count days between dates, add or subtract any amount of time, explore every detail of any date, and see a full duration breakdown — all in one place.
A date calculator performs arithmetic on calendar dates — finding how many days lie between two dates, projecting forward or backward from a known date, or breaking down a time span into its component parts. Unlike a simple subtraction problem, date math is complicated by months with different lengths (28, 29, 30, or 31 days), leap years that add an extra day every four years (with century exceptions), and the question of whether the start and end dates themselves count in the range.
This calculator handles all four core date-math tasks in one tool: counting days between dates with optional weekday-only filtering, adding or subtracting years, months, and days simultaneously, analyzing any single date in depth, and expressing the gap between two dates across every possible unit from seconds to years.
The most common question is simple: how many days are between Date A and Date B? The standard method converts both dates to their underlying Unix timestamp (milliseconds since January 1, 1970), subtracts them, and divides by the number of milliseconds in a day (86,400,000). The result is exact and automatically accounts for leap years because those extra days are already baked into the timestamp system.
The “include vs. exclude start day” question matters in real scenarios. If you rent an apartment from January 1 to January 31, you’re charged for 31 days (inclusive) — January 1 counts. But if you ship a package on January 1 with 30-day delivery, the delivery date is January 31 (exclusive — day 1 of transit is January 2). Contract law, shipping, and financial calculations each have different conventions, which is why this calculator offers both options.
Adding days to a date is straightforward — add the day count to the day component and roll over months and years as needed. Adding months is trickier because months have different lengths. Adding one month to January 31 could mean February 28, February 29, or March 2 depending on the system used. This calculator uses JavaScript’s native setMonth and setFullYear methods, which follow the most common business convention: if the resulting date doesn’t exist (e.g., April 31), it rolls forward to the next valid date (May 1).
The weekdays-only mode iterates through every calendar day in the range and counts only Monday through Friday. This is useful for project timelines, contract deadlines, and any scenario where weekends don’t count. For a full business-day calculator that also excludes federal holidays, see our Business Days Calculator.
| Field | Description | Example (Mar 7, 2026) |
|---|---|---|
| Day of week | Full weekday name | Saturday |
| Day of year | Ordinal position in the year (1–366) | 66th day |
| ISO week number | Week 1 = week containing first Thursday | Week 9 |
| Quarter | Q1–Q4 based on month | Q1 |
| Days left in year | Remaining days from date to Dec 31 | 299 days |
| Leap year | Whether the year has 366 days | No (2026) |
| Days since Unix epoch | Days since Jan 1, 1970 | 20,519 |
| Western zodiac sign | Based on month and day | Pisces |
The Duration Breakdown mode expresses the same time gap in every unit independently and simultaneously. This is useful for certificates, reports, and anniversary messages where you might want to say “we have been together for 3 years, 847 days, 20,328 hours, or 1,219,680 minutes.” Each number is calculated from the raw millisecond difference, so all values are exact and consistent with each other.
| Method | Jan 1 to Jan 5 | Common use |
|---|---|---|
| Inclusive (both ends) | 5 days | Rental periods, hospital stays, event duration |
| Exclusive (end only) | 4 days | Age calculation, shipping transit days |
| Exclusive (start only) | 4 days | Loan interest accrual, most programming |
| Exclusive (both ends) | 3 days | Rare; some legal “clear days” calculations |