How age is calculated
Exact age is expressed in three parts: complete years, months and days. The method is simple to state but has one important detail: you subtract the year, month and day of your birth date from today's date separately, then correct any negative values by "borrowing" from the larger unit. It is the same logic you use when subtracting hours and minutes by hand.
Why months and days need borrowing
Suppose you were born on March 15 and today is July 4. Subtracting the days (4 − 15) gives a negative result. In that case you borrow a month: you add the number of days in the previous full month and subtract one from the month count. The same happens with months: if subtracting today's month from your birth month is negative, you borrow a year. Without this adjustment, age would produce impossible numbers like "−11 days".
The algorithm step by step
- years = this year − birth year
- months = this month − birth month
- days = today's day − birth day
- If days < 0: add the days in the previous month and subtract 1 from months.
- If months < 0: add 12 to months and subtract 1 from years.
Because the previous month can have 28, 29, 30 or 31 days, the borrow uses the real number of days of that specific month. That is why the calculator is exact and not a "30 days per month" approximation.
Leap-year birthdays
If you were born on February 29, your exact date only exists every four years. In non-leap years, most systems count your birthday on February 28 or March 1. This calculator relies on the browser's Date API, which handles leap years automatically when subtracting, so the total number of days is always correct no matter how many February 29ths have passed.
Totals in other units
Besides years, months and days, we show your age in larger and smaller units: total months lived, total days since you were born, and total hours. These numbers keep growing, which makes them fun to watch. The total number of days is the real calendar difference; the hours are those days multiplied by 24.
Common uses
- Knowing your exact age for a form or application.
- Working out a child's age in months (useful in the early years).
- Seeing how many days are left until your next birthday.
- Finding out which weekday you were born on.
- Comparing ages between two people down to months and days.
Reference: your age in different units
Approximate values for someone who is 30 years old (exact figures depend on your date):
| Unit | Approximate value at 30 years |
|---|---|
| Months | 360 |
| Weeks | ≈ 1,565 |
| Days | ≈ 10,958 |
| Hours | ≈ 262,980 |