CALENDAR ARITHMETIC

Comparing thirty days with one calendar month

Thirty days and one calendar month can land on the same date or on different ones. This guide runs both operations from the same start date and shows why they drift apart.

Two operations that share a start date

Adding days and adding months look similar in a planning spreadsheet, yet they follow different rules. A day offset counts date boundaries one at a time, so the result depends only on how many days sit between the start and the end. A month shift changes the month index and keeps the day of the month where the destination month allows it. The Add days calculator and the Add Months Calculator on this site implement those two rules separately. The purpose of this guide is to put both on one start date, read the outputs side by side and see exactly when they agree. Everything here is date arithmetic on a calendar. It does not decide what a contract, a bill or a deadline means.

Walking through February 2024

Start at 2024-02-01. Adding 30 days moves through the rest of February, which has 29 days in 2024 because it is a leap year. Twenty-eight steps reach 2024-02-29, one more reaches 2024-03-01, and the thirtieth step reaches 2024-03-02. Adding one calendar month to the same date moves the month index from February to March and keeps day 1, which gives 2024-03-01. The two results differ by exactly one day because February 2024 is one day shorter than thirty. In a common year with 28 days the gap would be two days. The month shift never needed to count days at all, while the day offset had to cross the full length of February.

How a month shift chooses its day

A month shift works on a year and month index, so adding one month to a date in January gives a date in February and adding one to December rolls into January of the next year. The day of the month is carried over unchanged when the destination month has that day. When it does not, the day is clamped to the last day of the destination month. This is the rule stated in the calculator formula: shift the index by whole months, then clamp the day to the destination month length. The clamp is a convention that keeps the result a valid date. Other systems may handle a missing day differently, so a tool that follows another rule can disagree with this one for the same inputs.

Starting on the 31st in two different years

Month ends show the clamp clearly. Adding one month to 2023-01-31 would need February 31, which does not exist, so the result is 2023-02-28. Adding 30 days to the same date goes through the 28 days left in February and two more into March, ending at 2023-03-02. The month shift therefore lands four days earlier than the day offset. In 2024 the same start behaves a little differently. Adding one month to 2024-01-31 gives 2024-02-29, and adding 30 days gives 2024-03-01. Same day and month, different year, different gap. That is why a rule such as the same date next month needs a stated fallback for short months before anyone relies on it.

A mid-month start where the gap is small

Starting in the middle of a month avoids the clamp, so the month shift is simple. From 2024-03-15, adding one month gives 2024-04-15. Adding 30 days gives 2024-04-14, because March has 31 days and the 30-day interval is one day shorter than the span from March 15 to April 15. The gap here is a single day, and it comes from the length of March alone. Run the same start in a month with 30 days, such as April 15, and the two operations agree: one month gives May 15, and 30 days also reaches May 15. The agreement is a property of that particular month length, which is why it should not be treated as a general rule.

When both operations agree

The two results match whenever the number of days in the span covered by the month shift equals the offset. Starting on 2024-03-31 shows a case with a clamp. One month gives 2024-04-30, since April has only 30 days. Adding 30 days from March 31 also reaches 2024-04-30, because March 31 plus 30 days is the thirtieth day after March 31 in a month with 30 days. So a clamped month shift and a plain 30-day offset can agree even though they got there by different routes. A reader who only compares the final dates may conclude the operations are interchangeable. A second test from another start date, such as the February 1 example, usually reveals that they are not.

Keeping the requested unit explicit

Records often carry a label such as monthly, every 30 days or four weeks, and these are three different intervals. Monthly refers to the calendar and produces a date whose day tends to repeat. Every 30 days refers to a count and drifts through the calendar, passing each day of the month over time. Four weeks is 28 days and keeps the weekday fixed. When a source says only monthly, the arithmetic cannot tell which one was meant, so the better habit is to store the unit next to the number. If the original request says days, use the day offset. If it says calendar months, use the month shift. Changing the unit silently changes the dates that follow.

Checking a schedule built from either rule

A repeating schedule shows the difference over many steps. Adding one month at a time to a starting date on the 15th keeps landing on the 15th, so the dates stay easy to read and match a monthly calendar entry. Adding 30 days at a time from the same start moves forward by 30 days every time, so the day of the month wanders and the weekday shifts by two each step. After twelve steps the month rule has returned to the same date a year later, while twelve 30-day steps cover 360 days and stop short of the anniversary by five or six days. If you need a schedule that matches the calendar, use months. If you need equal gaps between events, use days.

What these examples do not decide

The outputs are ordinary calendar dates. They do not interpret billing terms, notice periods, legal deadlines, statutory periods or contract language, and they do not account for holidays, weekends or business-day rules. They also say nothing about time zones or elapsed hours, which matter when a timestamp crosses midnight or a daylight saving change. If a document defines a period in its own words, follow that wording and, where it matters, confirm the reading with the party that wrote it. Use the two calculators to check the arithmetic after the rule has been chosen, and record which rule was used so another person can reproduce the dates later.

Reproduce the checks

Fixed thirty-day offset

Open the Add days calculator and enter:

Starting date
2024-02-01
Days to add or subtract
30

Expected output:

Resulting calendar date

2024-03-02

Thirty date steps are added.

One calendar-month shift

Open the Add Months Calculator and enter:

Calendar date
2024-02-01
Months
1

Expected output:

Date

2024-03-01

The day remains the first of the next month.

References and implementation scope

The examples describe the behavior of the linked Computandum tools. A successful local check does not establish that another application accepts the same format or applies the same limits.

Sources

Related tasks