ThisCalculator

Date and time

Age Calculator by Months: How It Works

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

Age Calculator by Months: How It Works

An age calculator by months works out the time between a date of birth and a chosen end date, showing the result as completed years and months. Enter both dates to get the person’s calendar age, with any extra days shown separately so the result is not confused with a simple count of 30-day periods.

Formula

Convert each date’s year and month into a month index, then subtract the birth month index from the end month index. If the end day is earlier in the month than the birth day, subtract one because the latest monthly anniversary has not yet occurred.

  • Month index = year × 12 + month − 1.
  • Completed months = end month index − birth month index − 1 if end day < birth day; otherwise, subtract 0.
  • Completed years = the whole-number part of completed months ÷ 12.
  • Additional months = completed months − (completed years × 12).

Here, birth year, month, and day are the date of birth; end year, month, and day are the date the age is measured on. The month fields use calendar numbers from 1 to 12; days are numbered within each month. The result is a count of completed calendar months, not a decimal age or a duration in fixed 30-day units.

Worked Example

Using the calculator’s default dates—January 1, 2000, to June 15, 2025:

  1. Birth month index: 2000 × 12 + 1 − 1 = 24,000.
  2. End month index: 2025 × 12 + 6 − 1 = 24,305.
  3. The end day, 15, is not earlier than the birth day, 1, so no month is subtracted. Completed months: 24,305 − 24,000 = 305.
  4. Completed years: floor(305 ÷ 12) = 25.
  5. Additional months: 305 − (25 × 12) = 5.

The result is 305 completed months, or 25 years and 5 months. The remaining days are not included in these outputs.

How Age by Months Is Counted

Calendar-month age follows monthly anniversaries. Someone born on January 10 reaches one completed month on February 10, two on March 10, and so on. On February 9, only the previous completed month counts; on February 10, the next one is reached. This is why a calculator needs the day as well as the month and year.

Months have different lengths, so “one month” does not mean a fixed number of days. The interval from January 1 to February 1 is 31 days in a usual year, while February 1 to March 1 is 28 or 29 days. A calculation based on elapsed days divided by 30 can therefore disagree with a calendar age. It answers a different question: an approximate number of 30-day periods.

The age is measured at the end date you enter. If you want someone’s age today, use today’s local calendar date. For a past or future date, use that date instead. The result does not change according to where the dates were entered, but the intended civil date can depend on time zone when converting a timestamp near midnight.

When to Use a Months-Based Age

Years alone can hide meaningful differences between young ages. A baby who is 4 months old is at a very different point in time from a child who is nearly 5 months old, even though both may be described as “4 months” in casual conversation. Month-based age is also useful for comparing elapsed calendar time between two dates or recording an age when a form asks for completed months.

Use the output that matches the question being asked:

  • Completed months: the total number of full monthly anniversaries since birth.
  • Years and additional months: the same duration split into groups of 12 months plus a remainder.
  • Days: a separate date difference, which depends on the lengths of the months involved.

For formal forms or records, follow their stated definition. Some systems request age in completed months; others request years and months, or a specific date-based measure. A calculator cannot decide which convention a form intends.

Common Problems and Limits

Dates must be valid calendar dates. For example, June 31 does not exist, and February 29 exists only in leap years. The simple calculator fields do not validate combinations of month and day, so enter dates that actually occur. A date entered in an ambiguous format can also be misread: writing the month by name or using an unambiguous year-month-day format helps.

The calculation assumes that a monthly anniversary is based on the same day number. That creates an edge case for a birth date at the end of a month. For instance, there is no February 30. Different software, administrative systems, and date-arithmetic conventions may treat end-of-month anniversaries differently. This compact calculator does not define a special end-of-month rule, so results around such dates should be checked against the convention required for the task.

Leap days can also require a convention when measuring years or monthly anniversaries from February 29. Calendar rules determine when leap days occur, but they do not make every application use the same anniversary convention in non-leap years. If the exact treatment matters, consult the instructions for the relevant record or system.

Finally, the outputs are whole completed months and years. They do not round a partial month up, and they do not show remaining days. Rounding 305 months to 306 would overstate the number of completed months before the next anniversary.

Frequently Asked Questions

How do I calculate my age in months?
Subtract the birth month index from the end month index, then subtract one if the end day falls before the birth day. To convert the total into years and months, divide by 12: the whole-number part is years and the remainder is months.

How many months old is someone who is 2 years old?
Two completed years equal 24 completed months. If the person is older than exactly two years by additional months, add those months—for example, 2 years and 3 months is 27 completed months.

Is age in months based on 30 days per month?
No, not when it means calendar age. Calendar months vary from 28 to 31 days, and completed months are counted by monthly anniversaries. Dividing elapsed days by 30 is only an approximation in 30-day periods.

Does the calculator include extra days?
No. Its outputs show completed months, completed years, and the remaining whole months after those years. To report days as well, calculate the date difference separately and state the dates used.

What if someone was born on February 29?
The date is valid in leap years, but anniversary handling in non-leap years can vary by convention. Check the rule used by the form or system where the age will be reported rather than assuming one universal treatment.

Related

Formula used
in birth_year | Birth year | year | 2000 | 1
in birth_month | Birth month (1-12) | month | 1 | 1
in birth_day | Birth day | day | 1 | 1
in end_year | End year | year | 2025 | 1
in end_month | End month (1-12) | month | 6 | 1
in end_day | End day | day | 15 | 1
out months | Completed months | months | (end_year * 12 + end_month - 1) - (birth_year * 12 + birth_month - 1) - (end_day < birth_day) | 0
out years | Completed years | years | floor(months / 12) | 0
out remainder | Additional months | months | months - years * 12 | 0

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.