Date Calculator

Multi-mode date calculator.

Time & Date 3 modes Business days
Rate this calculator · 4.5 (2)

Date Calculator

Days between · date arithmetic · today view

Instructions — Date Calculator

1

Pick a mode

Use Between to count days between two dates, Add / Subtract to shift a date forward or backward by days, weeks, months, years, or business days, and Today for a quick view of the current date with weekday, week number, and day of year.

2

Enter your dates

Date inputs use the native browser picker so leap years, month lengths, and calendar rules are handled automatically. Quick-pick buttons in Between mode jump the end date by 7, 30, 90, or 365 days.

3

Read the breakdown

Each mode shows the headline answer plus six contextual figures: weekdays, business days, weeks, hours, ISO format, day of year, and (in Today mode) the Julian Day Number used in astronomy.

Business days only: the Add / Subtract mode has a "business days" unit that skips weekends. Useful for shipping ETAs, contract deadlines, or HR leave accruals. Public holidays are not subtracted — those vary by country.
Leap year aware: all date arithmetic correctly handles February 29 and the Gregorian leap rule (divisible by 4, except by 100 unless also by 400). Adding 365 days from Feb 28, 2024 lands on Feb 27, 2025, not Feb 28.

Formulas

Date arithmetic is built on counting days between calendar dates, which is what the Julian Day Number was invented to solve.

Days Between Two Dates
$$ \text{Days} = JDN_2 - JDN_1 $$
Convert each date to its Julian Day Number, subtract, and take the absolute value. JDN is a continuous day count from January 1, 4713 BC.
Julian Day Number
$$ JDN = d + \lfloor (153m + 2)/5 \rfloor + 365y + \lfloor y/4 \rfloor - \lfloor y/100 \rfloor + \lfloor y/400 \rfloor - 32045 $$
Where a = floor((14 - month)/12), y = year + 4800 - a, m = month + 12a - 3, d = day. Returns an integer day index used throughout astronomy.
Gregorian Leap Year
$$ \text{leap} = (y \bmod 4 = 0) \text{ AND NOT } (y \bmod 100 = 0) \text{ OR } (y \bmod 400 = 0) $$
Years divisible by 4 are leap, except those divisible by 100 unless also divisible by 400. So 2000 was a leap year, 1900 was not. February has 29 days in a leap year, 28 otherwise.
Business Days
$$ B = \sum_{i=1}^{n} \mathbb{1}\,[\text{weekday}(d_i) \in \{Mon,...,Fri\}] $$
Iterate day by day from start to end, count only Monday through Friday. Saturdays and Sundays are excluded; public holidays vary by country and are not subtracted automatically.
Add Days to a Date
$$ d_{new} = \text{from\_JDN}(JDN(d) + n) $$
Convert the start date to JDN, add n days, convert back to a calendar date. This handles month-end rollover, year change, and leap days automatically.
Day of Year
$$ DOY = d + \sum_{i=1}^{m-1} \text{days}(i, y) $$
Sum the days in all months before the current month, plus the day of the current month. Ranges 1 to 365 (or 366 in leap years).

Reference

Common date-math shortcuts
QuestionAnswer
Days in a year365 (366 in leap years)
Days in a week7
Weeks in a year52 (with 1-2 extra days)
Working days per year~260 (5 days × 52 weeks)
Average month length30.44 days
Days in 10 years3,652 (with 2-3 leap days)

Days in each month

Standard month lengths in the Gregorian calendar. February gets 29 days in leap years.

Standard year
MonthDays
January31
February28
March31
April30
May31
June30
July31
August31
September30
October31
November30
December31
Leap years (next)
YearIs leap?
2024yes
2025no
2026no
2027no
2028yes
2032yes
2100no
2400yes

Article — Date Calculator

Date Calculator: Days Between Dates, Date Arithmetic, and Today's Date

A date calculator handles three jobs: counting days between two dates, adding or subtracting an interval from a given date, and reporting facts about today (weekday, ISO format, day of year, week of year, Julian Day Number). This tool does all three with leap-year-correct arithmetic, business-day support, and a Julian Day output for astronomy or scientific work. Pick a mode, enter dates, read the answer.

The math under the hood is the same regardless of mode. Each calendar date converts to a Julian Day Number — a continuous integer count of days starting from January 1, 4713 BC. Subtracting two JDNs gives an exact day count without month-length or leap-year edge cases. Adding an integer to a JDN and converting back produces a future or past date.

