Date and time

Date calculator

Turn two calendar dates into an exact interval for planning, records, or comparison. The result separates a raw day count from familiar calendar units.

Enter your values

Your results

Signed total days
—
Whole years
—
Additional months
—
Additional days
—

How we got this result: The page substitutes your current entries into this rule: The signed day count is the UTC difference divided by 86,400,000 milliseconds. A second pass counts whole calendar years, then months, then days.

How to use this calculator

  1. Enter start date, end date.
  2. Review the assumptions and units shown beside the fields.
  3. Read the live result, calculation note, and worked examples before using the answer.

A deadline can need two different interval answers

A project begins on November 15, 2023 and closes on February 20, 2025. One manager needs the exact number of midnights crossed for a daily rate. Another needs a phrase suitable for a contract summary: one year, three months, and five days. Both descriptions concern the same endpoints, yet they organize the interval differently.

This calculator returns a signed total-day difference plus a nonnegative calendar breakdown between the earlier and later dates. The sign preserves the direction in which the dates were entered. The year-month-day components describe the magnitude in familiar calendar units. Before using either output, decide whether your rule asks for elapsed distance, inclusive counted dates, business days, or a named calendar period.

Why January 1 to January 2 is one day

Elapsed-day subtraction measures the distance between date boundaries. From the start of January 1 to the start of January 2, one 24-hour calendar interval has elapsed. It does not count both date labels as two units. This convention suits duration, age, and many scheduling calculations, but a checklist that asks how many dates are included may use a different rule.

To create an inclusive count for a forward range, a policy may add one to the elapsed total so both endpoints are counted. Do that only when the rule truly defines inclusion; do not build it silently into every answer. Reversed ranges, partial days, and jurisdiction-specific deadlines can require additional interpretation. Label the convention beside the result.

QuestionOutput to start withAdjustment or caution
How many days elapsed?Signed total daysZero means identical dates
How many date labels are included?Total-day magnitudeA forward inclusive rule may add one
How long in calendar language?Years, months, additional daysMonth lengths are not uniform
How many workdays?Neither output aloneWeekends and holidays need a work-calendar rule
When does a legal period end?Use only as arithmetic supportThe governing rule controls inclusion and deadlines

Three ranges that expose calendar behavior

From February 28 to March 1, 2024, the tested function returns 2 signed days, 0 years, 0 months, and 2 additional days. February 29 sits between the endpoints. The same month-and-day labels in a common year would describe a different elapsed distance, which is why a real calendar calculation is safer than memorizing February as always having 28 days.

From November 15, 2023 to February 20, 2025, the function returns 463 days and a breakdown of 1 year, 3 months, and 5 days. The components are not converted using average month lengths. They are produced by adding whole calendar months to the earlier date, clamping to the last day of a shorter month, and counting the remaining days.

Entering December 31, 2026 first and January 1, 2026 second returns -364 signed days. The magnitude breakdown is 0 years, 11 months, and 30 days because it always runs from the earlier date to the later date for those components. The minus sign therefore belongs to the total-day direction; it does not turn each breakdown component negative.

Use the sign as an input-order diagnostic

A positive total means the second date follows the first. A negative total means the second date precedes the first. Zero means both inputs name the same calendar date. This behavior is useful in spreadsheets or data checks because a negative value can flag a reversed sequence without discarding the size of the gap.

The calendar components answer a different question: what is the distance between the earlier and later endpoint? Their magnitude stays positive. If you need a signed year-month-day expression, define how signs should apply before formatting it. Writing -0 years, -11 months, -30 days is not automatically equivalent to every calendar subtraction convention.

Borrowing days from a month is not borrowing thirty

The breakdown adds whole months to the earlier date, keeping its day number or moving it to the last day of a shorter month, and counts the days left until the later date. Because months contain 28, 29, 30, or 31 days, the leftover days depend on where the endpoints sit on the calendar. This makes the result sensitive to where the endpoints sit on the calendar.

End-of-month intervals can have more than one reasonable human convention. Advancing one month from January 31 is not self-evident because February lacks the 31st. Some systems clamp to the last day, while others carry overflow. The function here reports its tested breakdown, but an external contract or date library may use another rule. Compare conventions before exchanging results across systems.

These inputs are calendar dates, not clock timestamps

A date such as 2026-06-10 does not state an hour, time zone, or daylight-saving offset. The tool is intended for date-level comparison and reports whole days. It should not be used to measure a 23-hour daylight-saving day, a flight duration, or a service-level deadline stated in hours. Those tasks need timestamps and an explicit zone.

Using date fields also means that a late-evening event and an early-morning event on consecutive dates appear one calendar day apart even if only minutes separated them. That is correct for the chosen data type and wrong for elapsed clock time. Match input precision to the question instead of expecting a date-only calculator to recover missing hours.

Weekdays and holidays form another layer

A total of ten elapsed days does not reveal how many working days occurred. Weekends depend on the working week, and holidays depend on country, region, organization, and sometimes year. Emergency closures and substitute holidays add further exceptions. A generic date interval cannot invent that calendar responsibly.

