StatGardenREF. DESK
Calculators/Everyday/Date duration calculator
Everyday

Date duration calculator calculator

The gap between two dates expressed as a single total in years, months, weeks and days at once.

Published 21 August 2026

What this calculator does

A date duration calculator answers how long a stretch of time is, expressed on its own in each common unit rather than as a mixed breakdown. Enter a start and end date and the total span comes back as a single figure in years, in months, in weeks and in days, side by side, so whichever unit a form or contract actually asks for is there without conversion.

This is a different shape of answer from a "3 years, 2 months, 14 days" style breakdown: it treats the whole gap as one number in each unit, which is the form needed when comparing a duration against a threshold, such as a warranty period stated in months or a residency requirement stated in years.

The formula

FormulaTotal days = end date − start date (+1 if counted inclusively); that total is then re-expressed on its own in years (÷365.25), months (÷30.4368) and weeks (÷7)

The total number of days between the two dates is worked out first, counted either exclusively (the nights between them) or inclusively (including both the start and end date), depending on the counting option chosen. That day total is then divided by 365.25 for years, by 30.4368 for months, and by 7 for weeks, using the average calendar length of each unit.

TermMeaning
Exclusive countThe number of full days between the two dates, not counting the start date itself.
Inclusive countThe same span with one extra day added, so both the start date and end date are counted.
Average month and year lengthBecause calendar months and years vary in length, a duration in months or years is only exact as an average; 30.4368 days is the average month length and 365.25 days is the average year length, accounting for leap years.

The inputs explained

FieldWhat to enter
Start dateThe earlier of the two dates. If entered after the end date, the two are swapped automatically.
End dateThe later of the two dates.
CountingWhether to count exclusively (nights between the dates) or inclusively (counting both the start and end date).

When to use it

Checking a duration against a stated threshold

Visa, residency and warranty rules are often written as "at least 2 years" or "within 6 months", and reading the gap off directly in that unit avoids doing the day-count division by hand.

Comparing the length of two different periods

When two spans need to be compared, such as two employment periods or two project phases, having both expressed in the same unit, typically years or months, makes the comparison direct.

Working out an age or tenure in a single figure

A duration expressed as one decimal number of years, rather than a mixed years-and-months breakdown, is the form often wanted for age, tenure or membership length in a form field.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

How does a duration in days convert to years, months and weeks?

The same starting date of 13 August 2026, measured through to a range of later end dates.

A fixed start date against a range of end dates
End dateTotal durationIn yearsIn months
2026-09-1331 days0.081.02
2026-10-1361 days0.172.00
2026-11-1392 days0.253.02
2027-02-13184 days0.506.05
2027-08-13365 days1.0011.99
A gap of exactly one calendar year from 13 August 2026 to 13 August 2027 comes out as 365 days and 1.00 years, but 1.00 years by day count is not always exactly 365 days in every case, since the 365.25-day average absorbs the leap year that occurs roughly once every four years.

Questions

How is this different from the time between dates calculator?

The time between dates calculator gives a natural-language breakdown such as "1 year, 2 months, 14 days". This calculator instead gives the whole gap re-expressed on its own in each unit, such as 1.20 years or 14.29 months, which suits a form that asks for a single duration figure.

Why do the years and months figures use decimals?

Because a duration measured in years or months rarely lands on a whole number when converted from a day count, the decimal keeps the figure precise rather than rounding it to a mixed breakdown.

What is the difference between exclusive and inclusive counting?

Exclusive counting gives the number of nights between the two dates. Inclusive counting adds one extra day so that both the start date and the end date are themselves counted, which matches how some contracts and bookings define a duration.

Does it matter which date I enter first?

No. If the start date entered is later than the end date, the two are swapped automatically before the duration is worked out, and the result notes that the swap happened.

For a natural-language years, months and days breakdown instead, see the time between dates calculator. For a plain day count between two dates, use the days calculator.