Time & Dates
How To Calculate Age From Date Of Birth
Age is the distance between a date of birth and a reference date, and it can be expressed in several ways: whole years, total months, weeks, days, or hours. The calculation is a subtraction once both dates have been converted to a day count.
Quick Answer
Days alive = day number of reference date - day number of birth date
- Birth date
- The day the person was born
- Reference date
- The date the age is measured on
- Day number
- A count of days from a fixed epoch
Someone born on 6 July 1990 is 36 years old on 11 October 2026. That is 13,246 days, or 1,892 weeks, or 317,904 hours.
What Is Age From Date Of Birth?
Age is not a single number. It can be stated in whole years, in total months, in weeks, in days, or in hours, and each form answers a different question. A passport wants whole years; a hospital chart may want days.
The reliable way to compute any of them is to convert both dates to a day number first. A day number is an integer that counts the days from a fixed epoch, so the difference between two day numbers is exactly the number of days between the dates.
The standard day count is the Julian day number, a continuous count of days used in astronomy since the sixteenth century. It runs from a single epoch, so it handles leap years, century rules and month lengths automatically.
Converting a calendar date to a Julian day number is a short formula using only integer division. It takes the day, the month and the year, shifts the year and month so that March starts the year, and applies the leap-year corrections.
Once both dates are converted, the day difference is a plain subtraction. That single figure drives every other output: dividing by seven gives whole weeks, dividing by the average month length gives total months, and multiplying by twenty-four gives hours.
Whole years are computed by dividing the day count by three hundred and sixty-five point two five, the average length of a Gregorian year. The result is correct for every day except the birthday itself, when it rounds down by one.
Total months use an average month length of about thirty point four four days. This is an average rather than a calendar count, so it is a good summary figure but not the same as the familiar years-and-months answer.
The familiar years-and-months-and-days form is harder, because calendar months vary between twenty-eight and thirty-one days. It requires borrowing, exactly like subtraction with a base of twelve months and varying day counts.
Leap days matter at the margins. A person born on 29 February technically has a birthday only in leap years, and the choice of 28 February or 1 March as the anniversary shifts the day count by one.
Time zones and the exact moment of birth are ignored. The calculation treats both dates as whole calendar days, which is the convention for almost every form that asks for an age.
Age in hours is only meaningful over short spans. Over decades the figure is large enough to be interesting but it ignores daylight saving, which is why it is shown as a curiosity rather than a precise measure.
The same subtraction works for anything that has a start date: the age of a building, the duration of a contract, or the number of days a policy has been in force.
The calculator takes both dates as day, month and year numbers. It does not use a calendar picker, so enter each part in the box provided and read the results below.
Formula
JDN = d + floor((153m + 2) / 5) + 365y + floor(y/4) - floor(y/100) + floor(y/400) - 32045
Converts a calendar date into a continuous day count, where a equals floor((14 minus month) divided by 12), y equals year plus 4800 minus a, and m equals month plus 12a minus 3.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| d | Day of the month | day | The day number within the month. |
| m | Shifted month | month | Month plus twelve times a, minus three. |
| y | Shifted year | year | Year plus 4800 minus a. |
Days = JDN(reference) - JDN(birth)
Because both dates are day counts from the same epoch, the difference is the exact number of days between them.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| JDN birth | Birth day number | day | The Julian day number of the birth date. |
| JDN ref | Reference day number | day | The Julian day number of the reference date. |
How To Calculate Age From Date Of Birth
- 1
Convert the birth date to a day number
Apply the Julian day formula to the day, month and year of birth. The result is a single integer that identifies that calendar date.
- 2
Convert the reference date
Apply the same formula to the date the age is being measured on, which is usually today.
- 3
Subtract to get days
Reference day number minus birth day number is the exact number of days alive.
- 4
Divide for the other units
Divide by seven for whole weeks, by 30.436875 for total months, by 365.25 for whole years, and multiply by twenty-four for hours.
- 5
Read the age
The years figure is the age that appears on a form. The days and hours figures are the same span expressed in finer units.
Examples
Example 1: Born 6 July 1990, on 11 October 2026
- Birth day
- 6
- Birth month
- 7
- Birth year
- 1990
- Reference day
- 11
- Reference month
- 10
- Reference year
- 2026
| Step | Calculation | Result |
|---|---|---|
| Days from birth to reference | 2461325 - 2448079 | 13246 |
| Years | floor(13246 / 365.25) | 36 |
| Total months | floor(13246 / 30.436875) | 435 |
| Total weeks | floor(13246 / 7) | 1892 |
| Total hours | 13246 x 24 | 317904 |
Result: The person is 36 years old, which is 435 months, 1,892 weeks, 13,246 days or 317,904 hours.
Example 2: Born 15 March 1985, on 11 October 2026
- Birth day
- 15
- Birth month
- 3
- Birth year
- 1985
- Reference day
- 11
- Reference month
- 10
- Reference year
- 2026
| Step | Calculation | Result |
|---|---|---|
| Days from birth to reference | 2461325 - 2446140 | 15185 |
| Years | floor(15185 / 365.25) | 41 |
| Total months | floor(15185 / 30.436875) | 498 |
| Total weeks | floor(15185 / 7) | 2169 |
| Total hours | 15185 x 24 | 364440 |
Result: Born on 15 March 1985, the person is 41 years old on 11 October 2026: 498 months, 2,169 weeks, 15,185 days or 364,440 hours.
Calculator
Age in years
36
- Total months
- 435
- Total weeks
- 1,892
- Total days
- 13,246
- Total hours
- 317,904
Values update as you type. This calculator covers the single scenario its formula assumes — see Common Mistakes for what it leaves out.
Prefer a full-width tool? Open the Age From Date Of Birth calculator page.
Common Mistakes
Entering the date in the wrong order
The calculator expects day, then month, then year, in separate boxes. Swapping the day and month gives a wrong day count even when both look plausible.
Forgetting leap years
A naive calculation that multiplies years by three hundred and sixty-five misses the leap days. Using a day number handles them automatically.
Using thirty-day months for the total
Months vary in length. Total months is an average-based summary; the exact answer needs the calendar borrowing method.
Measuring to the wrong reference date
Age depends on the reference date as much as the birth date. Using a date before the birthday of the year understates the age by a full year.
Treating the hour count as precise
The hours figure multiplies whole days by twenty-four and ignores daylight saving and the actual time of birth.
Assuming 29 February always has a birthday
A leap-day birthday falls on a different date in common years. Decide whether the anniversary is 28 February or 1 March and keep it consistent.
Rounding the day count before dividing
Round only the final result. Rounding the day count first can shift the years figure by one for people close to a birthday.
FAQ
How is age calculated exactly?
Both dates are converted to Julian day numbers and the birth date is subtracted from the reference date. The difference is the exact number of days, which is then divided into weeks, months and years.
Why is the years figure sometimes one less than expected?
The years figure divides by the average Gregorian year length of 365.25 days. On the birthday itself the fraction is just under a whole year, so it rounds down by one.
What is a Julian day number?
A continuous count of days from a fixed epoch, used in astronomy since the sixteenth century. It is convenient because the difference between two day numbers is exactly the number of days between the dates.
Can the calculator handle a 29 February birthday?
Yes, the day count is exact. The only ambiguity is which date counts as the anniversary in common years, and that is a convention rather than a calculation.
Does it account for time zones?
No. Both dates are treated as whole calendar days, which is the convention for age on official forms.
Can I calculate the duration between any two dates?
Yes. The same subtraction works for a contract term, a policy period or the age of a building. Use the date calculator for day counts that are not about a birth date.
References
- [1]Wikipedia, Julian Day Number — https://en.wikipedia.org/wiki/Julian_day
- [2]National Institute of Standards and Technology, Time and Frequency Division — https://www.nist.gov/time-and-frequency-division
- [3]timeanddate.com, Date Duration Calculator — https://www.timeanddate.com/date/duration.html