How to Calculate Age From Date of Birth in Years, Months and Days
Learn how to calculate age from a date of birth in years, months and days by hand, why 365 shortcuts fail, and how a 29 February birthday is counted.
By TheTextKit TeamPublished

A table for a person born on 31 December 2000, measured on 15 June 2022. The age is 21 years, 5 months and 15 days. They have lived 7,836 days. Their next birthday is in 199 days.
To calculate age from a date of birth, subtract the birth year, month and day from the current ones, and borrow when a part comes out negative. If the days are negative, take one month and add the length of the previous month. If the months are negative, take one year and add 12.
Someone born on 31 December 2000 is 21 years, 5 months and 15 days old on 15 June 2022. The method is easy to get wrong, and the usual shortcuts, such as multiplying by 365, are wrong by days. This guide shows the exact method, the 29 February rule, and a test against Python on 30,000 pairs of dates.
How to calculate age with the tool
- Open the Age Calculator.
- Enter the date of birth.
- Leave Age on empty to measure to today, or pick any other date.
- Read the age in years, months and days, then the next birthday and the totals in months, weeks and days.
If the date of birth is later than the date you are measuring to, the tool says so instead of giving a negative age.
The borrowing method by hand
Write the two dates as year, month and day and subtract each part. Then fix any part that is negative. Take the example above, born 31 December 2000 and measured on 15 June 2022:
- Subtract each part. Years 2022 − 2000 = 22. Months 6 − 12 = −6. Days 15 − 31 = −16.
- Fix the days. Borrow one month and add the length of the month before the measuring date. That is May, with 31 days, so −16 + 31 = 15, and the months fall to −7.
- Fix the months. Borrow one year and add 12. Months become −7 + 12 = 5 and the years fall to 21.
- Read the result. 21 years, 5 months and 15 days.

A table of the three stages of the age subtraction for a person born on 31 December 2000 and measured on 15 June 2022. Raw: 22 years, minus 6 months, minus 16 days. After borrowing a month: 22, minus 7, 15. After borrowing a year: 21 years, 5 months, 15 days.
The borrowed month is the one before the measuring date, not the birth month. That detail is where most hand calculations go wrong. The tool uses the same rule, and for this pair it gives the same answer.
The same calculation in Python
If you work in code, do not write the borrowing yourself. The dateutil package does it, and the standard datetime module gives the day count:
from datetime import date
from dateutil.relativedelta import relativedelta
born, today = date(2000, 12, 31), date(2022, 6, 15)
age = relativedelta(today, born)
print(age.years, age.months, age.days) # 21 5 15
print((today - born).days) # 7836
The output matches the hand calculation and the tool: 21 years, 5 months and 15 days, and 7,836 days lived. The datetime module alone gives only the days, because a month has no fixed length, which is why relativedelta exists.
Why the 365 shortcut fails
Some calculators work out age as years × 365 + months × 31 + days. It is quick, but years are not all 365 days, and months are not all 31. Leap days are the main loss. Someone aged exactly 36 years on 10 October 2026, born on 10 October 1990, has lived 13,149 days. The shortcut gives 13,140, which is nine days too few. Those nine days are the leap days of 1992, 1996, 2000, 2004, 2008, 2012, 2016, 2020 and 2024.
| Born 10 October 1990, on 10 October 2026 | Days |
|---|---|
| True count of days | 13,149 |
| 36 years × 365 | 13,140 |
| Leap days missed | 9 |
The exact method counts real calendar months and days, so leap days are included without any special case.
Mistakes that make an age wrong
- Borrowing the wrong month. Use the month before the measuring date, not the birth month.
- Treating every month as 30 days. Months have 28 to 31 days, and the borrowed length changes the answer.
- Forgetting that the birthday has to pass. Someone is not a year older until the same month and day arrive.
- Mixing time zones. Compare dates, not timestamps. A birth at 23:30 in one zone can be the next day in another.
The 29 February birthday
A person born on 29 February has a birthday only in leap years. In other years there is a choice: 28 February or 1 March. The tool counts the birthday on 28 February, which is the rule the dateutil library uses when it adds a year or a month to a date that does not exist. In its words, the last day of the month is used instead. Some places and organizations use 1 March, so for a legal question, such as the age to vote or drive, check the rule that applies. This guide is not legal advice.
For a person born on 29 February 2000, the convention gives these results:
| Date | Age | Next birthday |
|---|---|---|
| 10 October 2026 | 26 years, 7 months, 11 days | 28 February 2027, in 141 days |
| 28 February 2027 | 27 years, 0 months, 0 days | Today |
| 1 March 2027 | 27 years, 0 months, 1 day | 29 February 2028, in 365 days |
| 10 October 2027 | 27 years, 7 months, 11 days | 29 February 2028, in 142 days |

