Bookmarks    
nPr and nCr    
Random Number    
SD Calculator    
Sample Size    
Percent Error    
Density    
Molarity    
Molar Mass    
Ohm's Law    
Watts to Amps    
Voltage Drop    
Long Division    
Mixed Numbers    
Rounding    
Nth Root    
Exponents    
Half-Life    
Polar Form    
De Moivre    
3D Distance    
Point to Line    
Cross Product    
Determinant    
Sin Cos Tan    
Triangle Area    
Scale Factor    
Sector Area    
Ellipse Area    
Cube Volume    
Box Volume    
Sphere Volume    
Cone Volume    
Pipe Volume    
Time Duration    
Time Card    
Present Value    
Future Value    
Churn Rate    
A/B Test Calc    
SEO Traffic    
Ideal Weight    
Fat Intake    
Child Height    
Golf Handicap    
Heat Index    
Wind Chill    
Dew Point    
Download Time    
kWh to Cost    
AC Size (BTU)    
Heating Costs    
LED Savings    
Trip Gas Cost    
Tire Size    
Solar Output    
Solar Payback    
Battery Size    
Wall Area    
Gravel Needed    
Mortar Mix    
Slope Grade    
Curtain Size    
Soil Needed    
Sod Needed    
Ramp Length    
Blind Size    
Drain Slope    
Board Feet    
Heat Loss    
Furniture Fit    
Moving Boxes    
Plywood Cuts    
Shelf Sag    
   Add
