Time & date calculator

Age Calculator

Calculate exact age from a date of birth in years, months, and days, plus total days, weeks, months, and hours lived, the day of the week you were born, and a next-birthday countdown.

Calculate age

Defaults to today.

Age as of January 5, 2026

Exact age

35 years, 6 months, 21 days

Born on a Friday

Total days lived

12,988

Total weeks lived

1,855 + 3d

Total months lived

426

Total hours lived

311,712

161 days until turning 36

Next birthday: June 15, 2026

What this tool covers

With formula examples for Excel, SQL, PHP, Java, Oracle, and Access.

  • Exact years/months/days
  • Total days/weeks/months/hours
  • Day of the week born
  • Next-birthday countdown
Calendar-correct Any "as of" date Excel/SQL/code formulas

Runs entirely in your browser — nothing you enter is stored or sent anywhere.

Updated 5 August 2026

Complete years, then complete months, then whatever days are left

Age here is counted the way a person counts it out loud: complete years since the birth date, then complete months since the most recent birthday, then the days remaining since the most recent full month. Take someone born on June 15, 1990, asked as of August 5, 2026. June 15, 1990 to June 15, 2026 is 36 complete years. June 15, 2026 to July 15, 2026 is one complete month. July 15 to August 5 is 21 days — 16 days left in a 31-day July, plus 5 days into August. The answer is 36 years, 1 month, 21 days, and every step of it came off the calendar rather than out of an average.

The tempting shortcut is to divide total days lived by 365 and read the years off the front. That span is exactly 13,200 days, and 13,200 ÷ 365 is 36.16 years. Turn the 0.16 back into days and it claims 60 days past the 36th birthday. The true remainder is 51. The nine-day gap is not a rounding artefact: nine February 29ths fall between June 15, 1990 and August 5, 2026, and a 365-day year silently drops every one of them. Dividing by 365.25 happens to land on 51 days for this particular span — nine leap days across 36.14 years is almost exactly a quarter-day a year — but that is one span agreeing with a long-run average by luck, not a method that holds.

The totals printed beside the exact age are counted, not converted. 13,200 total days is the literal calendar-day gap between the two dates. 1,885 weeks and 5 days is the same figure in sevens. 433 total months is the years-and-months breakdown restated as 36 × 12 + 1, not days divided by an average month length, so it can never disagree with the headline answer. Hours are the one figure that is a conversion: 316,800 is 13,200 × 24, exact to the day rather than to the minute, for the reason set out further down.

Asking how old you were, not only how old you are

The “Calculate age as of” field is the part of this tool most people scroll past, and it is what makes it useful for anything beyond curiosity. Set it to any date on or after the birth date and the whole result panel — exact age, running totals, day of the week, next-birthday countdown — recomputes as though that date were today.

Pointed backwards it answers questions of record: how old was this person on the day the policy was written, on the school cut-off date, on the date a document was signed, on the day of an incident. Pointed forwards it answers questions of planning. Someone born on June 15, 1990 is 36 years, 1 month, 21 days old on August 5, 2026; is exactly 37 on June 15, 2027; and is 36 years, 11 months, 30 days old on the day before that. One day of difference, one whole year of answer — which is precisely the distinction eligibility rules are built out of.

Two things the field will not do. It will not accept a date earlier than the birth date: there is no such thing as a negative age, and a tool that printed one would be manufacturing a mistake rather than catching it, so it asks you to fix the dates instead. And it does not know what “today” means for your purposes — it starts from your device’s calendar date. If you are near midnight, or the date that matters for your question is set somewhere other than where you are sitting, type the date in explicitly rather than trusting the default.

The birthday that has not happened yet is where age code goes wrong

Almost every wrong age sitting in a database comes from one bug, and it is worth naming before you copy any of the formulas below. Subtracting birth year from current year — or calling a date function that quietly does the same thing under a friendlier name — counts calendar-year boundaries crossed, not complete years lived. Those two numbers disagree for everyone whose birthday has not yet arrived this year, which on any given day is a large fraction of your records.

The worked example shows it cleanly. On June 14, 2027 — the day before a June 15 birthday — someone born on June 15, 1990 is 36 years, 11 months, 30 days old. SQL Server’s DATEDIFF(YEAR, ...) reports 37, because 2027 minus 1990 is 37 and the function is counting the New Year it crossed, not the birthday it has not reached. MS Access’s DateDiff("yyyy", ...) makes the identical mistake. One day later both are correct again, which is what makes the bug so durable: it passes every spot-check taken after a birthday, and every test written in the second half of someone’s birth year.

The functions that get it right are the ones that compare month and day as well as year. For that same June 14, 2027, MySQL’s TIMESTAMPDIFF(YEAR, ...), Java’s Period.between, PHP’s DateTime::diff, Oracle’s MONTHS_BETWEEN divided by twelve and floored, and SAS’s INTCK with the 'continuous' alignment all return 36. Excel’s DATEDIF is safe on its own too. SQL Server and Access are the two that need an explicit guard, and the next section shows exactly what that guard looks like.