What the date calculator does

This date calculator runs three modes from a single interface. Between mode finds the calendar gap between two dates: total days, weeks, business days (Monday through Friday), and years. Add / Subtract mode shifts a starting date forward or backward by days, weeks, months, years, or business days, returning the result date with weekday and ISO format. Today mode displays the current date with its weekday name, ISO 8601 string, day of year, week of year, and Julian Day Number.

Each mode uses native browser date pickers, so month lengths, leap years, and Gregorian calendar rules are handled by the underlying JavaScript Date object. That eliminates the most common date-math errors: counting February 29 incorrectly in a leap year, miscounting days across month boundaries, and getting the weekday wrong for historical or future dates.

Days between dates mode

The Between mode answers "how many days from A to B?" — useful for project planning, contract terms, gestational age, days since an event, or simply counting down to a birthday. Enter start and end dates. The headline number is total days. Below it: weeks plus extra days, business days only, total years (decimal), and the hours-equivalent for fine-grained scheduling.

If you enter dates in reverse order (end before start), the calculator detects it, swaps internally, and notes the reversal in the formula display. The result is always non-negative. Business days exclude Saturdays and Sundays but do not subtract public holidays — those vary by country (US has 11 federal holidays; UK has 8 bank holidays; Germany varies by state) and adding them automatically would require a country selector and a holiday database.

Did you know

The longest gap any calculator needs to handle is roughly 8,000 years — the span from the start of recorded history to a few millennia in the future. That is about 2.9 million days. JavaScript's Date object supports the range from year -271,821 to year +275,760, comfortably covering any practical date math.

Date arithmetic: add and subtract

Add / Subtract mode shifts a date by a chosen interval. Pick the operation (add or subtract), the amount, and the unit (days, weeks, months, years, or business days). Common uses: project deadlines ("90 days from contract signing"), shipping ETAs ("delivered in 5 business days"), maturity dates ("180-day note"), gestational milestones, contract anniversaries, and HR leave accruals.

The result respects calendar rules. Adding 1 day to February 28, 2024 lands on February 29 (leap year). Adding 1 day to February 28, 2025 lands on March 1 (non-leap). Adding 1 month to January 31 lands on February 28 in regular years and February 29 in leap years — there is no February 31, so the calculator clamps to the last valid day. Adding 1 year to February 29, 2024 also clamps, landing on February 28, 2025.

Date arithmetic shortcuts
+30 days ~1 month
+90 days ~3 months / 1 quarter
+365 days 1 year (366 in leap)
+7 days same weekday next week
+10 biz days 2 work weeks
+1 quarter 3 calendar months

Business day date math

Business days exclude weekends. The calculator iterates day by day from start to end, counting only Monday through Friday. For Add / Subtract mode with "business days" as the unit, it skips weekends as it walks: adding 5 business days from a Monday lands on the next Monday, not Saturday. Adding 10 business days from a Monday lands two weeks out.

Public holidays are not subtracted automatically. The US has 11 federal holidays per year. The UK has 8 bank holidays. Germany varies from 9 to 13 depending on the state. Many shipping and contract calculators silently apply a US holiday list, which is wrong for international users. If your calculation must exclude holidays, do the business-day math, then subtract holidays manually from the result.

Leap years and date calculations

A year is a leap year if it is divisible by 4, except for years divisible by 100, unless also divisible by 400. So 2024 is a leap year, 2025 is not, 2100 is not (divisible by 100 but not 400), and 2000 was (divisible by 400). The Gregorian leap rule keeps the calendar aligned with the solar year to within one day every ~3,200 years.

The most common date-math error is forgetting that February has 29 days in leap years. A 365-day note signed on January 1, 2024 matures on December 31, 2024 — not January 1, 2025 — because 2024 had 366 days. Counting 30 days from January 30, 2024 lands on February 29, 2024 (the 30th day). Software that ignores leap years produces silent off-by-one errors that compound over multi-year intervals.

Regular year
365 days
Feb has 28 days
Leap year
366 days
Feb has 29 days

Julian Day and ISO date formats

The Julian Day Number (JDN) is a continuous integer day count starting January 1, 4713 BC at noon UTC. Today (May 2026) is roughly JDN 2,461,000. Astronomers, NASA, the U.S. Naval Observatory, and most scientific software use JDN to do date math because subtraction yields an exact day count regardless of calendar reforms, leap years, or month length.

