Skip to content
UtilHQ
Data Tools

How to Calculate Days Between Two Dates

Step-by-step guide to calculating the exact number of days between any two dates. Covers leap years, business days, month lengths, and worked examples.

By UtilHQ Team
Ad Space

Counting the days between two dates comes up constantly: tracking how many days until a deadline, figuring out how long a warranty lasts, calculating the length of a pregnancy, or determining how many business days a project will take. Simple subtraction doesn’t work because months have different lengths and leap years throw off the count. This guide walks through the exact method for getting it right every time.

Why You Can’t Just Subtract

If you need the days between March 10 and June 10, you might think the answer is simply “3 months = 90 days.” But March has 31 days, April has 30, and May has 31. The actual count from March 10 to June 10 is 92 days. That two-day difference can matter for interest calculations, contract deadlines, or medical due dates.

The problem gets worse across year boundaries and leap years. The gap between December 15, 2023 and March 15, 2024 isn’t the same as from December 15, 2024 to March 15, 2025, because 2024 is a leap year (adding a day in February) and 2025 isn’t.

Month Lengths Reference

Memorize this table or keep it handy:

MonthDaysCumulative (from Jan 1)
January3131
February28/2959/60
March3190/91
April30120/121
May31151/152
June30181/182
July31212/213
August31243/244
September30273/274
October31304/305
November30334/335
December31365/366

The cumulative column shows the day number within the year. January 31 is day 31. February 28 is day 59 (in a non-leap year). This makes within-year calculations quick: the days between April 15 and October 3 is day 276 minus day 105 = 171 days.

Leap Year Rules (The Complete Set)

A year is a leap year if it meets ALL of these conditions:

  1. Divisible by 4 — 2024, 2028, 2032 are all leap years
  2. NOT divisible by 100 — 2100, 2200, 2300 will NOT be leap years
  3. UNLESS also divisible by 400 — 2000, 2400 ARE leap years

Practical shortcut: for dates between 1901 and 2099, just check divisibility by 4. The century-year exceptions only matter for dates spanning 1900 or 2100.

Step-by-Step: Manual Calculation Method

Goal: Find the number of days between January 23, 2025 and September 8, 2025.

Step 1: Count remaining days in the start month. January has 31 days. From Jan 23 to Jan 31 = 8 days.

Step 2: Add up the full months in between.

  • February: 28 days (2025 isn’t a leap year)
  • March: 31
  • April: 30
  • May: 31
  • June: 30
  • July: 31
  • August: 31
  • Total full months: 212 days

Step 3: Add the days in the final month. September 1 through September 8 = 8 days.

Step 4: Sum everything. 8 + 212 + 8 = 228 days.

You can verify this instantly with our Date Calculator.

Worked Example: Across a Leap Year

Goal: Days between November 20, 2023 and April 5, 2024.

Step 1: Remaining days in November: 30 - 20 = 10 days.

Step 2: Full months in between:

  • December 2023: 31
  • January 2024: 31
  • February 2024: 29 (2024 is a leap year)
  • March 2024: 31
  • Total: 122 days

Step 3: Days in April: 5 days.

Step 4: Total: 10 + 122 + 5 = 137 days.

If you forgot that 2024 was a leap year, you would get 136 days — one day off, which could mean missing a filing deadline.

Business Days vs. Calendar Days

Calendar days include every day: weekdays, weekends, and holidays. Business days (also called working days) typically exclude Saturdays and Sundays, and sometimes public holidays.

To calculate business days:

  1. Count the total calendar days between the two dates.
  2. Count the number of complete weeks in that span. Each week has 5 business days and 2 weekend days.
  3. Count the remaining partial-week days and check which are weekdays.
  4. Subtract any public holidays that fall on weekdays.

Example: January 6, 2025 (Monday) to January 24, 2025 (Friday).

  • Calendar days: 18
  • Complete weeks: 2 (Jan 6-17) = 10 business days
  • Remaining days: Jan 20-24 (Mon-Fri) = 5 business days
  • Total business days: 15 (assuming no holidays)
  • If Martin Luther King Jr. Day (Jan 20) is observed: 14 business days