Formulas in Excel, SQL & code

The same calendar-correct method this calculator uses, in the tools people most often ask about. Each returns complete years (and, where shown, complete months and remaining days) as of today — swap in a specific date where noted.

Excel / Google Sheets

=DATEDIF(B1,TODAY(),"y")&" years, "&DATEDIF(B1,TODAY(),"ym")&" months, "&DATEDIF(B1,TODAY(),"md")&" days"

B1 holds the birth date. DATEDIF’s “y” gives complete years, “ym” gives remaining months, and “md” gives remaining days — the same three-part breakdown this page shows. Works identically in Google Sheets.

SQL Server

SELECT DATEDIFF(YEAR, birth_date, GETDATE())
  - CASE WHEN (MONTH(birth_date) > MONTH(GETDATE()))
      OR (MONTH(birth_date) = MONTH(GETDATE()) AND DAY(birth_date) > DAY(GETDATE()))
    THEN 1 ELSE 0 END AS age;

DATEDIFF(YEAR, ...) alone counts calendar-year boundaries crossed, not complete years — the CASE expression subtracts one when this year’s birthday hasn’t happened yet.

MySQL / MariaDB

SELECT TIMESTAMPDIFF(YEAR, birth_date, CURDATE()) AS age;

TIMESTAMPDIFF with a YEAR unit already accounts for whether the birthday has occurred this year, so no extra adjustment is needed.

PHP

$birth = new DateTime('1990-06-15');
$today = new DateTime('today');
$age = $birth->diff($today);
echo $age->y . " years, " . $age->m . " months, " . $age->d . " days";

Java

LocalDate birthDate = LocalDate.of(1990, 6, 15);
LocalDate today = LocalDate.now();
Period age = Period.between(birthDate, today);
System.out.println(age.getYears() + " years, " + age.getMonths()
  + " months, " + age.getDays() + " days");

Oracle

SELECT FLOOR(MONTHS_BETWEEN(SYSDATE, birth_date) / 12) AS age
FROM dual;

MONTHS_BETWEEN returns a fractional month count between the two dates; dividing by 12 and flooring gives complete years.

MS Access

Age: DateDiff("yyyy",[BirthDate],Date()) - IIf(Format([BirthDate],"mmdd")>Format(Date(),"mmdd"),1,0)

Same logic as the SQL Server example: DateDiff(“yyyy”, ...) counts year boundaries, and the IIf/Format comparison subtracts one if this year’s birthday hasn’t occurred yet.

SAS

age = intck('year', birth_date, today(), 'continuous');

The “continuous” alignment argument makes INTCK count whole elapsed years rather than calendar-year boundaries crossed — without it, INTCK would overcount the same way a plain year subtraction does.

The day you were born, and the day you next turn a year older

Two figures in the result panel are calendar lookups rather than arithmetic on the gap between dates. The day of the week you were born is read straight off the proleptic Gregorian calendar — the same calendar this page applies to every date in every era, without switching to the Julian calendar for dates that predate the Gregorian reform. Someone born on June 15, 1990 was born on a Friday, and that answer does not depend on where they were born or which calendar was in official use there at the time.

The countdown looks for the next occurrence of your birth month and day falling on or after the “as of” date, and rolls into the following year if this year’s has already gone by. From August 5, 2026, the June 15 birthday is behind us, so the next one is June 15, 2027 — 314 days away, turning 37. On the birthday itself the countdown reads zero days and says so, rather than jumping a year ahead; the roll happens the day after, which is the behaviour people expect and almost no hand-rolled countdown implements.

Because the countdown is anchored to the “as of” date rather than to today, it answers the planning form of the question as well: set that field to a future date and it tells you which birthday is the next one from there, and by implication which one has just passed. What it will not do is treat a birthday as an event with a time — there is no hours-and-minutes countdown here, for the reason in the next section but one.

A February 29 birthday falls back to February 28 here, and that is a convention

Your exact age in years, months, and days is never affected by a February 29 birth date. That figure comes directly from the two calendar dates you entered: February 29 to the following February 28 is simply not a complete year, in exactly the way June 15 to the following June 14 is not a complete year. No special case is needed and none is applied.

The next-birthday countdown is the one place a decision has to be made, because in a common year there is no February 29 to count towards. This calculator observes February 28 — the most widespread convention, and the one that keeps a leap-day birthday inside the month it belongs to. Other bodies use March 1, on the reasoning that the birthday should fall on the day after the last day of February, however long February happens to be that year. Neither is more correct as arithmetic. They are two different rules about what “the same date next year” can possibly mean when that date does not exist.

The distinction bites wherever a rule attaches to the birthday itself rather than to elapsed time — a licence expiry, an age-of-majority date, an enrolment window, a policy anniversary. This calculator cannot tell you which convention your registry, insurer, or statute has chosen, and there is no default that is right everywhere. If a single day’s difference carries consequences, find the rule that governs your case and read this countdown as one of the two plausible answers rather than as the answer.

