Skip to content
CalculatorAtlas

Date Calculator

Tested

Add or subtract days, weeks, months, or years from a date.

Tested, not yet published. The formula for this calculator is implemented and passes its automated checks. This page stays non-indexable until it is reviewed and published.

Results

Enter your values and press Calculate. Results appear here.

  • • Result

Quick answer

A date calculator adds or subtracts years, months, weeks and days from a start date. Months are applied first, then days; when the target month is shorter the day is moved to that month's last day.

Choose add or subtract, enter any mix of years, months, weeks and days, and the result is the new date with its weekday.

Related tools: Days Between Dates Calculator: Number of days, weeks and months between two dates. Age Calculator: Calculate your exact age in years, months and days. Time Duration Calculator: Elapsed time between two clock times, including across midnight.

How to use the Date Calculator

  1. Pick start date.
  2. Choose operation: Add and Subtract.
  3. Optionally, enter years (a whole number, between 0 and 1000).
  4. Optionally, enter months (a whole number, between 0 and 12000).
  5. Optionally, enter weeks (a whole number, between 0 and 100000).
  6. Optionally, enter days (a whole number, between 0 and 1000000).
  7. Press Calculate to see the result, and use Reset to start again.
Inputs of the Date Calculator
InputWhat to enterAllowed values
Start dateA calendar date—
OperationChoose one: Add; SubtractStarts at Add
Years (optional)A whole number≥ 0, ≤ 1000
Months (optional)A whole number≥ 0, ≤ 12000
Weeks (optional)A whole number≥ 0, ≤ 100000
Days (optional)A whole number≥ 0, ≤ 1000000

Formula and method

Formula

result = start ± (years × 12 + months) months ± (weeks × 7 + days) days

Exact integer day arithmetic in UTC; no daylight-saving or time-zone effects.

Months are added first; when the target month is shorter, the day is clamped to the month's last day (31 Jan + 1 month = 29 Feb in a leap year). Days are then added.

Worked examples

These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.

Example 1

Inputs: Start date = 2024-01-31; Operation = Add; Months = 1.

Results of example 1
ResultValue
Resulting date2024-02-29
WeekdayThursday

Example 2

Inputs: Start date = 2024-03-15; Operation = Add; Days = 30.

Results of example 2
ResultValue
Resulting date2024-04-14
WeekdaySunday

Example 3

Inputs: Start date = 2024-02-29; Operation = Subtract; Years = 1.

Results of example 3
ResultValue
Resulting date2023-02-28
WeekdayTuesday

The first line is the headline result (resulting date). Below it the date Calculator lists weekday, which describe the same case from other angles. Exact integer day arithmetic in UTC; no daylight-saving or time-zone effects.

Why the month-end rule matters

Adding one month to 31 January has no 31 February to land on, so the calculator uses the last day of the month: 29 February in 2024, a leap year. Adding days is exact, so 31 January plus 30 days is a different date from 31 January plus one month. Pick the unit that matches the rule in your contract or schedule.

Adding months to 31 January 2024

Every figure in this table comes from running this calculator, so it matches what the form returns.

Adding months to 31 January 2024
Months addedResulting dateWeekday
12024-02-29Thursday
22024-03-31Sunday
32024-04-30Tuesday
122025-01-31Friday

What happens with invalid input

These messages are produced by the calculator itself, so you know what to fix.

  • Start date: entering "bad" shows "Start date must be a valid date." beside that field and no result.
  • Days: entering "1.5" shows "Days must be a whole number." beside that field and no result.

Choosing between the Date Calculator and similar calculators

Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.

Choosing between the Date Calculator and similar calculators
CalculatorYou enterIt returns
[Days Between Dates Calculator](/date-calendar/days-between-dates-calculator/)start date, end date and count end date?Days between
[Age Calculator](/time/age-calculator/)date of birthYour age
[Time Duration Calculator](/time/time-duration-calculator/)start time and end timeDuration
[Hours Calculator](/time/hours-calculator/)start time and end timeHours worked
[Date of Birth Calculator](/date-calendar/date-of-birth/)reference date and yearsDate of birth

Background: dates and times

Date and time results depend on the conventions a tool uses: whether the end date counts, whether weekends and holidays are skipped, how months of different lengths are handled and whether time zones are applied. This page states its convention, and the worked examples show it.

Dates use the Gregorian calendar and calendar days unless the page says otherwise; check deadlines against the rule in your contract or regulation.

Assumptions and limitations

  • Month-end days are clamped
  • Zero offsets return the start date

If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for start date and days to confirm this.

Frequently asked questions

What does the Date Calculator calculate?

Add or subtract days, weeks, months or years from a date. It returns Resulting date and Weekday.

What formula does the Date Calculator use?

result = start ± (years × 12 + months) months ± (weeks × 7 + days) days. Months are added first; when the target month is shorter, the day is clamped to the month's last day (31 Jan + 1 month = 29 Feb in a leap year).

What do I need to enter in the date Calculator?

You enter Start date and Operation. Optional: Years, Months, Weeks and Days.

How is the result rounded or limited?

Exact integer day arithmetic in UTC; no daylight-saving or time-zone effects. Month-end days are clamped.

What are the limits of this calculator?

Month-end days are clamped. Zero offsets return the start date.

What does the “Operation” option change?

It sets how the date is worked out. The choices are Add and Subtract.

What is an example of a date result?

With start date 2024-01-31, operation Add and months 1, the resulting date is 2024-02-29.

Sources

  • ISO 8601-1: Date and time, representations for information interchange (calendar dates, ordinal dates and week dates)
  • Gregorian calendar reform, papal bull Inter gravissimas (1582): the leap-year rule used for all dates

Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.