3tej home
← Time & Date

What is Days Between Dates?

A Days Between Dates computes the difference or sum between two dates. It applies the standard formula to the values you enter and returns the result instantly, without sending any data to a server. Free Days Between Dates. The tool.

Days Between Dates

Calculate days, months, years between any two dates.

Inputs

Days Between

-

Breakdown

Weeks
-
Months
-
Years
-
Hours
-

About the days-between-dates calculator

The days-between-dates calculator measures the exact span between any two calendar dates and reports it five ways at once: days, weeks, months, years, and hours. It is the standard helper for visa overstay tracking, lease and loan period calculations, project deadline planning, statute-of-limitations checks, anniversary countdowns, and any contract that bills, charges, or accrues by elapsed time. Anyone who has ever argued with a HR system about how many days of notice were actually served, or a landlord about how many days a deposit was held, knows that the dispute almost always hinges on whether the end date is counted inclusively.

The tool defaults to the exclusive count (the bare time elapsed, like a stopwatch). For contract and statutory uses you may need to add one day to capture inclusive counting; the table below makes the convention explicit so you do not silently lose a day in either direction.

How the calculation works

JavaScript Date objects store time as milliseconds since 1970-01-01 UTC. Subtracting two Date timestamps gives the difference in milliseconds, which the tool then converts to days, weeks, months, years, and hours. Months and years use the average-length conventions (30.44 and 365.25 days respectively) because actual months have 28, 29, 30, or 31 days and the average smooths leap years.

days   = (end_ms - start_ms) / 86,400,000
weeks  = days / 7
months = days / 30.44     // 365.25 / 12
years  = days / 365.25    // Julian year, averages leap years
hours  = (end_ms - start_ms) / 3,600,000
  • UTC parsing: both dates are read as midnight UTC, so DST shifts and timezone parsing do not skew the result.
  • Exclusive count by default: 1 Jan to 8 Jan is 7 days, not 8. Add one day for inclusive counts (rent days, lease days, statutory clocks).
  • Absolute output: the displayed days are always positive; the calculator does not flip if you reverse start and end.
  • Decimal precision: weeks, months, and years carry one or two decimal places so the residual is not lost.

Worked example

You signed a 24-month rental lease on 2024-01-01 and want to know exactly how many days you have lived in the unit as of 2026-05-08.

  1. Start: 2024-01-01 (Jan 1 = day 1 of the lease).
  2. End: 2026-05-08 (today).
  3. Days: 858 days.
  4. Weeks: 122.6 weeks.
  5. Months: 28.2 (the 24-month lease has already ended, you are 4 months into month-to-month).
  6. Years: 2.35.
  7. Hours: 20,592.
Result: You have lived in the unit for 858 days (2 years, 4 months, 7 days). For Indian Income Tax rental income reporting you would split this into 365 days in FY 2024-25 (Apr 1, 2024 to Mar 31, 2025) and the rest in FY 2025-26. For a US tax-residence test, you may need to convert this to the substantial-presence formula.

Common duration thresholds

ContextDuration that triggers a ruleReference
US substantial presence test183 days weighted (current + 1/3 prior + 1/6 two years prior)IRS Pub 519
Indian tax residence182 days in FY, or 60 days + 365 days in prior 4 yearsIncome Tax Act, Sec 6
UK statutory residenceAutomatic resident at 183 daysHMRC RDR3
US tourist visa (B-2)Up to 180 days per visitUSCIS I-94
Schengen visa90 days in any 180-day windowEU regulation 539/2001
Notice period (white-collar, India)Typically 60 to 90 daysEmployment contracts
Probation periodTypically 90 to 180 daysEmployer policy
Statute of limitations (small claims, India)3 years from cause of actionLimitation Act 1963

Common pitfalls

  • Inclusive vs exclusive counting. Most contracts and visa rules count the start day as day 1, meaning you should add one to the exclusive answer this tool returns. Lease language sometimes does the opposite. Check before you act.
  • Daylight saving days are not 24 hours. The day a DST shift happens is 23 or 25 hours in local time. The tool uses UTC so this never moves the day count.
  • Month length matters for short spans. Saying "about 1 month" for the gap from 1 February to 1 March (28 or 29 days) versus 1 March to 1 April (31 days) hides up to 3 days of difference, which matters for interest accrual.
  • Leap year edge cases. Year 2000 was a leap year (divisible by 400), 2100 will not be (divisible by 100 but not 400). Long-range duration calculations should test against the actual rule, not just "divisible by 4".
  • Off-by-one with Mondays. Counting "business days" requires subtracting weekends and holidays from raw days. This tool returns raw calendar days; use a business-day tool for working-day counts.
  • Time zone for the start date. An e-commerce order placed at 11:59 PM PT will show as the next day for an EST recipient. For legal contracts, fix the timezone in the document.

