Date difference & day counter

Date difference & day counter: use start date, end date. Review the formula, worked example and calculation steps.

Inputs

Use the units shown
RESULT
—

Enter your values and select Calculate.

Formula & explanation
Calendar days = (end UTC midnight − start UTC midnight)/86,400,000

Variables & units

Start date
Gregorian date
End date
Gregorian date

Worked example

2026-01-01 to 2026-02-01 is 31 days.

Assumptions

The start date is excluded. Negative means the end precedes the start; daylight saving does not affect date-only subtraction.

Formula version 1.0.0. JavaScript floating-point arithmetic applies. Results display up to 6 decimal places; stored values retain available precision. Use the units shown.

Practice with an example

Use the default input values to find the answer. The reset icon restores those values.

Calculated on your device. Your latest 100 calculations stay in this browser.