How to Calculate Age and the Days Between Two Dates Correctly

How to Calculate Age and the Days Between Two Dates Correctly — Preslo guide cover with the Age Calculator tool

Working out someone's age or the number of days between two dates sounds like simple subtraction, but the calendar does not cooperate. Months have different lengths, February changes from year to year, and a question as simple as "how many days from Monday to Friday?" has two correct answers depending on what you are counting. This guide explains how exact date calculations work, with worked examples you can check by hand.

Why date arithmetic is harder than it looks

Ordinary numbers have fixed units: ten tens are always a hundred. Calendar units do not. A month can be 28, 29, 30 or 31 days long, and a year can be 365 or 366 days. That creates three separate problems:

  1. Month boundaries. "One month after 31 January" has no obvious answer, because most months have no 31st and February never does.
  2. Leap years. An extra day appears in some years and not others, so a fixed number of days per year drifts away from real birthdays.
  3. Counting conventions. Whether you count the first day, the last day or both changes the total by one.

Each needs a clear rule. The rest of this guide sets out the rules that the Preslo Age Calculator and Date Difference Calculator use, and why.

How exact age is calculated

People count age in completed units: you are 24 until the day you turn 25. A reliable method follows the same idea:

  1. Count how many whole months have passed since the date of birth. A month is complete when the calendar reaches the same day number in a later month.
  2. If that day number does not exist in the later month, use the last day of that month as the boundary.
  3. Turn every twelve whole months into a year.
  4. Count the days left over from the last whole-month boundary to the target date.

Worked example: born 30 November 2001, age on 1 March 2026

  • 30 November 2001 to 30 November 2025 is 24 whole years.
  • Whole months after that: 30 December 2025 (1), 30 January 2026 (2), and then February. February 2026 has no 30th, so the boundary is 28 February 2026 (3).
  • From 28 February 2026 to 1 March 2026 is 1 day.

The answer is 24 years, 3 months and 1 day, or 8,857 days in total.

Why "borrowing" by hand goes wrong

The school method is to subtract each part: 2026 − 2001 years, 3 − 11 months, 1 − 30 days. The days come out at −29, so you borrow a month and add its length. But which month? Borrowing January (31 days) gives 2 days; borrowing February (28 days) leaves −1, which is impossible. Different calculators make different choices here, which is why two tools can disagree by a day or show nonsense. Counting whole months forward, as above, avoids the ambiguity entirely.

Why you cannot just divide by 365

A quick shortcut is to count the days since birth and divide by 365, or by 365.25 to allow for leap years. Both give the wrong answer near birthdays. Here is someone born on 15 June 2000:

DateTotal daysDays ÷ 365Days ÷ 365.25Correct age
14 June 20259,13025.01 (says 25)24.997 (says 24)24
15 June 20259,13125.02 (says 25)24.9993 (says 24)25

Dividing by 365 makes the person 25 a day early, because six leap days have passed since 2000. Dividing by 365.25 makes them 25 a day late on their actual birthday. Leap days do not arrive evenly, so no single divisor works on every date. The whole-month method has no such drift.

Leap years and 29 February birthdays

The Gregorian calendar, used in most of the world, adds 29 February when a year is divisible by 4, except for century years, which must also be divisible by 400. So 2028 is a leap year, 2000 was one, but 1900 was not and 2100 will not be. Over a 400-year cycle that gives 97 leap years and an average year of 365.2425 days.

People born on 29 February need a rule for common years. The Preslo Age Calculator treats 28 February as the birthday in years without a 29th, which follows from the "last day of a shorter month" rule. For someone born on 29 February 2004:

  • On 27 February 2025 they are 20 years, 11 months and 29 days old.
  • On 28 February 2025 they turn 21.
  • In 2028, a leap year, they turn 24 on 29 February itself.

The law does not always agree. Some jurisdictions say a leap-day baby reaches a legal age on 1 March in a common year. If the exact day matters for a licence, contract or benefit, check the rule where you live rather than relying on any calculator.

Inclusive or exclusive: counting the days between two dates

This is the classic fencepost problem. From Monday to Tuesday, one day has elapsed, but two calendar days are involved. Both are correct; they answer different questions.

  • Exclusive counting (end date not counted) measures elapsed time. Use it for ages, loan periods, notice periods described as "30 days from", and how long ago something happened. From 1 January to 31 December 2026 is 364 days.
  • Inclusive counting (both ends counted) measures how many calendar days something occupies. Use it for holidays, multi-day events or a course of medicine. From 1 January to 31 December 2026 inclusive is 365 days.