A table of the age of a person born on 29 February 2000 on four dates. On 10 October 2026 it is 26 years, 7 months and 11 days. On 28 February 2027 it is 27 years, 0 months and 0 days. On 1 March 2027 it is 27 years, 0 months and 1 day. On 10 October 2027 it is 27 years, 7 months and 11 days.
The next birthday and the countdown
The next birthday is the first one on or after the date you are measuring to, and a birthday today counts as zero days to go. For a birthday of 29 February 2000 the next one after 10 October 2026 is 28 February 2027, a Sunday, which is 141 days away. The tool also gives the weekday of the next birthday, which is useful when you plan a party.
Age in months, weeks, days and hours
The same person, born on 29 February 2000, on 10 October 2026, can be described in several ways:
| Unit | Value |
|---|---|
| Years, months and days | 26 years, 7 months, 11 days |
| Months | 319 months and 11 days |
| Weeks | 1,388 weeks and 4 days |
| Days | 9,720 |
The months figure is the years times 12 plus the months, 26 × 12 + 7 = 319. Days are whole calendar days. The tool also shows about 233,280 hours by multiplying them by 24, a figure with no time of day or time zone in it, so treat it as an approximation.

A table of the age of a person born on 29 February 2000, measured on 10 October 2026, in four units. It is 26 years, 7 months and 11 days. It is 319 months and 11 days. It is 1,388 weeks and 4 days. It is 9,720 days.
How we tested it
We compared the calculator with Python. A script made 30,000 pairs of dates from 1850 to 2150, including month ends, 28 and 29 February, and leap and century years. Python's dateutil gave the years, months and days, datetime gave the days and weekdays, and a separate Python function placed each next birthday with the 28 February rule. Our calculator was compared on every pair.
| Check | Matched |
|---|---|
| Years, months and days | 30,000 of 30,000 |
| Total days | 30,000 of 30,000 |
| Next birthday date and days to go | 30,000 of 30,000 |
| Weekday of each date | 30,000 of 30,000 |

A table of four checks of the age calculator against Python on 30,000 date pairs. The age in years, months and days, the total days, the next birthday date and days to go, and the weekdays all matched in 30,000 of 30,000 cases.
The test uses the same 28 February rule on both sides, so it shows the arithmetic is right under that rule, not that the rule is the one your country uses.
Frequently asked questions
How do I calculate my exact age?
Subtract the birth year, month and day from the current ones. If the days are negative, borrow a month and add the length of the previous month. If the months are negative, borrow a year and add 12. Enter your date of birth in the tool and it does all three steps at once.
How do I calculate age on a future or past date?
Use the same method with that date in place of today. In the Age Calculator, put the date in the Age on box. It is useful for forms, exams and age limits that ask for your age on a given day.
How is a 29 February birthday counted?
The tool counts the birthday on 28 February in years that have no 29 February, so someone born on 29 February 2000 turns 27 on 28 February 2027. Some places use 1 March instead, so check the rule that applies to you for legal purposes.
Why not just multiply the years by 365?
Because leap days make years longer. For someone aged exactly 36 years, the years times 365 gives 13,140 days, but the true count is 13,149, nine days more. The exact method counts real calendar months and days.
Is my date of birth uploaded?
No. The calculation runs in your browser, and your date of birth is not sent anywhere or stored. The tool needs no account and keeps nothing after you close the page.
Calculate your age now
Enter a date of birth in the Age Calculator to calculate age in years, months and days, and see the next birthday. To count the days between any two dates, use the Days Between Dates Calculator, and read our guide to calculating days between dates. Everything runs in your browser, so nothing is uploaded.