For operational planning, start with the endpoint dates and use a business-day method configured with the correct weekend and holiday set. Preserve the source of the holiday list. If a deadline is legally important, consult the applicable rule for what happens when the nominal date falls on a nonworking day. Arithmetic identifies dates; policy determines consequences.

Ambiguous source dates cause larger errors than leap years

A string such as 04/05/2026 can mean April 5 or May 4. Rewrite ambiguous dates in year-month-day form or spell the month before entry. Confirm that an archival source uses the same calendar system and that a two-digit year has been expanded correctly. A perfectly handled leap day cannot rescue a transposed month and day.

Unknown dates should remain unknown. Replacing a missing day with the first of a month creates a precise-looking interval that the evidence does not support. If estimation is necessary, calculate a range using the earliest and latest plausible dates and label the method. Retain the original text so a later correction can be applied.

A reproducible workflow for records and deadlines

Write the purpose and counting rule first. Copy both endpoints from their sources, calculate the signed day total, and check whether the direction matches the event sequence. Then inspect the calendar breakdown if a human-readable duration is useful. Save the endpoints, result, convention, and calculation date together.

For a deadline, independently verify the governing rule about the triggering day, final day, weekends, holidays, time of day, and time zone. For a project estimate, add contingency as its own assumption rather than moving the source dates silently. For data analysis, test a sample of known intervals, including a leap day and a reversed pair, before processing a large file.

  • Choose elapsed, inclusive, business-day, or policy-defined counting.
  • Normalize unambiguous source dates before entering them.
  • Use the total's sign to verify chronological order.
  • Keep the endpoints beside every derived interval.
  • Escalate official deadline interpretation to the responsible authority.

Testing date intervals before a bulk calculation

When a spreadsheet contains thousands of pairs, inspect the distribution before accepting the output. Count negative, zero, unusually large, and missing intervals. A cluster of negative values may reveal reversed columns; a set of century-long gaps may indicate two-digit years or placeholder birth dates. Automated arithmetic makes a data-entry problem repeat faster, so validation belongs before and after calculation.

Create a small test set whose answers can be reasoned about independently: identical dates, adjacent dates, a leap-day crossing, a year boundary, an end-of-month pair, and a reversed pair. Run those cases whenever date parsing or software changes. Keep the expected outputs with the dataset documentation so another analyst can reproduce the convention instead of guessing from the final column.

Missing values should propagate as missing rather than becoming zero-length intervals. Zero is a meaningful answer indicating equal endpoints, while missing means the comparison could not be made. Preserve that distinction in exports and summaries. Otherwise the average duration can be biased by records that were never valid intervals.

Historical records may not share one calendar

Modern software generally applies a consistent civil calendar representation across its supported date range. Historical documents may have been written under another calendar, local adoption date, or record-keeping convention. Entering the printed labels directly can imply a relationship the source did not intend. Genealogical and archival work may therefore need calendar conversion before ordinary subtraction.

The page does not identify calendar provenance. Note the source, place, transcription convention, and any conversion performed. When the record is uncertain, report a range or uncertainty statement rather than a single authoritative duration. This caution is separate from leap-year arithmetic: the problem is what the labels mean, not whether the calculator can count dates once they are defined.

Terms for describing a date interval precisely

An endpoint is either date defining the range. Elapsed days measure the distance between endpoints. Inclusive count treats named boundary dates as counted items under a stated rule. Calendar breakdown expresses a span in whole years, additional months, and residual days. Signed difference preserves the order of subtraction.

Civil date is a calendar label without a clock time. Timestamp identifies a moment with time information and usually a zone or offset. Business day is a working date under a defined calendar. Cutoff is a rule's boundary. Anniversary is a recurring calendar date and may require a convention when the original day is absent in a later month or year.

Reference and example table

CaseMeaning
Example 1April 10 to April 25, 2026 is 15 elapsed days.
Example 2December 31, 2023 to January 2, 2024 is 2 days even though the year changes.
Example 3June 5, 2020 to September 18, 2022 is 2 years, 3 months, and 13 days.

Frequently asked questions

Why are two consecutive dates one day apart rather than two?

Elapsed subtraction measures the distance between their starting boundaries. Counting both printed date labels is an inclusive convention and answers a different question.

Does the calculator include leap day?

Yes, actual calendar dates determine the elapsed total. A range crossing February 29 therefore contains one more day than the equivalent common-year range.

What does a negative total-day result mean?

The second input date is earlier than the first. The years-months-days breakdown still describes the positive magnitude between the earlier and later dates.

Can I use this result for a legal deadline?

Use it only as arithmetic support. The applicable rule determines inclusion, holidays, extensions, time of day, and other consequences, so obtain authoritative interpretation.

Are months treated as thirty days?

No. The breakdown uses calendar fields and the actual length of the relevant month when it must borrow days.

Does it count business days?

No. Business-day counting needs a specified working week and a verified holiday calendar for the relevant place or organization.

Why can the day total and month breakdown feel inconsistent?

Months have unequal lengths. The total counts uniform elapsed days, while the breakdown groups the same span into calendar years, months, and remaining days.

Can this calculator compare times on the same date?

No. Date inputs contain no clock time, so events on the same date have a zero-day difference even if several hours separate them.