Related calculators on 3Tej

Frequently asked questions

Why are my contract days different from the calculator's answer?

Almost always because of inclusive versus exclusive counting. This tool returns the bare elapsed days, like a stopwatch: 1 January to 8 January is 7. Contracts and statutes often count the start day as day 1, making the same range 8 days. Read the document's "computation of time" clause or add one day.

Is 2100 a leap year?

No. A year is a leap year if it is divisible by 4, except centuries that are not divisible by 400. 2000 was a leap year (divisible by 400). 2100, 2200, and 2300 are not. 2400 will be. The rule corrects for the 11-minute-per-year drift of the Julian calendar.

How do I count business days only?

Subtract weekends and public holidays from the raw day count. For most weeks, multiply the number of complete weeks by 5 and add the weekday remainder. Country-specific holiday calendars (e.g., India NSE, US SIFMA, UK Bank Holidays) must be applied. Use a dedicated business-days calculator for that.

Why does India use UTC+5:30 instead of a whole-hour offset?

India spans about 30 degrees of longitude (roughly 3,000 km), straddling two time zones. In 1906 the British colonial administration chose a single offset midway between UTC+5 and UTC+6 to avoid splitting the country in two. The half-hour offset has stuck. Nepal (UTC+5:45) and parts of Australia have similar partial-hour offsets.

What is the difference between UTC and GMT?

GMT (Greenwich Mean Time) was based on the apparent position of the sun at the Royal Observatory in Greenwich, London. UTC (Coordinated Universal Time) is defined by an ensemble of atomic clocks and is the modern civil-time standard. They differ by less than one second; for everyday use they are interchangeable. Aviation, GPS, and Internet timestamps all use UTC.

Time, calendars, and what the world actually agrees on

The Gregorian calendar (the one most of the world uses for civil dates) was introduced by Pope Gregory XIII in 1582 to fix the 11-minute-per-year drift of the Julian calendar. It cycles every 400 years. A year is a leap year if divisible by 4, except centuries unless they are divisible by 400.

Time zones and offsets

ZoneUTC offsetNotes
UTC / GMT+00:00Universal reference; UK in winter
EST / EDT (US East)-05:00 / -04:00DST observed; NYC, Toronto
PST / PDT (US West)-08:00 / -07:00DST observed; LA, Vancouver
IST (India)+05:30No DST; covers 3,000 km E-W
JST (Japan)+09:00No DST
AEDT / AEST (Sydney)+11:00 / +10:00DST observed in NSW, VIC, ACT, TAS
CET / CEST (Europe)+01:00 / +02:00DST observed; Berlin, Paris, Rome

Daylight Saving Time gotchas

  • DST start: clocks jump forward; the 02:00-03:00 hour disappears. Schedules at 02:30 run once or not at all.
  • DST end: clocks fall back; 01:00-02:00 happens twice. Schedules at 01:30 run twice.
  • ~40% of the world's countries don't observe DST: India, China, Japan, most of Africa, most of Asia.
  • The EU passed a directive in 2019 to abolish DST but never finalized member-state choices. Still in effect as of 2026.

How long is a year really?

  • Tropical year (sun position): 365.2422 days
  • Sidereal year (star position): 365.2564 days
  • Gregorian average: 365.2425 days (97 leap years per 400)
  • Difference from tropical: ~26 seconds per year, drifts ~1 day every 3,300 years

ISO 8601 - the unambiguous date format

Use YYYY-MM-DD everywhere. It's unambiguous (no US vs UK confusion), sorts correctly as a string, and is the JSON / API standard.

  • Date only: 2026-05-13
  • Date + time UTC: 2026-05-13T14:30:00Z
  • Date + time with offset: 2026-05-13T19:30:00+05:30 (IST)
  • Duration: P1Y2M3DT4H5M6S (1 year, 2 months, 3 days, 4 hours, 5 minutes, 6 seconds)
  • Week date: 2026-W20-3 (ISO week 20, Wednesday)

The formula explained

This calculator uses the following formula:

days = (end - start) / 86,400,000 ms

The reason this formula works is rooted in the underlying physics, finance, or biology of the problem. Behind every calculator is a published, peer-reviewed equation or a widely accepted convention. We do not invent formulas; we apply standard ones from textbooks, government tables, professional bodies, and academic literature.

If you are curious about the math, the simplest way to verify is to plug in two known numbers and compare against a known result. The calculator should match published examples to within rounding precision.