Menu
Advertisement

Date Calculator to Add and Subtract Days

Pick a start date, then add or take away years, months, weeks and days. The new date comes with its weekday, day of the year and week number.

By Nethanel Bar, Co-founder & CEO

Last updated

Advertisement

Ready to actually learn to code?

Coddy teaches you by writing real code in your browser - interactive lessons, instant feedback, and AI help when you get stuck.

How to add days to a date

Days and weeks are easy to add, because they always have the same length. Months and years do not. The tool adds the years and months first, then the weeks and days, the same order Python's dateutil uses. When the day does not exist in the month you land in, such as January 31 plus one month, the date moves to the last day of that month, February 28, and a note under the result tells you.

That is why 90 days and 3 months give different answers. 90 days after November 21, 2026 is Friday, February 19, 2027, while 3 months after it is February 21. For notice periods, trial periods, warranties and return windows, use the unit the rule is written in.

Today comes from your device's own clock and time zone, so it is your today, wherever you are. The start date can be any day from 1900 to 2100. To count the days between two dates you already know, use the days between dates calculator instead.

What date arithmetic teaches you

  • Calendar maths is not plain addition. Days and weeks have fixed lengths; months (28 to 31 days) and years (365 or 366) do not.
  • The order of the steps matters. January 30, 2027 plus 1 month and 2 days is March 2 when the month goes first, and March 1 when the days go first. This tool puts the month first.
  • The day of the year runs from 1 on January 1 to 365, or 366 in a leap year. February 19, 2027 is day 50.
  • An ISO date such as 2027-02-19 puts the year first, so dates sort correctly as plain text. That is why programs, file names and databases use it.
  • In Python, timedelta(days=90) adds days and weeks, and relativedelta(months=1) from python-dateutil adds months and stops at the month's last day, as this tool does.

How to use the date calculator

  1. Check the start date

    It starts on today. Change the day, month or year, or press Today to go back to it.

  2. Choose Add or Subtract

    Add moves forward in time and shows The new date. Subtract moves back and shows The earlier date.

  3. Enter the amount

    Type years, months, weeks and days in any mix; an empty box counts as 0. Or press 30, 60, 90, 100 or 180 days under Quick picks.

  4. Read the new date

    It comes with its weekday, the ISO date, the days from the start date, the day of the year and the ISO week number.

Days, weeks and months compared

What the quick picks come to in weeks, and how they compare with months and years.

AddIn weeks and daysCompare with
30 days4 weeks and 2 days1 month is 28 to 31 days
60 days8 weeks and 4 days2 months are 59 to 62 days
90 days12 weeks and 6 days3 months are 89 to 92 days
100 days14 weeks and 2 days3 months and 8 to 11 days
180 days25 weeks and 5 days6 months are 181 to 184 days
365 days52 weeks and 1 day1 year is 365 or 366 days

Date calculations to try

90 days from a date

Paste a small example into the tool and change one part at a time.

Friday, February 19, 2027. The ISO date is 2027-02-19, it is day 50 of the year and in week 7 of 2027. The 90 days quick pick fills in the same amount.

One month after January 31

Copy the original value, run the tool, then compare the result.

Sunday, February 28, 2027, 28 days from the start date. February has no 31st, so the date moves to the month's last day and a note says so. In a leap year it would be February 29.

Six weeks before a date

Take a value from your own work and use this tool to inspect or prepare it.

Monday, January 18, 2027, 42 days earlier. A week is always 7 days, so subtracting weeks never needs the month rule.

The same sums in Python

datetime and dateutil
from datetime import date, timedeltafrom dateutil.relativedelta import relativedelta
print(date(2026, 11, 21) + timedelta(days=90))      # 2027-02-19print(date(2027, 1, 31) + relativedelta(months=1))  # 2027-02-28print(date(2027, 3, 1) + timedelta(weeks=-6))       # 2027-01-18print(date(2027, 2, 19).strftime("%A"))             # Friday

timedelta handles days and weeks, which never change length, and a negative one goes back in time. relativedelta handles months and years and lands on the last day of a shorter month, the same rule the tool uses.

Common date calculation mistakes

  • Adding 30 days when the rule says one month. They match only in 30-day months: from January 31, 2027, 30 days is March 2 and one month is February 28.
  • Adding one month twice and expecting 2 months. January 31, 2027 plus 1 month is February 28, and plus 1 more is March 28, while plus 2 months at once is March 31.
  • Counting the start date as day 1. The tool counts from the start date, so 1 day after Monday is Tuesday. If your rule counts the first day as day 1, add one day less.
  • Reading the week number as a US week. The result shows the ISO 8601 week, which starts on Monday; a US calendar can show a different number, most of all on Sundays and in early January.
  • Forgetting that today depends on where you are. The start date follows your device, so someone in another time zone may already be on the next day.

Date calculator FAQ

What date is 90 days from today?

Leave the start date on today and press 90 days. The answer changes every day, so the tool works it out from your device's date rather than printing one here.

How do I add days to a date?

Enter the start date, keep Add selected and type the number of days. You can mix in weeks, months and years too.

How do I subtract days from a date?

Switch to Subtract and type the amount. The answer appears as The earlier date.

What is one month after January 31?

February 28, or February 29 in a leap year, because February has no 31st. The page shows a note when the day had to move.

Is the start date counted as day 1?

No. Adding 1 day to Monday gives Tuesday. If your rule counts the start day as day 1, add one day less.

In what order are years, months, weeks and days added?

Years and months first, then weeks and days. This matches relativedelta in Python's dateutil.

Which week number does the result show?

The ISO 8601 week: weeks start on Monday, and week 1 is the week with the year's first Thursday. The week number page also shows US weeks.

How far back or ahead can I go?

The start date can be any day from 1900 to 2100, and the result can land far outside that range, from the year 1 to 9999.

Learn more

Other developer tools

Coddy programming languages illustration

Learn to code with Coddy

Get started