ISO 8601 (YYYY-MM-DD) is the international standard for written dates. It sorts correctly as text, eliminates the ambiguity between US (MM/DD/YYYY) and European (DD/MM/YYYY) formats, and is the format every database, API, and programming language uses internally. "2026-05-14" is unambiguously May 14, 2026 in any country.

  • Leap year rule = divisible by 4, except by 100 unless also by 400
  • Days in a year = 365, or 366 in a leap year
  • Business days in a year = 260 - 261 (5 days × 52 weeks)
  • Average month length = 30.44 days
  • ISO 8601 format = YYYY-MM-DD
  • Julian Day = continuous integer day count from 4713 BC
  • Week 1 per ISO 8601 contains the first Thursday of January

Common date calculator pitfalls

The first pitfall is the inclusive vs. exclusive endpoint question. "30 days from January 1" can mean January 30 (exclusive of start, counted from day 0) or January 31 (inclusive, counted from day 1). Contracts and statutes need to specify which. This calculator uses exclusive counting in Between mode (the difference between Jan 1 and Jan 31 is 30 days) and additive arithmetic in Add / Subtract mode (adding 30 to Jan 1 yields Jan 31).

The second pitfall is ignoring leap years. Adding 1 year to February 29, 2024 has no exact answer — the calculator clamps to February 28, 2025. The third is the month-end clamp: adding 1 month to January 31 clamps to February 28 or 29. The fourth is silent timezone conversion: ISO date strings with time components can shift by a day if parsed in a different timezone. This calculator uses local-time date construction to avoid that.

Public holidays vary by country

Business-day calculations here exclude weekends only. They do not subtract public holidays, because holidays differ by country and state. A shipping ETA of "5 business days" from a US carrier accounts for US federal holidays; the same ETA from a German carrier accounts for German Land holidays. Always confirm holiday handling with the originating party.

Tip

When sharing dates internationally, always use ISO 8601 format (YYYY-MM-DD). "05/06/2026" is May 6 to an American and June 5 to a European. "2026-05-06" is May 6 to everyone. Database fields, API payloads, and spreadsheet exports should all use ISO format to avoid quarterly miscommunications.

FAQ

Pick Between mode, enter the start and end dates. The calculator converts each to a Julian Day Number (a continuous day count used in astronomy) and subtracts. It returns total days, weeks, business days (Monday through Friday only), years, and hours.
Pick Add / Subtract mode, enter your starting date, set the amount to 30 and unit to days. The result date appears with weekday, ISO format, day of year, and leap-year status. Month-end rollover and leap days are handled automatically.
365 days in a regular year, 366 days in a leap year. The average over 400 years is 365.2425 days, which is why the Gregorian calendar inserts a leap day in years divisible by 4, except those divisible by 100 unless also by 400.
No. 2026 is not divisible by 4, so it has 365 days. The next leap years are 2028, 2032, 2036, 2040, and so on. Note that 2100 is not a leap year (divisible by 100 but not 400), but 2000 and 2400 are.
Business days count only Monday through Friday. Saturdays and Sundays are excluded. Public holidays vary by country (US has 10 federal holidays, UK has 8 bank holidays) and are not automatically subtracted — adjust manually if your calculation needs to exclude them.
A continuous day count starting from January 1, 4713 BC at noon UTC. Today (2026) is roughly Julian Day 2,460,000. Astronomers and software use JDN to do date math because subtraction gives an exact day count without worrying about calendar rules, leap years, or month lengths.
52 weeks plus 1 day (or 2 days in a leap year). ISO 8601 numbers weeks from 1 to 52 or 53, depending on the year. Week 1 is the week containing the first Thursday of January, which sometimes places early January dates in week 52 or 53 of the previous year.
Pick Add / Subtract mode, set Operation to "Subtract", enter the number of days, and the unit. The result is a calendar date earlier than the start date. Useful for backdating events, calculating gestational age, or finding when a project started given its end date and duration.
Day of year (or ordinal date) is the count from January 1 of that year. January 1 is day 1, December 31 is day 365 (366 in leap years). May 9 is day 129 in a regular year, day 130 in a leap year. Used in agriculture, astronomy, and bird-banding records.