A practical example: a 7-day course of tablets that starts on 3 November ends on 9 November, not 10 November, because the first day counts as day one. When a contract or rule says "within 14 days", check how it defines the start, because conventions vary.

Counting working days

Working days usually means Monday to Friday. Take a project running from Tuesday 10 March 2026 to Friday 24 April 2026:

  • Total days, end date excluded: 45.
  • Working days, end date excluded: 33.
  • Working days, end date included: 34, because the final Friday is now counted.

Public holidays are not part of this count, because they differ between countries and regions. December 2026, for instance, has 23 weekdays when both 1 and 31 December are counted; if 25 December (a Friday) is a holiday where you work, subtract it yourself to get 22. Some industries also use different working weeks, so adjust for your own schedule.

Time zones and clock changes

Dates are local. Someone born at 23:30 on 31 December in New York, which is five hours behind UTC in winter, was born at 04:30 on 1 January by UTC. The birth date that matters is the local one on the birth record, and that is what you should enter.

Clock changes cause a quieter problem in software. A day that contains a daylight-saving change has 23 or 25 hours, so a program that measures the gap between two dates in hours and divides by 24 can be off by one. Calculating with whole calendar dates, as both Preslo tools do, avoids this. The trade-off is that neither tool uses a time of birth or a time of day; results are in whole days.

Step by step: calculating age with Preslo

  1. Open the Age Calculator and enter the date of birth.
  2. Leave Age on this date as today, or change it to a cut-off date, such as the closing date of an application or the start of a school year.
  3. Press Calculate Age or Enter. You get the age in years, months and days, plus total full months, total weeks, total days, the days until the next birthday and the weekday of birth.
  4. For a span that is not an age, such as a contract or project, use the Date Difference Calculator. Enter a start and end date and tick Include the end date in the count if both ends should count. It also shows Monday-to-Friday working days.

As a check on the method: someone born on 15 August 1990 is 36 years, 2 months and 26 days old on 10 November 2026, a total of 13,236 days. They were born on a Wednesday and were 10,000 days old on 31 December 2017. Both tools run in your browser, so dates you enter are not uploaded.

Common mistakes

  • Subtracting day numbers directly and getting a negative or inconsistent number of days.
  • Dividing total days by 365 or 365.25 to get years, which is wrong around birthdays.
  • Forgetting the century rule and treating 1900 or 2100 as leap years.
  • Mixing up inclusive and exclusive counting, so a booking or deadline is a day out.
  • Assuming working days exclude holidays when the tool only removes weekends.
  • Using the wrong time zone for a birth or deadline that happened near midnight.
  • Trusting old dates blindly. Countries switched from the Julian to the Gregorian calendar at different times (Britain in 1752), so very old historical dates may not match.

Key takeaways

  • Count whole months first, then leftover days; when a month is too short, its last day is the boundary.
  • Dividing days by 365 or 365.25 cannot give a reliable age.
  • Leap years follow the divisible-by-4 rule, with the 400-year exception for centuries.
  • Decide whether you need elapsed time (exclusive) or calendar days occupied (inclusive) before you count.
  • Working-day counts remove weekends only; subtract local holidays yourself.
  • Use the local calendar date, and check legal rules for 29 February birthdays when it matters.

Frequently asked questions

How do I calculate my exact age in years, months and days?

Count the whole months from your date of birth to the target date, turn each twelve months into a year, then count the remaining days. When a month is too short to contain your birth day, its last day counts as the month boundary.

Why can't I divide my age in days by 365.25?

Leap days do not arrive evenly, so a fixed divisor drifts away from your real birthdays. Near a birthday it can give an age that is one year too high or too low.

When does someone born on 29 February have a birthday?

The Preslo Age Calculator treats 28 February as the birthday in years without a 29 February. Some legal systems use 1 March instead, so check local rules when the exact date has legal consequences.

Should I include the end date when counting days?

Leave it out to measure elapsed time, where Monday to Tuesday is one day. Include it when counting the calendar days an event occupies, where Monday to Tuesday is two days.

Do working-day counts remove public holidays?

The Date Difference Calculator counts Mondays to Fridays only. Public holidays vary by country and region, so subtract any that fall within your dates yourself.

More guides

See all guides →