Date Calculator

Count the days between two dates, or add and subtract days from a date.

This date calculator answers two everyday questions: how many days are there between two dates, and what date is a certain number of days before or after another date? Use it to count down to a deadline, work out a due date, check how long ago something happened, or plan a trip. The math uses real calendar dates, so leap years, months of different lengths, and year boundaries are all handled correctly. Pick the mode you need, enter your dates, and the result shows the exact day count and the resulting calendar date.

This is an estimate for information only, not financial or medical advice.

How it works

Dates are converted to Coordinated Universal Time (UTC) at midnight, so daylight saving changes and time zones cannot shift the count by a day. The number of days between two dates is the difference between those UTC timestamps divided by the number of milliseconds in a day. Adding days works the same way in reverse: the day count is added to the starting timestamp and converted back to a calendar date. Because the calculation uses the real calendar, February 29 in a leap year counts as a day like any other, and months with 28, 30, or 31 days are handled automatically.

Days between = (end date in UTC - start date in UTC) / 86,400,000 milliseconds. New date = start date +/- number of days.

Worked examples

ProblemResult
Days from 2026-01-01 to 2026-12-31364 days
Days from 2024-02-28 to 2024-03-01 (leap year)2 days
30 days after 2026-01-152026-02-14
10 days before 2026-03-052026-02-23

Frequently asked questions

How do I calculate the date difference in Excel?

In Excel you can subtract one date cell from another, for example =B1-A1, and format the result as a number to get the day count. This page gives the same answer without a spreadsheet, and it also works out the resulting date when you add or subtract days.

How many days after a date is my due date?

A common pregnancy due date is 280 days, or 40 weeks, after the first day of the last menstrual period. Enter that start date here, choose add days, and enter 280 to see the estimated date. Always confirm a due date with a doctor, because this is only an estimate.

Does this calculator handle leap years?

Yes. It uses real calendar dates, so February 29, 2024 counts as a day, and the span from February 28 to March 1 in a leap year is 2 days, while in a non-leap year it is 1 day.

Is the start date itself counted?

No. The count is the number of days you have to move forward from the start date to reach the end date. From January 1 to January 2 is 1 day, not 2.

Related calculators