How to Calculate Age in Days
Convert a date of birth into total days lived, handle leap years, and compare day counts between any two dates with clear examples.
By CalcWell Team · ·
Age in days is the count of midnights (or calendar days) between a date of birth and an as-of date, usually today. It is useful for newborn milestones, clinical dosing windows, contests, and curiosity (“how many days old am I?”). Unlike years-months-days age, a total day count has no leftover months to interpret, but it does require careful leap-year and inclusive/exclusive boundary rules. CalcWell’s age calculator and date difference calculator automate the count; this guide shows the ideas behind them.
What “days old” means
Most everyday answers use the number of whole calendar days from the birth date up to (but not including) the as-of date, or sometimes including one endpoint. On your birthday you complete another year; the day-count jumps by one each local midnight after birth. For legal or medical cutoffs, confirm whether the rule is “attained age” in days and which timezone’s calendar applies. When only the birth year is known, you cannot produce a single day total: use year-level tools like born in instead.
Formulas and calendar math
Conceptually: days = difference in serial day numbers between the two dates. Serial day numbers (or Unix timestamps divided by 86,400 after normalizing to UTC midnight) avoid hand-counting months. Leap years insert 29 February; any span that crosses one or more leap days is one day longer per leap day than the same span in an all-common-year approximation of 365 × years. Do not multiply years by 365.25 and call it exact unless you only need an estimate.
For a precise years-months-days breakdown rather than a raw total, see how to calculate your exact age. Day totals and Y-M-D age answer different questions; convert only when you understand month-length ambiguity.
Worked example 1: Newborn
Born 1 March 2026; as-of 21 March 2026. Counting exclusive of the end date (common in “n days old” speech on the morning of the 21st): 20 days old. Inclusive counting of both calendar dates would say 21 days spanning: agree on the convention before comparing apps. The date difference calculator states the day gap clearly so you can map it to your rule.
Worked example 2: Leap day span
From 1 March 2023 to 1 March 2024 crosses 29 February 2024, so the gap is 366 days, not 365. From 1 March 2022 to 1 March 2023 (no leap day in between) is 365 days. Ignoring leap days creates off-by-one errors that compound over decades: material when you quote a large “days lived” total.
Worked example 3: Long span
Birth date 15 July 1990; as-of 15 July 2026 is exactly 36 years in age, but the day total equals the sum of day lengths of those 36 years, including nine leap days in that interval (1992, 1996, 2000, 2004, 2008, 2012, 2016, 2020, 2024), so 36 × 365 + 9 = 13,149 days if both ends fall on the anniversary and you count complete days between identical month-days. Verify with a tool rather than hand-tallying leap years for public claims.
When to use which calculator
Use the age calculator when you want age in years, months, and days plus a sense of milestones. Use the date difference calculator when either endpoint is not “today,” or when you care only about the raw day (or week) gap between two arbitrary dates: project deadlines, travel, or warranty windows included.
Tips
- Pick one inclusive/exclusive rule and stick to it when sharing results.
- Normalize both dates to the same timezone before converting to day numbers.
- Never approximate long spans with 365 × years if you need an exact integer.
- Leap-day birthdays need the same anniversary policy as exact-age calculations.
Age in days is calendar subtraction with leap years in the middle: not a mystery, but easy to approximate badly. Enter both dates in the date difference calculator or read total days from the age calculator when you want a trustworthy integer.
References
- CalcWell methodology: How we calculate
- For unit factors used in conversion guides, see NIST SP 811 Appendix B (SI conversion factors): nist.gov/pml/special-publication-811