Age Calculator
Enter your birthdate and see your exact age plus fun stats.
100% in your browser — nothing uploadedCalculate exact age in years, months and days
In Excel and Google Sheets
The DATEDIF function calculates the difference between two dates in the unit you choose. Put the birth date in A2 and the reference date in B2 (or use TODAY() for the current date):
Full years of age:
=DATEDIF(A2, B2, "Y")
Remaining months (after whole years):
=DATEDIF(A2, B2, "YM")
Remaining days (after whole years and months):
=DATEDIF(A2, B2, "MD")
Total days lived:
=B2-A2
Day of the week (1 = Sunday … 7 = Saturday):
=WEEKDAY(A2)
Days until next birthday:
=IF(DATE(YEAR(B2),MONTH(A2),DAY(A2))>=B2,
DATE(YEAR(B2),MONTH(A2),DAY(A2))-B2,
DATE(YEAR(B2)+1,MONTH(A2),DAY(A2))-B2)In SQL
Each engine has its own function. Given a table people with a column birth_date:
-- PostgreSQL — AGE()
SELECT
birth_date,
AGE(CURRENT_DATE, birth_date) AS age_interval,
EXTRACT(YEAR FROM AGE(CURRENT_DATE, birth_date)) AS age_years,
EXTRACT(MONTH FROM AGE(CURRENT_DATE, birth_date)) AS age_months,
EXTRACT(DAY FROM AGE(CURRENT_DATE, birth_date)) AS age_days,
CURRENT_DATE - birth_date AS total_days
FROM people;-- MySQL — TIMESTAMPDIFF
SELECT
birth_date,
TIMESTAMPDIFF(YEAR, birth_date, CURDATE()) AS age_years,
TIMESTAMPDIFF(MONTH, birth_date, CURDATE())
- TIMESTAMPDIFF(YEAR, birth_date, CURDATE()) * 12
AS age_months,
DATEDIFF(CURDATE(), birth_date) AS total_days
FROM people;-- SQL Server — DATEDIFF
SELECT
birth_date,
DATEDIFF(YEAR, birth_date, GETDATE())
- CASE WHEN DATEADD(YEAR,
DATEDIFF(YEAR, birth_date, GETDATE()),
birth_date) > GETDATE()
THEN 1 ELSE 0 END AS age_years,
DATEDIFF(DAY, birth_date, GETDATE()) AS total_days
FROM people;About this age calculator
Pick your date of birth and an optional reference date (defaults to today) to see your exact age broken down into years, months, and days. The calculator also shows total days lived, weeks lived, your day of the week born on, and how many days until your next birthday — all computed with proper calendar math that handles leap years correctly.
The same date logic powers HR onboarding systems, insurance eligibility checks, and legal age verification. The tool includes the Excel DATEDIF function (which exists but is undocumented in modern Excel) and the PostgreSQL AGE() function so you can reproduce the calculation in a spreadsheet or a database query.
FAQ
How does the calculator handle leap years?
It uses calendar-based arithmetic, not a fixed 365.25-day year. February 29 birthdays are handled correctly: if the reference year is not a leap year, the birthday falls on March 1 for countdown purposes.
Is my date of birth stored anywhere?
No. The calculation runs entirely in your browser using JavaScript. Nothing is sent to any server — the date you enter never leaves your device.
Can I calculate someone else’s age on a specific date?
Yes. Enter their birthdate and change the reference date to any date you want. This is useful for checking age eligibility on a past or future date.