Probability and random number calculators
Independent Events
Independent Events
Two Events Solver
Two Events Solver
Repeated Trials
Repeated Trials
Bayes' Theorem
Bayes' Theorem
Expected Value
Expected Value
Binomial Distribution
Binomial Distribution
nPr and nCr
nPr and nCr
Circular Permutation
Circular Permutation
With Repetition
With Repetition
Random Number
Random Number
Averages and statistics calculators
Average Calculator
Average Calculator
Mean Median Mode
Mean Median Mode
SD Calculator
SD Calculator
Quartiles & IQR
Quartiles & IQR
Frequency Table
Frequency Table
Correlation (r)
Correlation (r)
Normal Probability
Normal Probability
Z-Score Calculator
Z-Score Calculator
Confidence Interval
Confidence Interval
Sample Size
Sample Size
Mark & Recapture
Mark & Recapture
P-Value Calculator
P-Value Calculator
Percentage and ratio calculators
Percentage Calc
Percentage Calc
Percent Change
Percent Change
Percent Difference
Percent Difference
Percent Error
Percent Error
Ratio Calculator
Ratio Calculator
Discount Calculator
Discount Calculator
Sales Tax Calculator
Sales Tax Calculator
Margin Calculator
Margin Calculator
Speed calculators
Speed Calculator
Speed Calculator
Density and concentration calculators
Density
Density
Molarity
Molarity
Molar Mass
Molar Mass
Physics and electricity calculators
Ohm's Law
Ohm's Law
Watts to Amps
Watts to Amps
Resistor Colors
Resistor Colors
Voltage Drop
Voltage Drop
Unit conversion calculators
Weight Converter
Weight Converter
Shoe Size Converter
Shoe Size Converter
Integer and signed number calculators
Long Division
Long Division
LCM Calculator
LCM Calculator
GCF Calculator
GCF Calculator
Integer Calculator
Integer Calculator
Prime Factorization
Prime Factorization
Diophantine Solver
Diophantine Solver
Modulo Calculator
Modulo Calculator
Factor Calculator
Factor Calculator
Roman Numerals
Roman Numerals
Fraction, decimal and rounding calculators
Fraction Calculator
Fraction Calculator
Mixed Numbers
Mixed Numbers
Simplify Fractions
Simplify Fractions
Fraction to Decimal
Fraction to Decimal
Decimal to Fraction
Decimal to Fraction
Rounding
Rounding
Equation and inequality calculators
Linear Equation
Linear Equation
Linear Systems
Linear Systems
Quadratic Formula
Quadratic Formula
Absolute Value
Absolute Value
Quadratic Inequality
Quadratic Inequality
Polynomial calculators
Binomial Theorem
Binomial Theorem
Square root and nth root calculators
Simplify Radicals
Simplify Radicals
Nth Root
Nth Root
Exponent and logarithm calculators
Exponents
Exponents
Log Calculator
Log Calculator
Number of Digits
Number of Digits
Scientific Notation
Scientific Notation
Sci. Notation Math
Sci. Notation Math
Half-Life
Half-Life
Complex number calculators
Complex Numbers
Complex Numbers
Polar Form
Polar Form
De Moivre
De Moivre
Function and graph calculators
Slope Calculator
Slope Calculator
Linear Function
Linear Function
Direct & Inverse Variation
Direct & Inverse Variation
y = ax² Calculator
y = ax² Calculator
Distance Formula
Distance Formula
3D Distance
3D Distance
Section Formula
Section Formula
Point to Line
Point to Line
Lat/Long Distance
Lat/Long Distance
Complete the Square
Complete the Square
Circle Equation
Circle Equation
Conic Sections
Conic Sections
Polar Coordinates
Polar Coordinates
Sequence calculators
Arithmetic Sequence
Arithmetic Sequence
Geometric Sequence
Geometric Sequence
Fibonacci Sequence
Fibonacci Sequence
Recurrence Relation
Recurrence Relation
Vector calculators
Vector Calculator
Vector Calculator
Cross Product
Cross Product
Matrix calculators
Matrix Calculator
Matrix Calculator
Determinant
Determinant
Inverse Matrix
Inverse Matrix
Plane geometry calculators
Sin Cos Tan
Sin Cos Tan
Degrees ⇔ Radians
Degrees ⇔ Radians
a sin θ + b cos θ
a sin θ + b cos θ
Triangle Solver
Triangle Solver
Triangle Area
Triangle Area
Right Triangle
Right Triangle
Pythagorean Theorem
Pythagorean Theorem
Polygon Angles
Polygon Angles
Scale Factor
Scale Factor
Parallel Lines
Parallel Lines
Rectangle Area
Rectangle Area
Parallelogram Area
Parallelogram Area
Trapezoid Area
Trapezoid Area
Circle Calculator
Circle Calculator
Sector Area
Sector Area
Inscribed Angle
Inscribed Angle
Ellipse Area
Ellipse Area
Solid geometry calculators
Cube Volume
Cube Volume
Cube Surface Area
Cube Surface Area
Box Volume
Box Volume
Box Surface Area
Box Surface Area
Cylinder Volume
Cylinder Volume
Cylinder Surface
Cylinder Surface
Sphere Volume
Sphere Volume
Sphere Surface
Sphere Surface
Spherical Cap Volume
Spherical Cap Volume
Cap Surface Area
Cap Surface Area
Ellipsoid Volume
Ellipsoid Volume
Ellipsoid Surface
Ellipsoid Surface
Pyramid Volume
Pyramid Volume
Pyramid Surface
Pyramid Surface
Cone Volume
Cone Volume
Cone Surface Area
Cone Surface Area
Frustum Volume
Frustum Volume
Frustum Surface Area
Frustum Surface Area
Pipe Volume
Pipe Volume
Capsule Volume
Capsule Volume
Capsule Surface Area
Capsule Surface Area
Date and time calculators
Age Calculator
Age Calculator
Days Between Dates
Days Between Dates
Date Calculator
Date Calculator
Hours From Now
Hours From Now
Day of the Week
Day of the Week
Time Calculator
Time Calculator
Time Zone Converter
Time Zone Converter
Hours Calculator
Hours Calculator
Time Duration
Time Duration
Time Card
Time Card
Finance and economics calculators
Compound Interest
Compound Interest
Simple Interest
Simple Interest
Interest Calculator
Interest Calculator
TVM Calculator
TVM Calculator
Present Value
Present Value
Future Value
Future Value
ROI Calculator
ROI Calculator
IRR Calculator
IRR Calculator
Payback Period
Payback Period
Average Return
Average Return
GDP Calculator
GDP Calculator
Web marketing and ad metric calculators
CTR Calculator
CTR Calculator
Conversion Rate
Conversion Rate
CPC, CPM & CPA
CPC, CPM & CPA
ROAS Calculator
ROAS Calculator
Break-Even CPA
Break-Even CPA
LTV Calculator
LTV Calculator
CAC Calculator
CAC Calculator
Churn Rate
Churn Rate
A/B Test Calc
A/B Test Calc
A/B Sample Size
A/B Sample Size
SEO Traffic
SEO Traffic
Break-Even Point
Break-Even Point
Markup vs. Margin
Markup vs. Margin
CAGR Calculator
CAGR Calculator
Health and fitness calculators
BMI Calculator
BMI Calculator
Sleep Calculator
Sleep Calculator
Calorie Calculator
Calorie Calculator
BMR Calculator
BMR Calculator
TDEE Calculator
TDEE Calculator
Ideal Weight
Ideal Weight
Body Fat Calculator
Body Fat Calculator
Lean Body Mass
Lean Body Mass
Calories Burned
Calories Burned
Protein Intake
Protein Intake
Macro Calculator
Macro Calculator
Carb Calculator
Carb Calculator
Fat Intake
Fat Intake
Child Height
Child Height
Sports calculators
Golf Handicap
Golf Handicap
Pace Calculator
Pace Calculator
1RM Calculator
1RM Calculator
Target Heart Rate
Target Heart Rate
Weather calculators
Heat Index
Heat Index
Wind Chill
Wind Chill
Dew Point
Dew Point
Computer calculators
Base Converter
Base Converter
Subnet Calculator
Subnet Calculator
Download Time
Download Time
Household energy and budget calculators
Electricity Cost
Electricity Cost
kWh to Cost
kWh to Cost
Yearly kWh to Cost
Yearly kWh to Cost
AC Size (BTU)
AC Size (BTU)
AC Running Cost
AC Running Cost
Heating Costs
Heating Costs
Gas vs Electric
Gas vs Electric
LED Savings
LED Savings
Salary Calculator
Salary Calculator
Budget Calculator
Budget Calculator
Car calculators
Trip Gas Cost
Trip Gas Cost
EV Charging Cost
EV Charging Cost
EV vs Gas Cost
EV vs Gas Cost
MPG Calculator
MPG Calculator
Tire Size
Tire Size
Solar power and battery calculators
Solar Output
Solar Output
Solar Panel Count
Solar Panel Count
Solar Payback
Solar Payback
Battery Size
Battery Size
Home and DIY calculators
Tile Calculator
Tile Calculator
Stair Calculator
Stair Calculator
Concrete Volume
Concrete Volume
Wall Area
Wall Area
Wallpaper Rolls
Wallpaper Rolls
Paint Calculator
Paint Calculator
Flooring Needed
Flooring Needed
Exterior Walls
Exterior Walls
Gravel Needed
Gravel Needed
Mortar Mix
Mortar Mix
Slope Grade
Slope Grade
Lumber Cut List
Lumber Cut List
Lot Coverage/FAR
Lot Coverage/FAR
Sheet Vinyl Roll
Sheet Vinyl Roll
Insulation Needed
Insulation Needed
Curtain Size
Curtain Size
TV Size & Distance
TV Size & Distance
Soil Needed
Soil Needed
Sod Needed
Sod Needed
Block Calculator
Block Calculator
Brick Calculator
Brick Calculator
Deck Materials
Deck Materials
Ramp Length
Ramp Length
Pilot Hole Size
Pilot Hole Size
Room Ventilation
Room Ventilation
Paint Thinning
Paint Thinning
Baseboard & Trim
Baseboard & Trim
Blind Size
Blind Size
Picture Hanging
Picture Hanging
Drain Slope
Drain Slope
Screw Calculator
Screw Calculator
Board Feet
Board Feet
Fence Calculator
Fence Calculator
Wood Shrinkage
Wood Shrinkage
Caulk Calculator
Caulk Calculator
Heat Loss
Heat Loss
Furniture Fit
Furniture Fit
Moving Boxes
Moving Boxes
Storage Capacity
Storage Capacity
Plywood Cuts
Plywood Cuts
Shelf Sag
Shelf Sag

