Formula Guide

    How to Calculate Days Between Two Dates

    Calculating the exact number of days between two dates requires accounting for varying month lengths, leap years, and the calendar system. The simplest approach is to convert both dates to a serial day number (like Julian Day Number or a spreadsheet date serial), subtract, and you have the difference in days. This guide explains the concept and shows a manual worked example.

    Last updated: March 31, 2026

    The Formula

    Days between dates = Date2 serial − Date1 serial
    Weeks = Days ÷ 7
    Months ≈ Days ÷ 30.44
    Leap year: divisible by 4, except centuries unless also divisible by 400
    Spreadsheet serial: Excel/Google Sheets count days from January 1, 1900. Day 1 = Jan 1 1900. Subtract two date cells to get the day count directly.

    Variable Definitions

    SymbolNameDescription
    D1, D2Start & End DatesThe two calendar dates to compare — D2 should be the later date for a positive result
    SerialDay Serial NumberA sequential integer assigned to each calendar date for arithmetic purposes

    Step-by-Step Example

    How many days are between March 15, 2024 and November 28, 2024?

    Given

    Start date:March 15, 2024End date:November 28, 2024

    Solution

    1. 1
      Count days remaining in March after the 15th: 31 − 15 = 16 days
    2. 2
      Add days in April through October (7 full months): 30+31+30+31+31+30+31 = 214 days
    3. 3
      Add days in November up to the 28th: 28 days
    4. 4
      Sum all: 16 + 214 + 28 = 258 days

    There are 258 days between March 15 and November 28, 2024.

    Ready to calculate?

    Use the free Date Difference Calculator — instant results, no sign-up.

    Open Calculator

    Common Mistakes to Avoid

    Forgetting leap years — February 29 exists in 2024 (divisible by 4) but not in 2100 (century not divisible by 400).

    Off-by-one errors — whether to include the start date, end date, or both depends on context (e.g. deadline counting vs duration).

    Confusing calendar months with 30-day months — month lengths are 28–31 days, not uniformly 30.

    Ignoring time zones for precise timestamps — if events are in different time zones, convert to UTC first.

    Frequently Asked Questions

    Related Guides