Subtracting two dates sounds like primary-school math. Then leap years, time zones and weekends show up.
Most people learn the formula once in school and never touch it again — until life forces them to. Subtracting two dates sounds like primary-school math. Then leap years, time zones and weekends show up.
Days = |end − start| / 86,400,000 (in milliseconds)
From the 1st to the 5th — is that 4 or 5 days? Exclusive (4) is what most calculators report; inclusive (5) is what hotels charge you.
Working days excludes weekends and (optionally) public holidays. Useful for project deadlines, contract terms, leave calculations.
Months range from 28 to 31 days. Most calculators average 30.44 days/month — fine for casual use, wrong for legal periods.
How do I subtract dates including time? Calculate the difference in milliseconds, divide by 86,400,000 for days. Round to taste.
Are public holidays deducted? Not by default — you'd need a country-specific holiday list. Most generic calculators only exclude weekends.
Whatever number you land on, sanity-check it against a second method or a quick estimate in your head. Try the How to Count Days Between Two Dates (and Why It Is Trickier Than You Think) linked above to put these numbers to work right now.