Days Between Dates Calculator (Day Counter)

Enter a start date and an end date. You get the days between them, the inclusive count (with the end date also counted as a day), and the same period in weeks, months, and years, months and days.

If you leave one date blank, today's date is used. If the start date is after the end date, the two are simply swapped.
Result
Enter a start date and an end date in the fields on the left and press "Calculate". The result will appear here.

What you can do on this page

  • Enter a start date and an end date to get the number of days between them on the spot. Leave one of them blank to count "days until the exam" or "days since our anniversary" from today
  • You see both "days between" (the start date not counted) and the inclusive count (both the start and end dates counted), so you will not mix them up when counting hotel nights, days of medicine or prorated rent
  • The same period is also shown in years, months and days, in months, and in weeks
  • A plain-language explanation of how to count days and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
Leap days (February 29) are counted correctly, just as on a calendar. This page counts calendar days. It does not count business days (days without weekends and holidays).

What is this calculation used for?

Counting down to an exam or a deadline (study plans)

"If today is July 3 and the exam is on January 16 next year, 197 days are left." Once you know the days left, you can plan with numbers instead of a feeling. For example, to work through 10 practice tests in about 200 days, you have 20 days for each one.
A countdown naturally uses the subtraction, which does not count today. The day before, it shows "1 day left", and on the day itself, "0 days left".

