Using the Date Difference Calculator
This page counts the calendar span and the total days between two dates. The sample runs from 2024-01-01 to 2024-02-01. The calendar span is 0 years, 1 month, and 0 days. The total is 31 days. The headline is 31 days. Dates use YYYY-MM-DD. The day count is the number of midnights between the dates. January 2024 has 31 days, so the first of January through the first of February crosses 31 midnights and lands on the same day of the next month, which is why the calendar line shows one month and zero leftover days.
The page orders the two dates from earlier to later before it counts. Entering 2024-02-01 first and 2024-01-01 second still reads 2024-01-01 to 2024-02-01, still shows 0 years, 1 month, and 0 days, and still uses the headline 31 days. The lines under the headline are Years, Months, Days, and Total days. For the sample those lines are 0, 1, 0, and 31. The result sentence states both the calendar span and the total.
A date that is not a real YYYY-MM-DD value is rejected. The message names the field, start date or end date, and says it must be a date as YYYY-MM-DD. The sample uses that shape for both fields. Reset returns the fields to 2024-01-01 and 2024-02-01. The page does not apply a time of day. Both dates are read as calendar dates, and the total is whole days.
Keep the headline and the calendar line together when you write the sample down. The headline is 31 days. The calendar line is 0 years, 1 month, and 0 days. The sentence also says the total is 31 days, so the headline and the sentence agree on the midnight count. The Years, Months, Days, and Total days lines are 0, 1, 0, and 31. If a later note keeps only the word month, a reader can forget that this month is January 2024 and that the leftover days are 0. January's 31 midnights are exactly one month from the first to the first. A different month can have a different midnight count while still showing 1 month and 0 days on the calendar line. That is why the total belongs beside the calendar span for this pair, and why the sample is specifically 2024-01-01 to 2024-02-01 rather than a generic month.
What 31 Days Includes
The headline 31 days is the total. The calendar line is the other reading of the same pair: 0 years, 1 month, and 0 days. Both belong to 2024-01-01 and 2024-02-01. The month in the calendar line is singular because the count is 1. The years and the leftover days use the plural form because those counts are 0. The total uses days because 31 is not 1. The lines repeat the same four numbers: Years 0, Months 1, Days 0, and Total days 31. The sentence puts them in one place so a copy can carry both readings.
The 31 days are the midnights from 1 January through 1 February. The calendar span does not list those midnights one by one. It walks years, then months, then leftover days from the earlier date to the later date. On this pair the walk uses one month and no leftover days, and the midnight count is still 31 because January has 31 days. The two readings describe one span. They are not two different intervals.
How the Sample Is Counted
Enter 2024-01-01 as the start and 2024-02-01 as the end. The page reads both values as YYYY-MM-DD, orders them so the earlier date comes first, and counts. The calendar result is 0 years, 1 month, and 0 days. The total is 31 days. The headline is 31 days. Swap the fields and calculate again. The sentence still starts at 2024-01-01 and ends at 2024-02-01, and the headline is still 31 days. The order of the fields does not create a negative span.
A day total without the calendar line is a different page. The Age in Days Calculator counts the days from one date to another. 2024-01-01 to 2024-02-01 is 31 days. The count is the number of midnights between the dates. That page does not also spell out 0 years, 1 month, and 0 days. Use it when you want the 31 days alone. Use this page when you want the headline 31 days and the calendar span beside it.
What the Two Readings Share
The calendar span and the total days are two descriptions of one ordered pair. For the sample, the earlier date is 2024-01-01 and the later date is 2024-02-01. From that earlier date, one month lands on 2024-02-01, so the leftover days are 0. The midnight count along that same path is 31. If a later pair does not land on the same day number, the Days line is the leftover after whole years and whole months, and the total days line is still every midnight. Read both before you drop one of them from a note.
The page does not attach a clock. 2024-01-01 means that calendar date, not a time on that date. There is no field for hours. A same-day pair, the same YYYY-MM-DD in both fields, is 0 years, 0 months, and 0 days, and the headline is 0 days. That zero is the midnight count between a date and itself. It is not an error. An impossible day, such as a month and day that do not exist, is rejected instead of being rolled into the next month.
The Sample and a Swapped Pair
Enter 2024-01-01 and 2024-02-01. Confirm the sentence says 0 years, 1 month, and 0 days, that the total is 31 days, and that the headline is 31 days. Confirm the lines are Years 0, Months 1, Days 0, and Total days 31. Swap the dates. Confirm the sentence still runs from 2024-01-01 to 2024-02-01 and the headline is still 31 days. Enter the same date in both fields and confirm the headline is 0 days. Enter 2024-02-31 and confirm the rejection that asks for YYYY-MM-DD. The sample pair is the one that should show one month and 31 days together.
Weeks are a different grouping of the same kind of midnight. The Age in Weeks Calculator turns the days between two dates into weeks and leftover days. 2024-01-01 to 2024-01-29 is 4 weeks and 0 days. A week is 7 days. That page does not report 0 years, 1 month, and 0 days for the February sample, and its headline is not the calendar month count. Use it when you want weeks. Use this page when you want 31 days and the month span for 2024-01-01 to 2024-02-01.
Dates the Page Accepts
Both fields must be dates as YYYY-MM-DD. The year is four digits, the month is two, and the day is two, separated by hyphens. A month and day that are not on the calendar are rejected. The message names Start date or End date. The page does not swap in a nearby valid day. 2024-01-01 and 2024-02-01 are valid, and they are the sample. Text such as a month name is rejected because it is not YYYY-MM-DD.
The count uses calendar dates. It does not start at a time of day, and it does not stop at a time of day. The total is whole days, the midnights between the earlier date and the later date. The calendar line uses completed years, then months, then days. For the sample that is 0 years, 1 month, and 0 days, with the total 31 days and the headline 31 days. There is no third date. There is no time zone field, because the values are dates rather than clock times.
Mistakes That Split the Two Readings
The usual miss is to keep the headline 31 days and drop the calendar line, then later treat 31 days as something other than 0 years, 1 month, and 0 days for this pair. Both readings belong to 2024-01-01 and 2024-02-01. Another miss is to expect a negative number when the later date is typed first. The page orders the dates. Another miss is to call the span 1 month and 1 day by counting 1 February as an extra day on top of the month. The leftover days are 0. The 31 days are the total, not an addition to the month. Another miss is to enter a slash or a month name. The fields require YYYY-MM-DD.
Completed age from a birth date is a different calendar walk. The Chronological Age Calculator counts the completed years, months, and days from a birth date to an as-of date. 15 January 2000 through 9 November 2026 is 26 years, 9 months, and 25 days. That page does not report the sample pair as 31 days. Use it when you have a birth date and an as-of date. Use this page when you want the headline 31 days for 2024-01-01 to 2024-02-01.
Keeping Both Counts
Copy the sentence and the headline together. For the sample, the sentence says 2024-01-01 to 2024-02-01 is 0 years, 1 month, and 0 days, and the total is 31 days. The headline is 31 days. If you write only 31 days, add the two dates beside it so the number stays attached to this pair. If you write only 1 month, add the 0 leftover days and the total 31 so the calendar line is not mistaken for a 30-day month in general. January 2024 is what makes this particular month 31 days long. When you file several pairs, give each pair its own sentence. The page shows one pair at a time, and a note that stacks headlines without dates will mix 31 days from this sample with 0 days from a same-day check. Include the field order you typed only if you also record that the page reordered the dates. The printed sentence always runs from the earlier date to the later date.
The page orders the dates, so your note can list them earlier then later even when you typed them the other way. A same-day check of 0 days is worth keeping once, so a later zero is recognizable as a real result. An invalid day does not produce a headline. Do not record a span for a field the page rejected. Reset restores 2024-01-01 and 2024-02-01 when you want the sample back in the form.
Counting the Sample Again
Enter 2024-01-01 and 2024-02-01. Confirm 0 years, 1 month, and 0 days, the total 31 days, and the headline 31 days. Swap the fields and confirm the same sentence and the same headline. Enter one date in both fields and confirm 0 days. Enter a day that is not on the calendar and confirm the YYYY-MM-DD rejection. Return to the sample and confirm the four lines are 0, 1, 0, and 31. The midnight count and the calendar span should still describe the same pair.
Adding a fixed number of days to one date is a different page. The Pregnancy Due Date Calculator adds 280 days to the first day of the last menstrual period. 2024-01-01 plus 280 days is 2024-10-07. The page says this is not a diagnosis. It does not report 0 years, 1 month, and 0 days, and it does not use the headline 31 days. Use it when you want that 280-day date. Use this page when you want the span between two dates you already have.
What the Headline Adds Up To
The headline 31 days is the number of midnights from 2024-01-01 to 2024-02-01. The calendar line says that same interval is 0 years, 1 month, and 0 days. The lines Years, Months, Days, and Total days repeat 0, 1, 0, and 31. Swapping the fields does not change the headline, because the page orders the dates. A matching pair of dates is 0 days. A value that is not YYYY-MM-DD does not get a headline.
You can say the sample is 0 years, 1 month, and 0 days. You can say the total is 31 days and the headline is 31 days. You can say the count is midnights between the dates. You cannot say the span is negative when the later date is typed first. You cannot say the month line replaces the day total. Both are shown because a month in this pair is 31 midnights, and the leftover day count is 0. Say the dates in the order the sentence prints them, earlier then later, even if you typed February first. Say that both fields were YYYY-MM-DD. A retelling that switches to month names is fine as an explanation only when the note still contains 2024-01-01 and 2024-02-01, because those are the values the page accepted. The headline 31 days should appear in the same retelling as the calendar line, so the two readings are not split across two notes and later treated as two spans.
Checking the Sample Span
Start with 2024-01-01 and 2024-02-01. Confirm the headline is 31 days and the sentence includes 0 years, 1 month, and 0 days. Confirm the total in the sentence is 31 days. Swap the fields and confirm the headline stays 31 days. Then use the same date twice and confirm 0 days. Then reject a date that is not YYYY-MM-DD. If the sample headline is 30, the midnight count did not use January's length. If the Days line is 1, the calendar walk counted 1 February as a leftover day on top of the month.
Unix seconds are a different scale. The Unix Timestamp Converter converts Unix seconds to a UTC date, and a UTC date to Unix seconds. Mode unix and the value 1600000000 is 2020-09-13 12:26:40 UTC. Mode date reads YYYY-MM-DD HH:MM:SS in UTC and returns the seconds. That page converts in both directions. It does not report 0 years, 1 month, and 0 days for the January sample. Use it when you have an instant. Use this page when you have two dates.