Dates and time
Age calculator
Enter a birth date and an as-of date. The result is the exact age in years, months, and days, the number of days between the dates, the weekday of birth, and the next birthday.
What this means
- The age is 36 years, 4 months, 25 days.
- That span is 13296 days. The birth date counts as day zero.
- The next birthday is 218 days (June 15, 2027).
What if
About this calculator
What this calculator does
It counts a complete age between two calendar dates and adds the weekday of birth, the day count, and the countdown to the next birthday.
How it is calculated
The calculator subtracts the two calendar dates. If the day of the month has not been reached, it borrows from the previous month, counting from the birth day or the last day of that month, whichever is earlier (the end-of-month rule used by java.time Period). So January 31 to March 1 is 1 month and 1 day. If the month has not been reached, it borrows a year. A February 29 birthday has no February 29 in a non-leap year, so the next real date, March 1, is an exact number of years.
years, months, days = as-of date minus birth date, borrowing when a part is negative
Total days is the UTC day difference from the birth date to the as-of date. The weekday uses the Gregorian calendar. The next birthday uses March 1 in a non-leap year.
How to read the result
The large line is years, months, and days. Total days is the same span as a single count. Next birthday is zero days when the as-of date is the birthday.
Leap days
Someone born on February 29 turns a year older on February 29 in a leap year and on March 1 in any other year. The birthday countdown uses that same observed date.
Sources and method
Calendar math on the Gregorian calendar with dates only, so time zones and daylight saving do not apply. Unit tests cover leap years, month ends, and February 29. A February 29 birthday is observed on March 1 in common years.
Questions
How is a February 29 birthday handled?
In a leap year the birthday stays on February 29. In any other year it is observed on March 1. This differs from the add-days calculator, where February 29 plus one year lands on February 28, because adding time clamps to the end of the month.
Does the birth date count as a day lived?
Total days is the number of days from the birth date to the as-of date. On the birthday itself the count is zero.
Which calendar is used for the weekday?
The Gregorian calendar, evaluated in UTC so the weekday does not shift with a local time zone.
Can the as-of date be in the future?
Yes. Use a future date to see an age on a later day. The as-of date still has to be on or after the birth date.
Why is the default as-of date fixed?
The page is static, so the first result uses a sample date. Change the as-of date to today for a current age.