calculator.onl
Categories50

Date difference calculator and day adder

Count calendar days between two dates or add a positive or negative number of days to a date.

A worked example

Count both dates on the calendars. How many days does that add?

Signed day count86Whole weeks, absolute12Remaining days, absolute2Result dateDec 31, 2026
Date operation. Check the assumptions and the selected options.

1900-01-01 – 2200-12-31. Start date.

1900-01-01 – 2200-12-31. End date.

Gregorian civil dates from 1900 to 2200 are calculated in UTC, without daylight-saving shifts. Elapsed days exclude the starting date; inclusive counting adds one day, so equal dates count as one. Reversed dates give negative counts. Weeks use the absolute count. Holidays and business-day rules are excluded.

Updates as you type

Use a dot or comma for decimals. No thousands separators.

YOUR RESULT

Signed day count

86

Calculated from your inputs

Whole weeks, absolute12
Remaining days, absolute2
Result dateDec 31, 2026
The numbers, at a glance

Calculations run in your browser.
UNDERSTAND THE RESULT

A little context. A clearer answer.

↑ Back to calculator

When this calculator is useful

Check the assumptions and the selected options. Gregorian civil dates from 1900 to 2200 are calculated in UTC, without daylight-saving shifts. Elapsed days exclude the starting date; inclusive counting adds one day, so equal dates count as one. Reversed dates give negative counts. Weeks use the absolute count. Holidays and business-day rules are excluded. For a related calculation, try Decimal hours converter: hours and minutes.

What to enter

InputWhat it meansExample value
Date operationDate operation. Check the assumptions and the selected options.Difference between dates
Start date1900-01-01 – 2200-12-31. Start date.Oct 6, 2026
End date1900-01-01 – 2200-12-31. End date.Dec 31, 2026
Counting conventionGregorian civil dates from 1900 to 2200 are calculated in UTC, without daylight-saving shifts. Elapsed days exclude the starting date; inclusive counting adds one day, so equal dates count as one. Reversed dates give negative counts. Weeks use the absolute count. Holidays and business-day rules are excluded.Elapsed days
Days to add, negative to subtractDays to add, negative to subtract. Check the assumptions and the selected options.—

How the calculation works

  1. Enter the values shown below. Date operation, Start date, End date, Counting convention, Days to add, negative to subtract.
  2. Check the assumptions and the selected options.
  3. Read the result and compare it with the diagram.
The formulaΔ = (UTC([End date]) − UTC([Start date]))/86400000; [Include both dates]: (Δ < 0 ? −1 : 1) × (|Δ|+1); [Add or subtract days]: UTC([Start date]) + 86400000d

A worked example

Change “Counting convention” from Elapsed days to Include both dates and keep the other inputs from the worked example. The value for “Signed day count” goes from 86 to 87.

Example you can load

What to enter
Result for this example · Signed day count86

This is a fixed example; changing the form above does not change these numbers.

Assumptions & limits

Gregorian civil dates from 1900 to 2200 are calculated in UTC, without daylight-saving shifts. Elapsed days exclude the starting date; inclusive counting adds one day, so equal dates count as one. Reversed dates give negative counts. Weeks use the absolute count. Holidays and business-day rules are excluded.

Reference ·

Frequently asked questions

How is the result calculated?

Count calendar days between two dates or add a positive or negative number of days to a date. Δ = UTC(B) − UTC(A); 1 d = 86400000 ms.

How should I enter the values?

Enter the values shown below. Date operation, Start date, End date, Counting convention, Days to add, negative to subtract.

What are the limits?

Gregorian civil dates from 1900 to 2200 are calculated in UTC, without daylight-saving shifts. Elapsed days exclude the starting date; inclusive counting adds one day, so equal dates count as one. Reversed dates give negative counts. Weeks use the absolute count. Holidays and business-day rules are excluded.