Date / Local utility
Date difference calculator
Count exact calendar days between two dates without daylight-saving drift.
About the Date difference calculator
To count the days between two dates: open the date difference calculator, pick the first date and the second date in the two date boxes, then select Calculate difference. The result is the number of whole calendar days between them, worked out in your browser from the two dates alone.
The count is the gap between the dates, not a tally of the dates themselves: 28 February 2024 to 1 March 2024 comes out as 2 days, because it counts the days that pass rather than both endpoints. The order you enter them in makes no difference, because the tool takes the absolute difference — you will never get a negative number from it. Both dates are converted to whole UTC days before subtracting, so your time zone and any clock change are irrelevant to the answer. Every calendar day counts, including weekends, public holidays and 29 February. There is no time-of-day field, so it cannot measure hours or part-days.
Questions people ask
- Does the count include the last day?
- No. It counts the days between the two dates, so 28 February 2024 to 1 March 2024 returns 2 days rather than 3. If the thing you are counting needs both endpoints included, add one to the answer yourself.
- Does it matter which date I put first?
- No. The tool takes the absolute difference, so 2024-02-28 to 2024-03-01 and 2024-03-01 to 2024-02-28 both return 2 days. The result is never signed, so it will not tell you which date came first.
- Does it count 29 February?
- Yes. Leap days are ordinary days here — the count is a straight subtraction of calendar days, so every 29 February inside the range is included in the total.
- Does it skip weekends and public holidays?
- No, it counts every calendar day. A separate business-days calculator on this site counts Monday to Friday dates only, excluding the start date and including the end date, and that one does not know about public holidays either.
- Can daylight saving or my time zone change the answer?
- No. Both dates are converted to whole UTC days before they are subtracted, so the result depends only on the two calendar dates you picked and not on where you are or what your clock did overnight.
About this date difference calculator
Select a start date and an end date to calculate the exact duration between them. Results show total calendar days, elapsed weeks and remaining days, full months and days, and business days excluding Saturdays and Sundays, with end-date inclusion options.
This tool measures the exact elapsed time between two calendar dates for contracts, project sprints, rental leases, and financial accrual periods. It eliminates timezone discrepancies by normalizing dates to UTC calendar midnights, and features a business day calculation engine that accurately counts working days without transferring schedule data to external servers.
Step by step
- 1Pick starting dateChoose the beginning date from the calendar selector or enter it in standard YYYY-MM-DD format.
- 2Pick ending dateSelect the terminal date. Start and end dates can be ordered interchangeably, with reverse sequences labeled as counting backward.
- 3Choose inclusion preferencesToggle whether to include the end date in the total count (e.g. for inclusive rental or vacation bookings).
- 4Read duration breakdownInspect total days, business days, weeks, and composite year/month/day representations, and copy the desired metric.
Calendar day calculation versus business day mode
Total calendar days represents the absolute astronomical duration between midnights. When business days mode is activated, the engine iterates through each elapsed day and filters out Saturdays (day index 6) and Sundays (day index 0), yielding the exact working day count commonly used for legal notice periods and delivery commitments.
Inclusive versus exclusive date boundary conventions
Different industries apply different boundary conventions. Financial interest calculations typically exclude the end date (30 days between June 1 and July 1). Hotel and vacation rentals typically include both endpoints. Our calculator provides a clear toggle so you can match the exact counting rule your contract requires.
Calendar year and month interval breakdowns
Expressing duration as a raw integer (such as 412 days) is often difficult to interpret in human contracts. The calculator simultaneously provides the decomposed calendar representation: 1 year, 1 month, and 16 days, computed using borrow-and-carry arithmetic across Gregorian month boundaries.
Gregorian leap year rules and century exceptions
Under the Gregorian calendar system established in 1582, years divisible by 4 are leap years containing 366 days, with the exception of century years. Century years divisible by 100 are common years (such as 1900 and 2100) unless they are also divisible by 400 (such as 1600 and 2000). The calculation engine incorporates these exact quadricentennial rules when measuring intervals spanning multi-decade and multi-century periods, ensuring total day counts never drift.
Zero upload security guarantee
Every response from this site is served with a Content Security Policy whose connect-src directive is set to none. That is not a promise in marketing copy; it is an instruction to your browser, and the browser is the one enforcing it. While this page is open it cannot open a connection to anywhere — not to this site, not to anyone else — so there is no path by which your document could be uploaded, not by a bug, not by a future change, not by a script that should not be here. e2e/egress-proof.spec.ts asserts the served header and then tries to send data out by every route a page has and requires each attempt to be refused, and it runs on every build.
The second half of the guarantee is that the code has nowhere to send anything from. lib/tools/local-source-policy.test.ts reads every source file under lib/tools, workers, components and app on every test run and fails the build if any of them contains fetch, XMLHttpRequest, WebSocket, EventSource, sendBeacon or a peer connection, or even a remote address written down in a comment. A tool here cannot acquire an upload by accident, because the file that would have to contain one cannot be committed.
Client-side processing limits
Computations run directly on your own device using WebAssembly, Web Workers, and modern browser APIs including Web Crypto and TextDecoder. There are no server queues, no background telemetry, and no temporary cloud files created. Large operations remain responsive by offloading heavy parsing and conversion tasks to dedicated worker threads, ensuring the browser UI never freezes during intensive document and data processing tasks.
Questions people ask
- Does business day calculation exclude national public holidays?
- No. Because statutory public holidays vary widely across countries, states, and banking jurisdictions, only weekends (Saturdays and Sundays) are automatically excluded.
- Can I calculate the duration between dates in different centuries?
- Yes. The Gregorian calendar algorithm supports historical dates spanning centuries with accurate leap year adjustments.
- How are daylight saving time clock shifts handled?
- Dates are compared at normalized UTC calendar midnight boundaries, preventing one-hour Daylight Saving Time shifts from altering integer day counts.
- Are my entered dates stored or uploaded?
- No. All date calculations execute locally within your browser sandbox with zero network telemetry.
- What happens if the start date is later than the end date?
- The calculator gracefully detects inverted sequences, computes the identical absolute duration, and flags the result as a countdown or negative elapsed interval.