ToolSprinkle.

Date difference calculator

Calculate signed calendar days and full weeks between dates. Check leap-year examples and understand start-day, daylight-saving and holiday limits.

A little more clarity.
PROCESSED ON YOUR DEVICE

Ready when you are.

◎ No uploads. Your input stays here.↗ Free to use. No account needed.⌘ / Ctrl + Enter to run

A worked example

Set the two date fields as shown, or use Try an example. The interval excludes the start date; no timezone is required.

Input / settings

Start date: 2024-01-01
End date: 2024-02-01

Expected result

31 calendar days
4 full weeks and 3 days
2024-01-01 → 2024-02-01
A LITTLE GUIDANCE

How to use Date difference calculator

Choose start and end dates. The result updates automatically, or select Run tool. The start date is excluded: the same date gives zero and the next date gives one. Reverse the dates for a negative day count.

Good to know

Uses calendar dates in UTC so daylight-saving changes do not alter day counts. It does not count business days or holidays.

A few quick answers.

Are both start and end dates counted?

No. The result is the elapsed calendar-day difference; the same date gives zero. Dates are compared at UTC midnight so daylight-saving changes do not create partial days.

Is my input sent to a server?

No. This tool processes your input in your browser. We don't store your text, files or results. Standard website access logs are separate; read our privacy notes.

Can I use it for free?

Yes. No account, subscription or usage credits are required.

How do I keep my result?

Use Copy or Download after running the tool. Inputs are not saved automatically and disappear when you leave or refresh the page.

Calendar-day counting without daylight-saving surprises

Elapsed days versus inclusive counting

Start 2024-01-01 and end 2024-02-01 gives 31 calendar days: 4 full weeks and 3 days. The same start and end gives 0. To count both endpoint dates for a forward interval, add 1 yourself; January 1 through January 3 inclusive covers 3 dates, while this tool returns an elapsed difference of 2.

Leap-year examples you can reproduce

2024-02-28 to 2024-03-01 gives 2 days because February 29 exists in 2024. The same interval in 2023 gives 1 day. Gregorian leap years are divisible by 4, except century years must also be divisible by 400: 2000 was a leap year; 1900 was not. Invalid dates are rejected rather than carried into the next month.

Calendar dates are not elapsed local hours

Dates are compared at UTC midnight and the millisecond difference is divided by 86,400,000. Thus 2024-03-30 to 2024-04-01 gives 2 days even in a region changing its clocks that weekend. This does not measure the hours between two local appointments; use explicit timezone offsets in the Unix converter to inspect those instants.

Reversed dates and non-working days

2024-02-01 to 2024-01-01 gives -31 calendar days. The secondary line is -4 full weeks and 3 days: full weeks truncate toward zero and remainder days are shown as an absolute amount. Read the signed calendar-day total for direction. Weekends and holidays are included; this is not a business-day, age-in-years or legal-deadline calculator.

Choose the representation you need: inspect a timestamp and its UTC instant, count calendar days or convert an integer’s base. Copy a value before switching tools; no input is transferred automatically. Base conversion changes notation, not timestamp units.

Method references: JavaScript Date, timestamps and UTC and BigInt exact integer arithmetic.

Keep your flow going.

More calculators ↗

What would you like to do?

↑ ↓ Navigate · Enter Open · Esc Close. Switching tools clears unsaved input.