Not mixing up nights and days on a trip

A trip where you check in on August 13 and check out on August 16 is \(16 - 13 = 3\) nights by subtraction, and 4 days by the inclusive count - "3 nights, 4 days".
Hotels charge by the night (subtraction), while things like travel insurance and some rentals charge by the day (inclusive count). Knowing the difference keeps your budget right. (Car rentals often charge per 24 hours rather than per calendar day.)

Counting days of medicine and prescription refills (health)

A 7-day supply of medicine that starts on July 1 is counted inclusively, so the last day you take it is July 7. If you think of it as a subtraction (\(7 - 1 = 6\)), you are off by one day.
Checking "will my medicine last until my next appointment or refill?" means comparing two counts that work differently: the days supplied (inclusive count) and the days until the appointment (subtraction). Knowing the difference helps you avoid running out.

Prorating rent and pay (money)

If you move in on July 10, the first month's rent is often prorated for 22 days out of 31 (inclusive count, \(31 - 10 + 1 = 22\)). You use the apartment on the move-in day itself, so the first day is counted.
Pay for starting or leaving a job in the middle of a month works the same way. How days are counted (inclusive or not) can depend on the lease or contract, so use this to check the numbers against what your contract says.

Counting days of interest on savings and loans (counting one end)

Interest is calculated in proportion to the number of days, as in "principal × rate × days ÷ 365". Banks commonly count interest from the day of the deposit up to, but not including, the day of the withdrawal - that is, counting one end only, the same as the subtraction.
For example, if you deposit money on April 1 and withdraw it on April 30, that is 29 days of interest. A one-day difference in counting changes the interest, so this helps you read the day-count terms in your account or loan documents.

Counting weeks of pregnancy and the due date (splitting into weeks)

Pregnancy is counted from the first day of the last menstrual period as day 0, and day 280 (\(280 = 7 \times 40\), so 40 weeks 0 days) is the usual estimated due date. "How many weeks and days pregnant am I today?" is exactly the weeks formula on this page: divide the days since the start date by 7.
Prenatal visits and tests are scheduled by week, so being able to switch between days and weeks makes your records much easier to follow.

Formula

