Using Our Tools · Guide · Unit Converters
How to calculate days between two dates
Calendar vs business vs trading days, inclusive/exclusive endpoints, leap years, 30/360 convention, time-zone gotchas, and when to use ISO format to avoid ambiguity.
Counting days between two dates is the kind of problem that feels trivial until the edge cases hit — leap years, inclusive vs exclusive endpoints, business days vs calendar days, time zones, and the 30/360 convention banks still use for interest accruals. A date-difference calculator handles the common cases, but understanding what it’s doing behind the number is what lets you choose the right flavor for contracts, payroll, project planning, or travel.
Advertisement
The three types of day counts
(1) Calendar days. Every day counted, including weekends and holidays. “30 days to return a purchase” is calendar days. Simple subtraction of Julian day numbers.
(2) Business days. Weekends and regional holidays excluded. “Funds clear in 3 business days” means banking business days — Mon–Fri, minus federal holidays.
(3) Trading days. Stock market specifically: ~252 days/year (weekends + market holidays excluded). Used in quant finance for return calculations.
Inclusive vs exclusive endpoints
The trickiest edge case in date math. Is the day between Jan 1 and Jan 2:
Exclusive end (difference): 1 day. This is what subtraction gives you. Jan 2 − Jan 1 = 1.
Inclusive both ends (span): 2 days. Useful when counting “days of vacation” — if you’re off Jan 1 and Jan 2, that’s 2 days of vacation taken.
Most contracts say “within 30 days” and mean calendar days, exclusive of the start date. Always clarify in writing if a deadline is ambiguous.
Leap years — built-in to any good calculator
Leap year rule: divisible by 4, except centuries not divisible by 400. 2000 was a leap year; 1900 was not; 2100 won’t be. 2024 is, 2028 is, etc. A good date calculator handles this automatically — your mental math probably doesn’t.
From Feb 1, 2024 to Feb 1, 2025 = 366 days (includes Feb 29, 2024). From Feb 1, 2025 to Feb 1, 2026 = 365 days. People setting annual subscription renewals via manual date math sometimes lose a day in leap years.
Time zones — same-moment can be different days
A timestamp of 2024-12-31 11:00 PM ET is 2025-01-01 04:00 UTC. If you’re computing “days since last login” across time zones and someone logs in at midnight, the answer depends on which zone you’re anchoring to.
Best practice: store all dates in UTC internally, display in the user’s local zone. Our date calculator treats inputs as civil dates (ignoring time zone) unless you explicitly enter a timestamp.
Business day math — the hidden holiday problem
A “5 business day” calculation requires a holiday calendar. US federal: 11 holidays per year. UK: 8 bank holidays. Japan: 16. India: dozens, with regional variations. “Business days” in one country is different from another, and even between lender and borrower in the same country (mortgage industry counts business days differently from courts).
For precision, name the specific holiday calendar: “5 US federal business days” is unambiguous; “5 business days” alone is not.
30/360 day-count convention (finance)
Used in bond interest calculations: assumes every month has 30 days and every year has 360. A 91-day calendar period might be 90 days under 30/360, affecting accrued interest by 1/365th. Not relevant for personal finance math, everywhere in professional finance.
ACT/365 and ACT/360 variants exist as well. If you’re computing accrued interest on a bond and the number doesn’t match the counterparty’s, day-count convention is the first thing to check.
Common use cases
Project deadlines. “Ship by Q2” — how many working days between today and the last Friday of June? Use business day math.
Age calculations. Years/months/days from DOB to target date. Handle the February 29 corner case — a Feb-29-born person in a non-leap year has their birthday on Feb 28 or Mar 1 depending on jurisdiction.
Vesting cliffs. Startup equity commonly vests at 1 year (the “cliff”). Hired Mar 15, 2024 → cliff on Mar 15, 2025. Note: some cliffs round to the start of the next quarter/month.
Travel and visa planning. Schengen Area rule: max 90 days in any 180-day rolling window. Needs careful date-range subtraction; spreadsheets beat mental math here.
Payroll periods. Biweekly pay periods drift relative to calendar months. Some years have 27 biweekly paychecks instead of 26; employers handle this differently.
Loan maturity. “5 years from origination” — add 5 × 365 days? Or 5 calendar years (handle leap years)? Contracts usually specify the latter.
One more gotcha — the date string format
“3/4/2025” is March 4 in US and April 3 in UK, Europe, and most of the rest of the world. ISO format (YYYY-MM-DD) is the only truly unambiguous representation and is what any database should store. When sending dates in emails or contracts to an international audience, spell out the month (“4 March 2025” or “March 4, 2025”).
Run yours
For calendar-day math, use the date difference calculator — enter two dates, get the count in days, weeks, months, years. Pair with the age calculator for DOB-based calculations and the countdown timer when the second date is “now” and you want live days-remaining.
Advertisement