Calculate age

Count completed Gregorian years, clamped months, and remaining UTC calendar days between two valid dates.

freeworks offlinenothing uploaded
ToolAge Calculator
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

Strict date-only values complete whole years first, then clamped calendar months, then count remaining UTC midnights. Total days separately divides the exact UTC-midnight interval by 86,400,000 milliseconds.

  • Today in UTC is used only when the reference date is empty.
  • A February 29 anniversary clamps to February 28 in a non-leap year under this page’s explicit policy.

Worked example

Calculate Age
Calculate age from a specific birthdate to a reference date
Input
											Birthdate: 1990-06-15
Reference date: 2025-03-20
										
Output
												Age: 34 years, 9 months, 5 days
Total days: 12,697
Total weeks: 1,813
Total hours: 304,728

Born: 1990-06-15
As of: 2025-03-20

Next birthday in 87 days (2025-06-15)
											

When to use this

Eligibility forms count completed years, genealogy notes compare known dates, and birthday plans find the next anniversary.

Edge cases

  • 2025-01-31 to 2025-03-01 is 0 years, 1 month, 1 day without a negative remainder.
  • 2024-02-29 uses February 28 for its anniversary in a non-leap reference year.
  • 2024-02-31 is rejected instead of rolling into March.

References