March 30, 2026 · 7 min read

How to Find Days Between Two Dates (5 Methods)

Whether you're counting days for a deadline, tracking an anniversary, or calculating a contract term, here are five ways to do it.

Method 1: Online Calculator (Fastest)

The fastest way is our days between dates calculator. Enter two dates and instantly get the difference in days, weeks, months, and years. No formulas, no math.

For a more detailed breakdown including hours and minutes, try the date difference calculator.

Method 2: Excel or Google Sheets

Simply subtract one date cell from another:

Total days: =B1-A1

Years, months, days: =DATEDIF(A1, B1, "y") & " years, " & DATEDIF(A1, B1, "ym") & " months, " & DATEDIF(A1, B1, "md") & " days"

Method 3: Python

from datetime import date

d1 = date(2026, 1, 15)

d2 = date(2026, 6, 30)

diff = (d2 - d1).days

print(diff) # 166 days

Method 4: JavaScript

const d1 = new Date('2026-01-15');

const d2 = new Date('2026-06-30');

const days = Math.round((d2 - d1) / 86400000);

console.log(days); // 166 days

Method 5: Mental Math

For rough estimates, count months and multiply by 30:

January 15 to June 30 = 5.5 months ≈ 165 days (actual: 166)

For exact results, use our days between dates calculator.

Frequently Asked Questions

How do I calculate days between two dates?
The easiest way is to use an online calculator. Enter both dates and get the instant result in days, weeks, months, and years.
Does the calculation include the start and end dates?
It depends on the tool. Most calculators count from the day after the start date to the end date. Our calculator shows the total days between (exclusive of start, inclusive of end).