What is a months ago calculator?
A months ago calculator answers a question that sounds trivial but is surprisingly easy to get wrong: what date was it N months before this one? The answer is not "subtract N × 30 days". Months have 28, 29, 30 or 31 days, so counting in months means working on the calendar, not on a fixed day count. This calculator does that arithmetic exactly, and shows you the working.
The rule it uses is the one almost every professional system uses: keep the same day number, and if the target month is shorter, move back to that month's last day. So 31 March minus one month is 28 February (or 29 February in a leap year), and 15 July minus three months is 15 April. This is the same convention as Excel's EDATE function, Google Sheets' EDATE, most programming date libraries, and the deadline rules used in tenancy, warranty and legal documents.
That makes this tool different from an hours ago calculator, which counts elapsed time, and from a days-ago tool, which counts exact days. Months are a calendar unit, and they should be counted on the calendar.
How to use this calculator
- Pick a mode. From today is the default. From a date lets you choose any start date. Between dates reverses the question and tells you how many whole months separate two dates. Months from now runs the arithmetic forward. Monthsary counts months since a relationship start. Age in months converts a birthdate into total months for forms and visas.
- Drag the slider or type a number. Both work at once. The slider covers 0–240 months for fine control; the number field accepts up to 1,200 months (100 years). The result, the month-journey strip, both calendars and every statistic update as you move.
- Use a preset. The chips jump straight to the intervals people actually ask about: 1, 6, 9, 12, 18, 24 months, 3 years, 5 years.
- Read the clamp note. If the target month was shorter than the start month, an amber note explains exactly what happened and why the day moved.
- Scroll the month journey. The horizontal strip shows every intermediate month between the start and the result, so you can see precisely where the year boundary was crossed and which steps clamped.
- Open the month-by-month steps. This lists every intermediate date as a row, with an amber "clamped from 31" badge where the day moved.
- Copy, share or print. The result copies as a plain-language sentence; the share link reproduces your exact inputs; print gives a clean sheet with the interactive controls hidden.
How month subtraction actually works
Subtracting months is not subtraction in the ordinary sense. You convert the date into three parts — year, month number, day — and then do arithmetic on the month number while carrying into the year.
Step 4 is where almost every mistake happens, and it is where most simple calculators quietly give a wrong answer. If you compute 31 March minus one month naively by setting the month to February and keeping the day at 31, you get "31 February", which does not exist. JavaScript's own Date constructor will silently roll that forward into 3 March, which is the wrong direction entirely.
This calculator clamps instead. 31 March minus one month is 28 February in a common year and 29 February in a leap year. That is the behaviour of Excel's EDATE, of the Java LocalDate.minusMonths method, of Python's dateutil.relativedelta, and of the deadline arithmetic used in most contracts. It is the convention that matches what a reasonable person means by "one month earlier".
The clamping is not reversible
This is the part people find surprising. Clamping destroys information, so you cannot always undo a month subtraction by adding the same number of months back:
- 31 March − 1 month = 28 February
- 28 February + 1 month = 28 March, not 31 March
Any system that stores "one month before the end of March" as a date and then adds a month back will land on the 28th, not the 31st. If you need to preserve the original end-of-month intent, store a rule rather than a date. This calculator shows the forward and reverse operations separately so you can see the asymmetry for yourself.
Months vs weeks vs days — why 6 months is not 24 weeks
Six months is often loosely described as "half a year" or "about 26 weeks". Both are approximations, and one of them is dangerously wrong for anything contractual.
| Expression | Exact days | What it is used for |
|---|---|---|
| 24 weeks | 168 | Fixed week-based periods, some HR policies |
| 6 calendar months | 181–184 | Warranties, leases, probation, visa validity |
| 180 days | 180 | Notice periods and rules written in days |
| Half a year (365 ÷ 2) | 182.5 | Rough mental maths only |
A 6-month period is roughly 13 to 16 days longer than 24 weeks. For a warranty or a lease that difference matters at the boundary: something that expires on 24 weeks is still covered two weeks later if the term was written as 6 months. The general principle is simple: count in the unit the period was written in. If the contract says months, use this calculator. If it says days, use a days-ago calculator. If it says weeks, use a weeks calculator. Converting between them introduces an error that can be larger than the margin you are trying to protect.
Worked examples
Example 1 — 6 months ago from today
If today is 20 November 2026, six calendar months earlier is 20 May 2026. The day number is unchanged because May has 31 days and 20 is valid there. The gap is 184 days, about 26 weeks and 2 days.
Example 2 — a warranty that clamps
A product is bought on 31 August 2025 with a 6-month warranty. Six months earlier than 31 August 2026 would be 31 February 2026, which does not exist, so the result clamps to 28 February 2026. That is the warranty expiry date under the standard convention. In a leap year the same rule would give 29 February.
Example 3 — probation from a mid-month start
An employee starts on 14 January 2026 on a 3-month probation. Three months earlier than 14 April 2026 is 14 January 2026, so probation ends on 14 April. No clamping is needed because 14 exists in every month.
Example 4 — 18 months ago from a leap day
Starting from 29 February 2028, eighteen months earlier is 29 August 2026. The intermediate step of 12 months lands on 29 February 2027, which does not exist in a common year, so that single step clamps to 28 February 2027. The final result is unaffected because the total month count is what matters, not the intermediate route.
Example 5 — months between two dates
From 10 January 2025 to 25 August 2025: full months are 7 (to 10 August), and the remainder is 15 days. So the answer is 7 months and 15 days, which is what the between-dates mode reports.
Example 6 — a lease end date
A 12-month tenancy starting on 31 October 2025 ends on 31 October 2026 — the day exists in both months, so no clamping. A 1-month notice served on 31 March 2026 expires on 30 April 2026, because April has 30 days and the day clamps.
Month lengths and leap years
Every clamping question reduces to one fact: how many days does the target month have?
| Month | Days (common year) | Days (leap year) | Clamping possible? |
|---|---|---|---|
| January | 31 | 31 | No |
| February | 28 | 29 | Yes — the most common clamp |
| March | 31 | 31 | No |
| April | 30 | 30 | Yes, from a 31-day month |
| May | 31 | 31 | No |
| June | 30 | 30 | Yes |
| July | 31 | 31 | No |
| August | 31 | 31 | No |
| September | 30 | 30 | Yes |
| October | 31 | 31 | No |
| November | 30 | 30 | Yes |
| December | 31 | 31 | No |
The Gregorian leap-year rule is: divisible by 4, except centuries, except centuries divisible by 400. So 2024, 2028 and 2032 are leap years; 2100 is not; 2000 is. That means February has 29 days in a leap year, which is why 29 February plus or minus 12 months sometimes clamps and sometimes does not.
What is a monthsary, and how do you count it?
A monthsary is the monthly anniversary of the day a couple got together. The word is a portmanteau of "month" and "anniversary", and it is especially common in the Philippines and across Southeast Asia. Couples mark each month — the 1st monthsary is one month after the start date, the 2nd is two months after, and the 12th monthsary is the first anniversary.
The counting rule is the same as month arithmetic everywhere: keep the same day-of-month, and if the target month is shorter, use that month's last day. If you got together on the 14th, every 14th is a monthsary. If you got together on the 31st, you celebrate on the 28th in February (29th in a leap year), on the 30th in April, and on the 31st in the seven months that have 31 days.
The Monthsary mode in the calculator takes the relationship start date and returns how many months together, the next monthsary date and number, and a live countdown in days. It uses the same clamping convention as the other modes, so a couple who started on 31 January will see their February monthsary fall on the 28th (or 29th), and the March one back on the 31st.
The technically correct Latin-derived term is mensiversary — mensis is Latin for month, the way annus is Latin for year. But almost nobody says mensiversary in everyday speech. Monthsary is the word people actually use.
Age in months — for forms, visas and paediatrics
Many forms ask for age in months rather than years. Paediatricians track developmental milestones in months up to 24 or 36. Some visa applications require the applicant's age in months at the date of travel. Insurance quotes sometimes use it for infant policies. The Age in months mode converts a birthdate into total months as of any reference date.
The arithmetic is the months-between calculation: full calendar months from the birthdate to the reference date, plus leftover days. A child born on 10 January 2025 is 7 months and 15 days old on 25 August 2025, which many forms would record as "7 months" (using only the whole months). Read the form's instructions carefully: some want whole months only, some want the exact age, some want months plus days.
Do not confuse this with gestational age, which is counted in weeks from the last menstrual period. An "age in months" calculator gives calendar age since birth, not prenatal development weeks.
Warranties, leases and legal deadlines
Almost every legal and commercial deadline written in months uses the clamping convention. If a warranty says "6 months from purchase", a purchase on 31 August expires on the last day of February, not on 3 March. If a lease says "12 months from commencement" and starts on 31 October, it ends on 31 October the following year — the day exists in both months, so no clamping.
Use the From a date mode for a past deadline, the Months from now mode for a future one, and the Between dates mode to work out how many whole months have already elapsed since a start date.
Quick reference — 1 to 24 months ago
Competitors often publish a static table of "what date was N months ago", but the dates in those tables go stale the moment the page is cached. This calculator generates the table live from your device's current date, so the reference date and every row are always correct. Open the Quick reference panel above the history to see it.
Excel, Google Sheets and code
If you need the same answer in a spreadsheet, the function is EDATE, and it uses exactly the clamping rule this page uses.
=EDATE(A1, -6) returns the date 6 months before the date in cell A1. Use a positive number for a future date.For the number of months between two dates, use =DATEDIF(A1, B1, "m") for whole months, or =DATEDIF(A1, B1, "ym") for the leftover months after whole years. DATEDIF is undocumented in Excel's help but is supported in every version and in Google Sheets.
In code, the equivalent operations are:
- Python:
dateutil.relativedelta(date, months=-6) - Java:
localDate.minusMonths(6) - JavaScript: set
date.setMonth(date.getMonth() - 6)only after clamping the day yourself, because the built-in setter overflows rather than clamps - SQL (PostgreSQL):
date - interval '6 months'
Doing it by hand
You can reproduce any result on this page with a pencil in under a minute:
- Write the date as three numbers: year, month, day. For 20 November 2026 that is 2026, 11, 20.
- Subtract the number of months from the month number. 11 − 6 = 5.
- If the month number goes below 1, add 12 and subtract 1 from the year. Repeating until the month is between 1 and 12 handles any number of months.
- Look up how many days the resulting month has, and if your day number is bigger, use the last day of that month instead.
For 20 November 2026 minus 6 months: month 5 is May, May has 31 days, 20 is valid, so the answer is 20 May 2026. For 31 August 2026 minus 6 months: month 2 is February 2026, February 2026 has 28 days, 31 is not valid, so the answer is 28 February 2026.
Common uses
- Warranties and guarantees. "6 months from purchase" and "24 months from delivery" are month-based terms. The expiry date is the purchase date plus the term in months, computed with clamping. A 31 August purchase with a 6-month warranty expires on the last day of February.
- Probation and notice periods. Employment contracts usually specify probation and notice in months. A 3-month probation from 14 January ends on 14 April; a 1-month notice served on 31 March expires on 30 April.
- Leases and tenancies. Fixed terms and break clauses are month-based. The end date is the start date plus the term, and the same clamping rule applies to the notice date.
- Billing cycles and subscriptions. Monthly subscriptions renew on the same day-of-month, or on the last day if the month is shorter. The anniversary date is a months-from calculation.
- Loan seasoning and mortgage rules. Many lenders require a loan to have been open for a minimum number of months before refinancing. Seasoning is counted in whole calendar months, not days.
- Visa and passport validity. Several countries require a passport to be valid for at least six months beyond the date of entry. "Six months from now" is exactly this calculation.
- Medical follow-up intervals. "Review in 3 months" and "repeat scan in 6 months" are month-based scheduling. The appointment date is the consultation date plus the interval, with the same clamp.
- Baby and child age in months. Paediatric guidance and insurance forms often ask for age in months up to 24 months. The age-in-months mode handles this.
- Monthsaries and relationship milestones. The monthsary mode counts months together from a relationship start date and shows the next monthsary date and countdown.
- Financial reporting. Quarters and half-years are month intervals. "Six months ago" is the start of the comparative period in a half-year report.
Common mistakes
- Treating a month as 30 days. Six "months" as 180 days is 1–4 days short of six calendar months, and at a contract boundary that can be the difference between covered and not covered.
- Treating 6 months as 24 weeks. 24 weeks is 168 days; six calendar months is 181–184. The gap is about two weeks.
- Ignoring the day clamp. Calculating 31 March minus one month as "31 February" and letting the software roll it forward gives 3 March — the wrong direction and the wrong date.
- Assuming the operation is reversible. 31 March − 1 month = 28 February, but 28 February + 1 month = 28 March. Clamping loses the original end-of-month intent.
- Using the wrong time zone at the boundary. If it is already tomorrow in your time zone, "today" is tomorrow's date. The local date is what matters for calendar arithmetic.
- Confusing months ago with months between. "6 months ago" gives a single date; "months between" gives a duration. They answer different questions and use different outputs.
- Counting from the wrong anchor for a deadline. A "6 months from delivery" warranty anchors on the delivery date, not the order date. Anchor on the date the contract names.
- Assuming February always has 28 days. In a leap year it has 29, which changes the clamp result for a 31-day start date.
Privacy
Every calculation, calendar render, export and share link runs in your browser with plain JavaScript. Nothing you type is uploaded, logged or sent to a server. There is no account and no network request after the page loads. Recent calculations are optionally kept in your browser's localStorage so you can reload them, and clearing the history removes them permanently from your device.
Limitations
- The calculator works in whole calendar months. It does not accept fractional months, because a month has no fixed length and "half a month" has no exact calendar meaning. Use the between-dates mode for a months-plus-days answer.
- Dates are treated as calendar dates without a time component. The elapsed hours figure is an approximation of days × 24 and can be one hour out if a daylight-saving change falls inside the period.
- Business-day counts include Monday to Friday only. They do not exclude public holidays, because holiday calendars differ by country and region.
- The Unix timestamp shown is for 00:00 UTC on the result date, not for your local midnight.
- Week numbers use the ISO 8601 definition, where weeks start on Monday and week 1 is the week containing the first Thursday of the year.
- The monthsary mode counts calendar months together; it does not calculate gift ideas, relationship milestones in days, or any celebration customs beyond the date itself.
Frequently asked questions
What is a months ago calculator?
A months ago calculator tells you the exact calendar date a given number of months before a reference date. It counts whole calendar months, keeping the same day number and clamping to the last day of the target month when that day does not exist.
What date was 6 months ago?
Six calendar months before today, keeping the same day number. If today is 20 November 2026, the answer is 20 May 2026. If today is 31 August 2026, the answer is 28 February 2026, because February has no 31st.
How do I calculate months ago in Excel?
=EDATE(A1, -6) returns the date six months before the date in cell A1. EDATE uses exactly the same day-clamping rule as this calculator: it keeps the day number when it exists and uses the last valid day when it does not.
Why is 31 March minus one month 28 February?
Because February never has 31 days. The standard convention, used by Excel EDATE, Google Sheets EDATE, most programming libraries and legal deadlines, is to clamp the day to the last valid day of the target month. In a leap year the result is 29 February.
Is month subtraction reversible?
No, not always. 31 March minus one month is 28 February, but 28 February plus one month is 28 March, not 31 March. Clamping loses the original end-of-month intent.
Is 6 months the same as 24 weeks?
No. 24 weeks is exactly 168 days. Six calendar months is 181 to 184 days, about two weeks longer. Count in whatever unit the period was written in.
How many days is 6 months?
Between 181 and 184 days, depending on the start date and whether February falls inside the period.
Does the calculator handle leap years?
Yes. February is 29 days in leap years (2024, 2028, 2032 and so on) and 28 days otherwise. Starting from 29 February and subtracting 12 months into a non-leap year clamps to 28 February.
What is a monthsary?
A monthsary is the monthly anniversary of the day a couple got together. It is most popular in the Philippines and across Southeast Asia. The 1st monthsary is one month after the start date; the 12th monthsary is the first anniversary.
How do you count a monthsary?
Keep the same day-of-month every month. If you got together on 14 March, your monthsary is the 14th of every month. If the day does not exist in a shorter month, celebrate on that month's last day.
What if our monthsary is on the 31st?
Celebrate on the last day of shorter months. A couple who started on 31 January celebrates on 28 February (or 29 February in a leap year), 31 March, 30 April, and so on.
Can I calculate age in months?
Yes. The Age in months mode takes a birthdate and returns total months, plus years, months and days. Paediatric forms, some visa applications and insurance quotes ask for age in months up to 24 or 36 months.
How do I calculate a warranty expiry date?
Enter the purchase date and the warranty length in months. The expiry is the purchase date plus the term, with day clamping. A purchase on 31 August 2025 with a 6-month warranty expires on 28 February 2026.
How do I calculate a lease end date?
Enter the lease start date and the term in months. A 12-month tenancy starting on 31 October 2025 ends on 31 October 2026 because the day exists in both months. A 1-month notice served on 31 March 2026 expires on 30 April 2026.
Does a time zone affect the result?
The calendar date shown uses your device's local date. If it is already tomorrow in your time zone, the result is computed from tomorrow's date. The moment in time is the same everywhere; the local calendar date can differ.
Does daylight saving time affect the result?
The calendar date is unaffected. The elapsed hours across the period can differ by one from days × 24 if a clock change falls inside the period.
Can I enter decimal months?
No. A calendar month has no fixed length, so a fractional month has no exact calendar meaning. Use the Between dates mode for a months-plus-days answer.
Can I enter more than 12 months?
Yes. The numeric input accepts 0 to 1,200 months (100 years). The slider covers 0 to 240 months for fine control; beyond that use the number field.
How do I calculate months between two dates?
Count full calendar months from the earlier date, then count the leftover days. The Between dates mode does this and shows both the full months and the remaining days.
What is a mensiversary?
Mensiversary is the technically correct Latin-derived term for a monthly anniversary. Monthsary is the everyday word that couples actually use, especially in the Philippines and across Southeast Asia.
How many months ago was a specific date?
Switch to the Between dates mode, put the specific date in the earlier field and today in the later field. The tool returns full months and leftover days.
What date was 3 months ago?
Three calendar months before today, keeping the same day number. If today is the 31st and the target month has 30 days, the result clamps to the 30th.
What date was 9 months ago?
Nine calendar months before today. Nine months is commonly used for pregnancy conception windows, probation reviews and three-quarter financial periods.
What date was 12 months ago?
Twelve months before today is the same calendar date one year earlier. If today is 29 February in a leap year, the result clamps to 28 February in the previous common year.
What date was 18 months ago?
One year and six months before today. Eighteen months is a common warranty, lease-break and child-age milestone.
What date was 24 months ago?
Two years before today, on the same calendar date. Clamping only applies if the date is 29 February and the target year is not a leap year.
How is this different from a days ago calculator?
A days ago calculator counts a fixed number of days, so 180 days ago is always 180 days earlier. A months ago calculator counts calendar months, which vary in length. Use months for warranties, leases, probation and legal deadlines; use days for notice periods defined in days.
Can I use it for pregnancy months?
It gives calendar months, which is not the same as gestational months (those are 4-week blocks from the last menstrual period). Use it for anniversary-style month counting, not for clinical gestational age.
Is the months ago calculator free?
Yes, completely free, no account, no sign-up. Everything runs in your browser.
Does it store my data?
Nothing is uploaded. The last few calculations are kept in your browser's localStorage so you can reload them, and you can clear the history at any time.
Does it work offline?
Yes. Once the page has loaded, all date arithmetic, rendering and export run locally in your browser.
Related tools on AIToolsPros
Sources and methodology
- ISO 8601-1:2019 — date and time interchange formats, including the week-numbering definition used in the detail panel.
- Microsoft Excel documentation for
EDATEandDATEDIF— the day-clamping convention this calculator follows. - Python Software Foundation,
dateutil.relativedelta— reference implementation of calendar-month arithmetic with clamping. - Java Platform SE documentation,
java.time.LocalDate.minusMonths— the same clamping rule stated explicitly. - timeanddate.com — Leap years — the Gregorian leap-year rule and its exceptions.
- NIST Time and Frequency Division — reference for UTC and Unix time.
- Monthsary usage references — Philippines and Southeast Asia relationship-custom sources.