Days between two dates (by subtraction)
Standard notation (the usual math form)
\(D\) \(=\) \(N_2\) \(-\) \(N_1\)
In words (symbols replaced with words)
③ \(D\): days between the dates \(=\) ① \(N_2\): serial number of the end date \(-\) ② \(N_1\): serial number of the start date
The formula in words
① Take the \(N_2\): serial number of the end date
② subtract the \(N_1\): serial number of the start date
③ and you get the \(D\): days between the dates (counting the start date as day 0)
Quick example
The number of days from January 1, 2025 to March 1, 2025 is (using the same serial numbers as Excel, where January 1, 1900 is number 1, January 1, 2025 is 45658 and March 1, 2025 is 45717)
\(D\): days between the dates \(=\) serial number of the end date (45717) \(-\) serial number of the start date (45658)
\(45717 - 45658 = 59\)
Key idea
A "serial number" is a number given to every date on the calendar in order, one per day (Excel calls it a serial number too). With subtraction, you get an exact count without worrying about the different month lengths (28 to 31 days) or leap years. To count by hand, go month by month and add. January 1 to January 31 is \(31 - 1 = 30\) days, February has 28 days, and 1 more day brings you to March 1, so \(30 + 28 + 1 = 59\) days. Note that this formula does not count the start date (it counts the start date as day 0). From January 1 to January 2 is 1 day.
Counting the end date too (inclusive count)
Standard notation (the usual math form)
\(D'\) \(=\) \(D\) \(+\) \(1\)
In words (symbols replaced with words)
③ \(D'\): inclusive count \(=\) ① \(D\): days between the dates \(+\) ② \(1\): the start date itself
The formula in words
① Take the \(D\): days between the dates
② add \(1\): the start date itself
③ and you get the \(D'\): inclusive count (both the start date and the end date count as a day)
Quick example
From January 1, 2025 to March 1, 2025, counting both the first and the last day, gives
\(D'\): inclusive count \(=\) days between the dates (59 days) \(+\) the start date itself (1 day)
\(59 + 1 = 60\)
Key idea
The days \(D\) from subtraction do not count the start date. This is what you want for a countdown such as "days until the exam", or for the number of nights in a hotel. On the other hand, when both the first and the last day should count, such as the days you take a medicine, the days of a rental, or "how many days does the festival run", add 1 to get the inclusive count. The most important step in counting days is to decide first which of the two counts the situation needs.
Days in weeks
Standard notation (the usual math form)
\(D\) \(=\) \(7\) \(\times\) \(W\) \(+\) \(r\)
In words (symbols replaced with words)
① \(D\): days between the dates \(=\) ② \(7\): days in a week \(\times\) ③ \(W\): weeks \(+\) ④ \(r\): extra days
The formula in words
① Divide the \(D\): days between the dates
② by \(7\): days in a week
③ the whole-number answer is the \(W\): weeks
④ and the remainder is the \(r\): extra days
Quick example
59 days in weeks is (\(59 \div 7 = 8\) remainder \(3\), so "8 weeks and 3 days")
days between the dates (59 days) \(=\) days in a week (7) \(\times\) weeks (8 weeks) \(+\) extra days (3 days)
\(59 = 7 \times 8 + 3\)
Key idea
Turning days into weeks is simply division by 7 with a remainder. The whole-number answer is the weeks, and the remainder is the extra days. Pregnancy written as "X weeks Y days" and a baby's age in weeks are counted the same way.
Days in years, months and days, and in months
Standard notation (the usual math form)
\(M\) \(=\) \(12\) \(\times\) \(y\) \(+\) \(m\)
In words (symbols replaced with words)
④ \(M\): total months \(=\) ② \(12\): months in a year \(\times\) ① \(y\): years \(+\) ③ \(m\): extra months
The formula in words
① Split the period into "\(y\) years \(m\) months \(d\) days" and take the \(y\): years
② multiply by \(12\): months in a year to turn years into months
③ add the \(m\): extra months
④ and you get the \(M\): total months (the extra days \(d\) cannot become months because months are not all the same length, so they stay as days)
Quick example
April 10, 2024 to June 20, 2025 (= 1 year, 2 months and 10 days) in months is
\(M\): total months \(=\) months in a year (12) \(\times\) years (1 year) \(+\) extra months (2 months)
\(12 \times 1 + 2 = 14\)
Key idea
The answer in this example is "14 months and 10 days". The split into "1 year, 2 months, 10 days" follows the calendar, the same way as an age: starting from the start date, first add as many whole years as fit (1 year), then whole months (2 months), and count what is left in days (10 days). A month is counted as complete when you reach the same day number in the next month (the corresponding date). The different month lengths (28 to 31 days) are built into this count, so there is no fixed rule such as "1 month = 30 days". For what happens when the next month has no such day, as with January 31, see "corresponding date" in the glossary.
Counting days starts with subtracting one date from the other, which gives the days without counting the start date. When both the first and the last day should count, add 1 (the inclusive count). The trick is to decide first which of the two counts you need.

Symbols and terms

Symbols

\(D\) D The number of days between two dates (the answer of the date subtraction, with the start date as day 0). From the first letter of "days".
\(N_1\), \(N_2\) N sub 1, N sub 2 The serial numbers of the start date (\(N_1\)) and the end date (\(N_2\)). The same idea as the serial numbers in Excel, which count days with January 1, 1900 as number 1.
\(D'\) D prime The inclusive count, with both the start date and the end date counted as a day. \(D' = D + 1\). The prime mark (′) is often used for a slightly changed version of the original quantity.
\(W\), \(r\) W, r The weeks (\(W\)) and the extra days (\(r\)). Divide the days \(D\) by 7. The whole-number answer is \(W\) and the remainder is \(r\).
\(y\), \(m\), \(d\) y, m, d (lowercase) The parts of a period split into "\(y\) years \(m\) months \(d\) days". (Example - for 1 year, 2 months and 10 days, \(y = 1\), \(m = 2\), \(d = 10\))
\(M\) M (capital) The period written in months only (total months). Found with \(M = 12y + m\). (Example - 1 year 2 months is \(M = 14\) months)

Terms

calendar days Every day on the calendar, counted the same whether it is a weekday, a weekend or a holiday. This is different from business days (days without weekends and holidays). This page counts calendar days.
exclusive count A way of counting a period that does not count the first day. Subtracting one date from the other gives this count, with the start date as day 0. "Within 3 days from today" in this sense starts counting from tomorrow. Many legal and contract deadlines are counted this way, but check the exact wording when it matters.
inclusive count A way of counting in which both the start date and the end date count as a day. It is the answer of the date subtraction plus 1. It is used when each day itself is used, such as days of medicine, rental periods or the length of a construction job.
counting one end A way of counting in which only one of the start date and the end date is counted. The answer is the same as the date subtraction. Banks often count interest days this way - interest is earned from the day of the deposit up to, but not including, the day of the withdrawal. If neither end is counted, the answer is the subtraction minus 1.
corresponding date The same day number in a later month or year. For January 15, the corresponding date in the next month is February 15. The extra months in a period are counted by whether this date has been reached. When the next month has no such day, as with January 31, the last day of that month takes its place, and the month is complete when that last day ends.
leap year A year with a February 29. It usually comes every 4 years, but years divisible by 100 are common years unless they are divisible by 400 (2100 is not a leap year, 2000 was). This calculator counts like a calendar, so a February 29 inside the period is counted as a day.
serial number The running number that Excel and spreadsheets use to store dates. January 1, 1900 is 1, and the number goes up by 1 each day (January 1, 2025 is 45658). You can subtract one date from another in Excel because a date is really this number. Excel has an old quirk of counting a "February 29, 1900" that never existed, so these numbers are 1 larger than a true calendar count (this does not affect the number of days you get by subtraction).

Good to know before you start

Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.
If you get stuck, going back over these topics is the quickest way forward.

How the calendar works (Grades 3–4)
  • Knowing that 1 week = 7 days and 1 year = 12 months
  • Knowing that months have 28 to 31 days (the rhyme "Thirty days hath September, April, June and November" helps you remember)
  • Knowing that about every 4 years there is a year with a February 29 (a leap year)
Subtraction on paper (Grades 2–4)
  • Being able to do a 2-digit subtraction such as 31 − 10 in your head or on paper
  • Knowing that a subtraction of larger numbers, such as 45717 − 45658, works the same way when you line up the place values
Division with remainders (Grade 4)
  • Being able to find the quotient and remainder, as in 59 ÷ 7 = 8 remainder 3
  • Seeing that the remainder is the "extra days" in "X weeks and Y days"
Multi-digit multiplication (Grades 4–5)
  • Being able to turn years into months by multiplying by 12, as in 12 × 36

How to calculate it in Excel

Copy the whole table below and paste it into cell A1 in Excel. It works as is.
Table to find the days between two dates
Start date 2025-01-01
End date 2025-03-01
Days between (start date not counted) =B2-B1
Inclusive count (both dates counted) =B2-B1+1
Table for the days in weeks
Start date 2025-01-01
End date 2025-03-01
Weeks =INT((B2-B1)/7)
Extra days =MOD(B2-B1,7)
Table for years, months and days, and total months
Start date 2025-01-01
End date 2025-03-01
Years =DATEDIF(B1,B2,"Y")
Extra months =DATEDIF(B1,B2,"YM")
Extra days =DATEDIF(B1,B2,"MD")
Total months =DATEDIF(B1,B2,"M")
Table for days since and until today (a trick that needs no second date)
A past date (such as an anniversary) 2025-01-01
Days from that date to today =TODAY()-B1
A future date (such as an exam) 2027-01-16
Days from today to that date (days left) =B3-TODAY()
Type dates in the form 2025-01-01 (year-month-day). Excel reads this form as a date whatever your regional settings are. You can subtract one date from another directly: in the first table, B3 shows 59 and B4 shows 60. The second table gives 8 weeks and 3 extra days, and the third gives 0 years, 2 extra months, 0 extra days and 2 total months. If "=B2-B1" shows up as a date such as "2/28/1900", change the cell format to "Number".
In the DATEDIF function in the third table, the third argument means: "Y" = years, "YM" = extra months, "MD" = extra days, "M" = total months. (DATEDIF does not appear in the list of suggested functions, but it has worked in every version of Excel.) However, "MD" is known to be off by 1 or 2 days, or even to give odd values, around the ends of months (for example, when you start on the 31st). When the extra days matter, use this calculator's result as your guide.
With TODAY() as in the fourth table, the "since today" and "until today" counts update every time you open the file.

How to calculate it in Google Sheets

Copy the whole table below and paste it into cell A1 in Google Sheets. It works as is.
Table to find the days between two dates
Start date 2025-01-01
End date 2025-03-01
Days between (start date not counted) =B2-B1
Inclusive count (both dates counted) =B2-B1+1
Table for the days in weeks
Start date 2025-01-01
End date 2025-03-01
Weeks =INT((B2-B1)/7)
Extra days =MOD(B2-B1,7)
Table for years, months and days, and total months
Start date 2025-01-01
End date 2025-03-01
Years =DATEDIF(B1,B2,"Y")
Extra months =DATEDIF(B1,B2,"YM")
Extra days =DATEDIF(B1,B2,"MD")
Total months =DATEDIF(B1,B2,"M")
Table for days since and until today (a trick that needs no second date)
A past date (such as an anniversary) 2025-01-01
Days from that date to today =TODAY()-B1
A future date (such as an exam) 2027-01-16
Days from today to that date (days left) =B3-TODAY()
In Google Sheets, DATEDIF, TODAY, INT and MOD work exactly as in Excel. Copy the whole table, paste it into cell A1, and replace the dates in B1 and B2 with your own.
As in Excel, if a subtraction shows up as a date, change the format to "Number" (Format > Number), and DATEDIF with "MD" can be off by 1 or 2 days around the ends of months.

How to calculate it in Python

from datetime import date

start = date(2025, 1, 1)   # start date
end = date(2025, 3, 1)     # end date (use date.today() for today)

days = (end - start).days            # days between the two dates (start date not counted)
days_inclusive = days + 1            # counting both the start and end dates (inclusive)
weeks, extra_days = divmod(days, 7)  # weeks and extra days

# Total months: year difference x 12 + month difference. If the end day comes before the start day, the last month is not complete yet, so subtract 1
total_months = (end.year - start.year) * 12 + (end.month - start.month) - (end.day < start.day)

print(f"Days: {days} days ({days_inclusive} days inclusive)")
print(f"Weeks: {weeks} weeks and {extra_days} days")
print(f"Total months: {total_months} months")
Runs with the standard library only. You can subtract one date from another directly, and ".days" gives the number of days as a whole number. In the total months line, "(end.day < start.day)" checks whether the day of the end date comes before the day of the start date, which means the last month is not complete yet. Python treats the result True/False as 1/0 in subtraction (the same idea as the adjustment in the age formula).

How to write it in LaTeX and other math languages (copy and paste)

Days between two dates (by subtraction)
D = N₂ − N₁
D = N_2 - N_1
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>D</mi><mo>=</mo>
    <msub><mi>N</mi><mn>2</mn></msub><mo>&#x2212;</mo>
    <msub><mi>N</mi><mn>1</mn></msub>
  </mrow>
</math>
D = N_2 - N_1
days = DateDifference[startDate, endDate, "Day"]
days := n2 - n1;
days_between = days(end_date - start_date);
D = N_2 - N_1
Counting the end date too (inclusive count)
D′ = D + 1
D' = D + 1
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <msup><mi>D</mi><mo>&#x2032;</mo></msup><mo>=</mo>
    <mi>D</mi><mo>+</mo><mn>1</mn>
  </mrow>
</math>
D' = D + 1
daysInclusive = days + 1
daysInclusive := days + 1;
days_inclusive = days_between + 1;
D' = D + 1
Days in weeks
D = 7W + r (0 ≤ r ≤ 6)
D = 7W + r\ \ (0 \le r \le 6)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>D</mi><mo>=</mo>
    <mn>7</mn><mi>W</mi><mo>+</mo><mi>r</mi><mspace width="0.7em"/>
    <mo>(</mo><mn>0</mn><mo>&#x2264;</mo><mi>r</mi><mo>&#x2264;</mo><mn>6</mn><mo>)</mo>
  </mrow>
</math>
D = 7W + r (0 <= r <= 6)
{weeks, remDays} = QuotientRemainder[days, 7]
weeks := iquo(days, 7); remDays := irem(days, 7);
num_weeks = floor(days_between/7); rem_days = mod(days_between, 7);
D = 7W + r (0 ≤ r ≤ 6)
Days in years, months and days, and in months
M = 12y + m
M = 12y + m
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>M</mi><mo>=</mo>
    <mn>12</mn><mi>y</mi>
    <mo>+</mo><mi>m</mi>
  </mrow>
</math>
M = 12y + m
totalMonths = 12*years + extraMonths
totalMonths := 12*years + extraMonths;
total_months = 12*num_years + extra_months;
M = 12y + m

How to have ChatGPT  do the calculation

You are a day-counting assistant. Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing).

The start date is January 1, 2025, and the end date is March 1, 2025.
Find each of the following:
1. The number of days between the two dates (the date subtraction, with the start date as day 0)
2. The number of days counting both the start date and the end date as a day (inclusive count)
3. The number from 1 written as "X weeks and Y days"

Show the code you used and the numbers from the execution result.

How to Use
  1. 1
    Enter your numbers
    Type the numbers you want to calculate with into the input fields
  2. 2
    Calculate
    Press the "Calculate" button
  3. 3
    Check the result
    The result appears on the spot. The same page also explains the idea behind the calculation and the formula
  DataChef Features
Easy and Free
Unlimited conversions for free.
No technical knowledge required.
Intuitive and user-friendly operation.
No Registration Required
Available immediately after access.
Can be used without registering personal information.
Safe and Secure
Fully SSL encrypted communication.
Automatic file deletion by clicking "download".
Fast
High-speed site access
and rapid file conversion.
No Watermark
No watermark.
No attribution required.
Commercial Use Available
Free for commercial use.
No need to contact us for commercial use permission.