Why "this year minus birth year" isn't your exact age
Subtracting a birth year from the current year gets you close, but it's wrong for roughly the first two-thirds to eleven-twelfths of any given year — specifically, for every day before your birthday has occurred yet in the current year. Someone born in 1994 isn't 32 the moment the calendar flips to 2026; they turn 32 only on their birthday in 2026, and are still 31 for every day before that.
The fix is the same one you'd use counting on your fingers: compare the birth month and day to today's month and day, not just the year. If today's month/day hasn't reached the birth month/day yet, the naive year subtraction is one too many.
The calendar-correct method: borrow like long subtraction
The reliable way to compute exact age is the same borrow technique used in long subtraction, applied to years, months, and days instead of place values. Start by subtracting year from year, month from month, and day from day, independently.
If the day subtraction goes negative (today's day-of-month is earlier than the birth day-of-month), borrow one month: subtract 1 from the months figure, and add the number of days in the previous calendar month to the days figure. If the month subtraction then goes negative, borrow one year the same way: subtract 1 from years and add 12 to months. The result is the exact number of full years, full months since the last birthday, and full days since the last full month — precisely how a person counts age by hand.
Worked example: born March 15, 1994, as of August 8, 2026
Start with the raw subtraction: years = 2026 − 1994 = 32. months = 8 − 3 = 5. days = 8 − 15 = −7.
The days figure is negative, so borrow one month: months becomes 5 − 1 = 4. The previous calendar month (the one before August) is July, which has 31 days, so days becomes −7 + 31 = 24. Months (4) is no longer negative, so no further borrowing is needed.
Exact age: 32 years, 4 months, 24 days. You can sanity-check it forward: March 15, 1994 to March 15, 2026 is exactly 32 years; March 15, 2026 to July 15, 2026 is 4 months; July 15, 2026 to August 8, 2026 is 24 days.
Worked example
Turning age into days, weeks, hours, minutes, and seconds
The years/months/days breakdown is the most useful everyday answer, but the same birth date also converts to a single total-days count, which is what drives every other unit. Between March 15, 1994 and August 8, 2026 there are 32 full years — 8 of them leap years (1996, 2000, 2004, 2008, 2012, 2016, 2020, and 2024, each contributing an extra day) — plus 146 more days from March 15, 2026 to August 8, 2026.
That gives 24 × 365 + 8 × 366 + 146 = 8,760 + 2,928 + 146 = 11,834 total days. From there, everything else is straightforward multiplication and division: 11,834 days is 1,690 weeks and 4 remainder days, 284,016 hours, 17,040,960 minutes, and 1,022,457,600 seconds. These totals are exact multiples of a whole day because a birth date on its own only fixes a calendar day, not a specific moment within it.
Worked example
The February 29 birthday rule
A birthday of February 29 only exists in leap years, so the common convention — used here — is to observe it on February 28 in a non-leap year. It's a convention, not a law of arithmetic: some contexts instead observe March 1, so if a leap-day birthday is legally or contractually significant, it's worth confirming which convention applies rather than assuming.
This only affects which single day a leap-day birthday lands on in a non-leap year; the calendar-correct years/months/days method above still applies once that day is fixed.
Finding your next birthday and days remaining
The next birthday is simply the first occurrence of the birth month and day on or after today's date. Continuing the example (birthday March 15, today August 8, 2026): this year's occurrence, March 15, 2026, has already passed, so the next one is March 15, 2027.
Counting the days from August 8, 2026 to March 15, 2027 — 23 remaining in August, then 30 (September) + 31 (October) + 30 (November) + 31 (December) + 31 (January) + 28 (February 2027, not a leap year) + 15 (March) — comes to 219 days, and that birthday turns the person 33.
Worked example
Why a birth date is a calendar day, not a timestamp
A birth date names a calendar day — March 15, 1994 — not a specific instant. Running that date through a timezone-aware timestamp (for example, midnight in the browser's local time zone) can push it a day earlier or later than intended once it crosses a timezone boundary, silently shifting the whole calculation by a day for some users. The reliable approach anchors every date to a fixed reference (UTC) purely as a calendar label, never converting it through a local time zone, so the same birth date and "as of" date produce the same answer everywhere in the world.
Common mistakes
- Subtracting birth year from the current year and stopping there. This overstates age by one for every day before the birthday has occurred yet in the current year — the single most common age-calculation bug.
- Assuming every month is 30 days when estimating days since the last birthday. Real month lengths vary from 28 to 31 days, so a fixed-30 estimate drifts by a few days depending on which months are involved.
- Dividing total days lived by 365 and calling that "years old." Leap years mean a calendar year isn't exactly 365 days on average (it's closer to 365.2425), so this approximation slowly drifts away from the calendar-correct years/months/days breakdown the longer the span.
- Forgetting the February 29 rule, so a leap-day birthday appears to have no anniversary at all in a non-leap year rather than being observed on February 28 (or March 1, depending on context).
- Computing a date-only birth date through a timezone-aware timestamp. Converting through local time near midnight can shift the calendar day by one for users in a different time zone than the one the code assumed.
- Assuming the "next birthday" is always in the current calendar year. If the birth month and day have already passed this year, the next occurrence is next year, not this one.