Business-day counting matters for shipping estimates, legal deadlines (courts often use business days), employee PTO calculations, and contract terms.

Common Use Cases

Project Deadline Tracking

If a project starts on March 1 and the deadline is 90 calendar days later, the due date is May 30 (not May 31, because you count the first day). Many project managers prefer to track in business days. A 90-business-day deadline starting March 1 would land around July 1, depending on holidays.

Warranty Periods

A 365-day warranty starting on the purchase date of June 15, 2025, expires on June 15, 2026. A 180-day warranty from the same date expires on December 12, 2025. These calculations require counting actual days, not estimating “about 6 months.” Use the Date Calculator to add a specific number of days to any start date.

Pregnancy Due Dates

The standard pregnancy calculation counts 280 days (40 weeks) from the first day of the last menstrual period. Starting from April 1, 2025: April has 29 remaining days, May 31, June 30, July 31, August 31, September 30, October 31, November 30, December 31, then 6 days into January = 280 days, making the due date January 6, 2026.

Interest Calculations

Financial institutions use day counts for interest accrual. A savings account paying 4.5% APY on a $10,000 balance earns:

  • Daily interest: $10,000 x 0.045 / 365 = $1.23 per day
  • Over 90 days: $1.23 x 90 = $110.96

Some institutions use a 360-day year convention (called “Actual/360”), which slightly increases the daily rate. Knowing the exact day count ensures your interest calculations match the bank’s.

Contract Terms

Many legal contracts specify durations in days. A “30-day notice period” means exactly 30 calendar days, not “about a month.” If notice is given on January 15, the 30-day period ends on February 14. Getting this wrong could void a contract clause or miss a cancellation window.

Converting to Other Units

Once you have the day count, converting is straightforward:

From DaysToFormula
DaysWeeksdays / 7
DaysMonths (approx)days / 30.44
DaysYears (approx)days / 365.25
DaysHoursdays x 24
DaysMinutesdays x 1,440
DaysSecondsdays x 86,400

The 365.25 divisor for years accounts for leap years averaged over time. For exact year-month-day breakdowns, use the Age Calculator, which handles the variable month lengths.

Quick Mental Math Tricks

  • Same month: Just subtract the two day numbers. April 5 to April 22 = 17 days.
  • Adjacent months: Days remaining in the first month + days into the second month. March 25 to April 10 = 6 + 10 = 16 days.
  • Quarterly estimate: Each calendar quarter is roughly 91 days (Q1: 90 or 91, Q2: 91, Q3: 92, Q4: 92).
  • Half year: Exactly 181 days (Jan 1 to July 1 in a non-leap year) or 182 days in a leap year.

Frequently Asked Questions

How do I count days between dates that span multiple years?

Break the calculation into three parts. First, count the remaining days in the start year (from the start date to December 31). Second, add 365 for each full year in between (366 for leap years). Third, count the days from January 1 to the end date in the final year. Sum all three parts. For example, from October 1, 2024 to March 15, 2026: 91 days remaining in 2024 + 365 days for all of 2025 + 74 days into 2026 = 530 days.

What is the difference between calendar days and business days?

Calendar days include every day on the calendar: Monday through Sunday, including holidays. Business days (also called working days) count only weekdays — Monday through Friday — and often exclude public holidays. A 30-calendar-day period is about 4 weeks and 2 days, but it contains only about 21-22 business days depending on holidays. Legal and financial contexts usually specify which type of day count applies.

Do I count the start date, the end date, or both?

This depends on context, and it’s a common source of off-by-one errors. The most standard convention is to exclude the start date and include the end date. So from January 1 to January 3, the count is 2 days (January 2 and January 3). Some legal and medical contexts count both the start and end dates (inclusive counting), making the same range 3 days. Always clarify which convention applies to your situation. The Date Calculator uses the standard exclusive-start convention for its day counts.

How many business days are in a year?

A standard year has 260 weekdays (52 weeks x 5 days). After subtracting U.S. federal holidays (typically 11), the count drops to about 249 business days. Leap years don’t significantly change this number — they might add or subtract one business day depending on which day of the week the extra day falls on. Individual companies may observe additional holidays, so always check the specific holiday calendar that applies to your situation.

Share this article

Have suggestions for this article?