Date Calculator
Add or subtract days from a date, or measure the span between two dates.
About Date Calculator
The number of days is the exact difference between the two dates. Weeks, months, and years are derived from that day count (months and years use average lengths, so they're approximate).
Formula
Days = (end timestamp − start timestamp) ÷ 86 400 000, rounded to the nearest whole day. Weeks = days ÷ 7. Months ≈ days ÷ 30.437. Years ≈ days ÷ 365.25.
- 30.437
- Average days per Gregorian month (365.25 ÷ 12)
- 365.25
- Average days per Gregorian year (accounts for leap years)
- 86 400 000
- Milliseconds in one day
Worked example
With the default values below, Date Calculator returns Total Days of 364. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Start Date
- 2025-01-01
- End Date
- 2025-12-31
- Include End Dayone of No, Yes
- No
Results
- Total Days
- 364
- Weeks
- 52.00
- Months (approx)
- 11.96
- Years (approx)
- 0.997
Step by step
- 1Compute millisecond difference and convert to whole days= 364 days
- 2Divide by 7 for weeks= 52.00 weeks
- 3Divide by 30.437 for approximate months= 11.96 monthsUses the average Gregorian month length (365.25 ÷ 12). Approximate.
- 4Divide by 365.25 for approximate years= 0.997 years
Assumptions and limits
- The result is derived only from the 3 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 3 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Date Calculator — full guide
Counting the days between two dates
Give the calculator a Start Date and an End Date and it returns the exact number of days between them, then converts that single figure into weeks, months and years. The defaults are 2025-01-01 and 2025-12-31 with Include End Day set to no.
How each result is produced
The day count is the difference between the two timestamps divided by 86,400,000 milliseconds and rounded to a whole day. The rest are derived from it:
- Weeks = days ÷ 7
- Months ≈ days ÷ 30.437, the average month in a 365.25-day year
- Years ≈ days ÷ 365.25
Only the day count is exact. Months and years use average lengths, which is why they are labelled approximate.
The default range, line by line
| Result | Working | Value |
|---|---|---|
| Total Days | 1 Jan 2025 to 31 Dec 2025 | 364 |
| Weeks | 364 ÷ 7 | 52.00 |
| Months (approx) | 364 ÷ 30.437 | 11.96 |
| Years (approx) | 364 ÷ 365.25 | 1.00 |
364 catches people out. A non-leap year holds 365 days, but 1 January to 31 December spans only the 364 one-day steps between those two dates — the start day itself is not one of them. Turn Include End Day on and the total becomes 365. Run the same span across 2024 and the gap is 365 days, because 29 February sits inside it.
A contract example
An engagement running from 2 March 2026 to 30 September 2026 is 212 days, which the calculator shows as 30.29 weeks and about 6.97 months. If every day worked is billable including the last one, switch Include End Day on and bill 213.
Reading it correctly
Use the exact day count for anything contractual: notice periods, interest accrual, visa stay limits, warranty windows, SLA clocks. Treat the months and years lines as orientation only — 11.96 months is really "one year minus a day", and a calendar-correct answer in years, months and days comes from the Age Calculator.
Common mistakes
- Mixing up nights and days. A stay from 1 June to 30 June is 29 nights but 30 dated days, which is why the Include End Day switch exists.
- Reading the months figure as calendar months. 61 days is 2.00 months by the average, but January plus February is 59 days and July plus August is 62.
- Reversing the fields. The span is measured from Start Date to End Date, so put the earlier date first.
- Expecting business days. Weekends and public holidays are all counted.
Related: the Pregnancy Due Date Calculator applies a fixed 280-day offset to a date, which is the same arithmetic in the other direction.
Guides that use this calculator
Frequently Asked Questions
Does it count both the start and end day?
By default it counts the gap between the dates. Turn on 'Include End Day' to count the final day as well, which is useful for billing or event durations.
Are months exact?
The day count is exact. Months and years are approximate because calendar months vary in length; for exact calendar age use the Age Calculator.
Why does 1 January to 31 December 2025 come out as 364 days?
Because it measures the gap, not the number of dates. There are 364 single-day steps from 1 January to 31 December; the 365th day of the year is the start date itself. Switch Include End Day on and you get the familiar 365. Both answers are correct for different questions.
Is a leap day inside my range counted?
Yes, automatically. The calculation subtracts real timestamps, so every day that exists in the range is counted. 1 January 2024 to 31 December 2024 returns 365 days against 364 for 2025, and the extra day is 29 February 2024. No setting is needed.
Should I turn on Include End Day for a hotel stay or a rental invoice?
For a hotel, no — nights are what you pay for, and 1 June to 30 June is 29 nights. For a daily rental or a day-rate invoice where the return day is chargeable, yes: Include End Day makes that same span 30 days. Decide which unit the contract uses before you read the number.
Why is the Months figure 11.96 instead of 12 for a near-complete year?
Months are derived as days ÷ 30.437, an average month length, so they only land on whole numbers by coincidence. 364 ÷ 30.437 = 11.96. The shortfall is the one missing day plus the rounding in the average, not an error — the 364-day figure is the exact one.