A birth date is a calendar date, not a moment with a time zone

One design decision explains three of the answers on this page at once. A birth date, as people actually use it, is a label on a square of the calendar — the same square everywhere on earth. It is not an instant on a timeline. So no time zone conversion is applied here, and none should be: shifting a birth date by half a day to “convert” it would move some people’s birthdays onto the wrong date for no reason any of them would recognise.

It follows that there is no time-of-day precision either. The hours figure is exact to the day — total days × 24 — and cannot be sharper than that, because you gave the calculator a date and not a time. If you were born at eleven at night, this tool has no way to know it and does not pretend otherwise; the hours count is whole days lived expressed in hours, not hours elapsed to the minute. Treat it as a restatement of the day count, which is what it is — a real limitation of the input, not of the arithmetic.

If the question really is about instants — a meeting at a particular hour seen from two countries, a deadline written in someone else’s local time — that is a different calculation, and it belongs in the Time Zone Converter. For a plain span between two calendar dates with no birthday semantics attached at all, the days calculator is the closer fit.

One consequence is worth stating plainly. Because none of this arithmetic needs a server, none of it uses one: every figure on this page is computed in your browser from the dates you type. Nothing you enter is transmitted to us or stored anywhere.

Turning eighteen on the calendar is not always turning eighteen in law

The arithmetic on this page is standard and it is tested, but calendar age and legal age are two different quantities, and where they diverge they diverge by a day rather than by a year — which is the size of gap that is easiest to miss and most expensive to be wrong about. Jurisdictions differ on the exact point at which a person attains an age. The ordinary rule is that you attain it on your birthday; a long-standing common-law rule, still alive in places and in some older instruments, holds that a person attains an age at the first moment of the day before the anniversary of their birth. Where that rule applies, a birthday-based figure is a day behind.

The thresholds stacked on top of an age vary more still. Voting, driving, drinking, marriage, criminal responsibility, pension access, school entry cut-offs and insurance banding each pick their own number, their own effective date, and sometimes their own definition of the qualifying moment — age on the day of the exam, on the first day of term, at the date of the offence, on the policy anniversary rather than on the birthday.

This is the sharpest limitation of the tool, and it is worth being blunt about: this calculator does not determine eligibility for anything, and it cannot serve as evidence of eligibility. It tells you how many years, months, and days lie between two dates. Whether that span clears a legal threshold is a question for the statute, regulation, or contract that sets the threshold — read that source, and read it for which day it says the age is attained, not only for the number.

Why this page cites no authority for age arithmetic

The method: complete years, then complete months, then remaining days is the standard calendar-correct approach — the same one implemented by the date libraries and database functions listed above, not a bespoke algorithm invented here.

The calendar: the proleptic Gregorian calendar, applied consistently to every date regardless of era.

The absence of a citation: age arithmetic has no issuing authority. No agency publishes the correct way to subtract one date from another, no table of values is revised each year, and there is nothing here that can go stale. The method is defined in full above and verified by this page’s own automated tests; a citation attached to it would be decoration rather than evidence. Authorities do exist for the uses of an age — drinking age, retirement age, school cut-offs, insurance banding — and those belong to the law and the contracts of each place, which is why the section above sends you to them instead of summarising them here.

Related calculators

DaysCount days between two dates, add or subtract days, or count business days excluding weekends and holidays, with a full calendar breakdown.
Time PercentageWork out what percentage one span of time is of another, or the percentage increase or decrease between an old and a new duration.
TimesheetCalculate hours worked across a week, two weeks, or a month from clock-in and clock-out times, with lunch-break deduction, overtime, and an Excel export.
Time ZoneConvert a date and time between EST, IST, GMT, UTC, CET, PST, or any IANA time zone, with live daylight-saving handling and a multi-zone world clock view.
RetirementProject your retirement pot from current savings, contributions, and growth, and gauge whether it meets your goal.

More in Time & Date, or browse all calculators.

Time & date disclaimer

This calculator applies standard calendar-date arithmetic to the dates you enter. It does not implement jurisdiction-specific legal-age rules, and treats a February 29 birthday using the common (but not universal) convention described above. For anything with legal, contractual, or official consequences, confirm the exact rule with an authoritative source.

How we calculate · email us

Learn more

How to Calculate Exact Age in Years, Months, and Days

The calendar-correct borrow method behind an exact age, worked through a real birth date, plus the February 29 rule and why time zones can shift the answer.

Read the guide

Authorship & verification

Created and maintained by , finance educator.

What's changed (2 updates)

Published 5 August 2026

  1. Published the Age Calculator: exact age in years/months/days from a date of birth as of any date, total days/weeks/months/hours lived, day of the week born, a next-birthday countdown, and Excel/SQL/PHP/Java/Oracle/Access/SAS formula references.
  2. Added as the Time & Date category's next tool.

Add this calculator to your site

Responsive embed — and private: nothing your visitors type leaves their browser.