Age Calculator Between Two Dates
Find the exact age or time gap between any two dates in years, months, days, weeks, hours and more.
What is the Age Calculator Between Two Dates?
The age calculator between two dates tells you the exact time that has passed from one date to another, in completed years, months and days. Most people use it to find their own age from a date of birth, but it works for any two dates: a joining date and today's date, a marriage date and an anniversary, or the birth dates of two people. If you have been searching for a free age calculator between two dates that needs no signup, this tool is built for that. Enter a start date and an end date and the result appears instantly.
Calculating age by hand looks easy until months have 28, 29, 30 or 31 days and leap years get involved. This is where most manual mistakes happen. The calculator handles the calendar for you, so the age calculation between two dates is accurate every time. Along with years, months and days, it also shows the same gap as total months, weeks, days and hours, which is useful when a form asks for age in one particular unit.
Because both dates are editable, you are not limited to "age today". You can calculate age as on a cut-off date for a government exam, age at the time of an event, or the age difference between two people. All calculations run in your browser and nothing you enter is stored.
Quick answer: Age = End date − Start date, written as completed years, months and days. Example: from 15 Aug 1998 to 23 Oct 2026 the age is 28 years, 2 months and 8 days (338 months or 10,296 days). To calculate age between two dates in Excel, use =DATEDIF(A2,B2,"Y") for completed years.
- How to use the calculator
- Formula for age calculation between two dates
- Step-by-step manual example
- Solved examples table
- Leap years and month-end dates
- Age in months, weeks, days and hours
- Age difference between two people
- How to calculate age between two dates in Excel
- Where this calculator is useful
- Age calculator between two dates for astrology
- Common mistakes to avoid
- Frequently asked questions
How to use the age calculator between two dates
You can calculate age between two dates in a few seconds. Follow these steps:
- Start date: enter the earlier date. For your own age this is your date of birth (DOB). For service or relationship duration it is the joining date or the event date.
- End date: enter the later date. Use today's date for current age, or pick any other date to find age "as on" that day, such as an exam cut-off date or a form deadline.
- Include end date (optional): if your rule counts both the first and the last day, tick this option. It adds one day to the result. Most age rules do not need it, but some service records do.
- Press Calculate: the result shows your age in years, months and days, followed by the same period in total months, weeks, days and hours.
- Check and use the result: keep the end date and the start date in the correct order. If the end date is earlier than the start date, swap them.
The result works as a standard calendar age. For admissions, jobs, insurance or legal documents, the final age is always the one decided by the official authority and the rules it follows, so confirm with the notification or form instructions.
Formula: how age calculation between two dates works
The calculator uses the same method as a manual calendar calculation. It subtracts the start date from the end date part by part and borrows from the previous month or year when a part turns negative. In short:
Years = End Year − Start Year
Months = End Month − Start Month
Days = End Day − Start Day
If Days < 0 → Months = Months − 1
and Days = Days + (days in the month before the end month)
If Months < 0 → Years = Years − 1
and Months = Months + 12
Total Days = End Date − Start Date
Total Weeks = Total Days ÷ 7
Total Months = (Years × 12) + Months
Total Hours = Total Days × 24
The "borrow" step is the part people usually get wrong. If the end day is smaller than the start day, one full month is taken back and its days are added to the day count. The number added is the length of the month that comes just before the end month, so it can be 28, 29, 30 or 31.
Step-by-step manual example
Let us calculate the age from 10 March 2000 to 5 January 2026, a case where borrowing is needed.
| Step | Working | Result |
|---|---|---|
| 1. Subtract years | 2026 − 2000 | 26 years |
| 2. Subtract months | 1 − 3 | −2 months |
| 3. Subtract days | 5 − 10 | −5 days |
| 4. Fix negative days | Take 1 month back (months become −3) and add 31 days, because December has 31 days | −5 + 31 = 26 days |
| 5. Fix negative months | Take 1 year back (26 becomes 25) and add 12 months | −3 + 12 = 9 months |
| Final age | 25 years, 9 months, 26 days |
As a check, the same period equals 9,432 days in total, which you get by subtracting the two dates directly.
Solved examples of age between two dates
The table below shows common date pairs and their results, so you can compare them with your own calculation.
| Start date | End date | Age / gap | Total days |
|---|---|---|---|
| 15 Aug 1998 | 23 Oct 2026 | 28 years, 2 months, 8 days | 10,296 |
| 10 Mar 2000 | 05 Jan 2026 | 25 years, 9 months, 26 days | 9,432 |
| 01 Jan 2020 | 01 Jan 2026 | 6 years, 0 months, 0 days | 2,192 |
| 20 Sep 2001 | 01 Jan 2026 | 24 years, 3 months, 12 days | 8,869 |
| 05 Mar 2026 | 23 Oct 2026 | 0 years, 7 months, 18 days | 232 |
| 01 Apr 2015 | 31 Mar 2026 | 10 years, 11 months, 30 days (11 years if the end date is included) | 4,017 |
Notice the 6-year gap from 1 Jan 2020 to 1 Jan 2026. It is 2,192 days, not 2,190, because two leap days (29 Feb 2020 and 29 Feb 2024) fall inside the period.
Leap years and month-end dates
A normal year has 365 days. A leap year has 366 because February gets an extra day. The rule is simple: a year is a leap year if it is divisible by 4, except century years, which must also be divisible by 400. So 2000 and 2024 are leap years, while 1900 and 2100 are not.
| Month | Days | Month | Days |
|---|---|---|---|
| January | 31 | July | 31 |
| February | 28 (29 in a leap year) | August | 31 |
| March | 31 | September | 30 |
| April | 30 | October | 31 |
| May | 31 | November | 30 |
| June | 30 | December | 31 |
Two situations can change the answer by a day, depending on which method is used:
- Born on 29 February: in non-leap years some systems treat 28 February as the birthday and others treat 1 March. Check which one your form or department follows.
- Month-end dates: when the start day is 29, 30 or 31 and the target month is shorter, different tools may count the leftover days slightly differently. The total number of days is always the same.
Age in months, weeks, days and hours
Sometimes a form needs your age in one unit only. Using the first example (15 Aug 1998 to 23 Oct 2026), the same age looks like this:
| Unit | Value | How it is found |
|---|---|---|
| Years, months, days | 28 years, 2 months, 8 days | Calendar subtraction |
| Total months | 338 months | (28 × 12) + 2 |
| Total weeks | 1,470 weeks and 6 days | 10,296 ÷ 7 |
| Total days | 10,296 days | End date − Start date |
| Total hours | 2,47,104 hours | 10,296 × 24 |
| Total minutes | 1,48,26,240 minutes | 2,47,104 × 60 |
Age difference calculator between two dates (two people)
You can also use this tool as an age difference calculator between two dates. Put the older person's date of birth in the start field and the younger person's date of birth in the end field. The result is how much older one person is than the other. It stays the same on every day of the year, so you only need to calculate it once.
| Person A (DOB) | Person B (DOB) | Age difference | In days |
|---|---|---|---|
| 12 Jun 1995 | 03 Nov 1998 | 3 years, 4 months, 22 days | 1,240 |
This is handy for siblings, couples, parent and child comparisons, school class age gaps and family tree records.
How to calculate age between two dates in Excel
If you work with many dates, Excel is a good place to calculate age. The key function is DATEDIF. It is not listed in the function wizard in many versions, but it works when typed, including older versions such as Excel 2007, and it also works in Google Sheets. Put the start date in cell A2 and the end date in cell B2.
| What you want | Excel formula | Result for 15-Aug-1998 to 23-Oct-2026 |
|---|---|---|
| Completed years | =DATEDIF(A2,B2,"Y") | 28 |
| Total months | =DATEDIF(A2,B2,"M") | 338 |
| Total days | =B2-A2 or =DATEDIF(A2,B2,"D") | 10296 |
| Months after the last full year | =DATEDIF(A2,B2,"YM") | 2 |
| Days after the last full month | =B2-EDATE(A2,DATEDIF(A2,B2,"M")) | 8 |
| Age today in years | =DATEDIF(A2,TODAY(),"Y") | Changes every day |
| Age as a decimal | =YEARFRAC(A2,B2,1) | About 28.19 |
Age calculation formula in Excel between two dates (years, months and days)
To show the full age in one cell, join the three parts together:
=DATEDIF(A2,B2,"Y")&" years, "&DATEDIF(A2,B2,"YM")&" months, "&(B2-EDATE(A2,DATEDIF(A2,B2,"M")))&" days"
This returns 28 years, 2 months, 8 days for the example dates. You can use DATEDIF(A2,B2,"MD") for the days part, but Microsoft notes that the "MD" option can give wrong or negative results in some cases, so the EDATE version above is safer.
How to calculate age difference between two dates in Excel
The method is the same. Put the two dates of birth in A2 and B2 (older first) and use the full formula above. If you only need the gap in days, =ABS(B2-A2) is enough.
Quick approximate formula
For a rough age in years that does not need DATEDIF, use =INT((B2-A2)/365.25). The 0.25 accounts for leap years on average. It can be off by a day around birthdays, so use DATEDIF when you need exact age.
Tip: make sure Excel recognises your cells as dates and not text. If a date is left-aligned and the formula returns an error, re-enter the date in a format your system understands, such as 15-08-1998 or 1998-08-15.
Where the age calculator between two dates is useful
An accurate date difference is needed more often than people expect. Here are the most common cases:
| Use case | Start date | End date |
|---|---|---|
| Age as on cut-off date for a government exam or job form | Date of birth | Cut-off date given in the notification |
| School and college admission age eligibility | Date of birth | Date mentioned in the admission rules |
| Passport, visa and insurance forms | Date of birth | Date of application |
| Retirement or service planning | Date of birth or joining date | Retirement age date or today |
| Baby age in months and weeks (vaccination, milestones) | Date of birth | Today |
| Marriage or relationship duration | Date of marriage or first meeting | Today or the anniversary |
| Age gap between two people | Older person's DOB | Younger person's DOB |
For job experience between two dates, our Experience Calculator gives the same kind of result in a format built for resumes and service records.
Age calculator between two dates for astrology
People who read horoscopes and birth charts often need the exact age at the time of an event, for example age at marriage, at a job change or when a planetary period (dasha) starts or ends. For this, put the date of birth in the start field and the event date in the end field. The calculator gives the age in years, months and days at that event, which you can match against your chart.
Keep in mind that this tool works on calendar dates only. It does not prepare a kundli or consider birth time and place. Some astrologers also count age in a different way, such as running age, which counts the year in progress as complete. If you follow such a system, confirm the method with your astrologer before using the result.
Common mistakes when calculating age between two dates
- Subtracting years only: 2026 − 1998 = 28 is only correct if the birthday has already passed in the end year.
- Assuming every month has 30 days: this gives wrong day counts. Use the real length of the month, as in the borrow step.
- Forgetting leap days: a six-year gap can have 2,190 or 2,192 days depending on how many 29 Februaries fall inside it.
- Mixing date formats: 05/03/2026 is 5 March in India and the UK but 3 May in the US. Always check the day-month order.
- Counting the end date by mistake: most age rules do not count it. Include it only when a rule says so.
- Swapping the dates: the older date must be the start date, or the result will be negative or invalid.
Frequently asked questions
What is an age calculator between two dates?
It is an online tool that finds the exact time between two dates in years, months and days. Typically the first date is the date of birth and the second date is today, but you can enter any two dates, such as a cut-off date or an event date.
How to calculate age between two dates?
Subtract the start date from the end date in three parts: years, months and days. If the days come out negative, borrow one month and add the number of days in the month before the end month. If the months come out negative, borrow one year and add 12 months. For example, 15 Aug 1998 to 23 Oct 2026 gives 28 years, 2 months and 8 days.
How to calculate age between two dates in Excel?
Use the DATEDIF function. With the start date in A2 and the end date in B2, =DATEDIF(A2,B2,"Y") returns completed years, "YM" returns the extra months and "M" returns total months. For total days, simply use =B2-A2.
How do I calculate age between two dates in Excel in years, months and days together?
Combine the parts in one formula:
=DATEDIF(A2,B2,"Y")&" years, "&DATEDIF(A2,B2,"YM")&" months, "&(B2-EDATE(A2,DATEDIF(A2,B2,"M")))&" days"What is the age calculation formula in Excel between two dates?
The most reliable age calculation formula in Excel between two dates is =DATEDIF(start_date, end_date, "Y") for years. For decimal age you can use =YEARFRAC(start_date, end_date, 1), and for a quick approximation =INT((end_date-start_date)/365.25).
Is there an age calculator between two dates in Excel?
Excel has no ready-made button for it, but you can build a small age calculator in a sheet. Keep the start date in one cell, the end date in another, and add the DATEDIF formulas shown above in the cells next to them. You can also use the free calculator on this page without any setup.
How to calculate age difference between two dates in Excel?
Enter the two dates of birth in separate cells, with the older one first, and apply the same DATEDIF formulas. For the gap in days only, use =ABS(B2-A2).
How to calculate age in Excel between two dates for a whole list?
Write the formula once in the first row, then drag the fill handle down the column. Excel adjusts the cell references for every row, so a list of hundreds of dates of birth is done in seconds. To get the age as on today, replace the end date with TODAY().
How to calculate aging in Excel between two dates?
"Aging" usually means the number of days between a date (such as an invoice date) and another date or today. Use =B2-A2 or =TODAY()-A2. You can then group the days into buckets with nested IF formulas, for example 0-30 days, 31-60 days and 61-90 days.
How to calculate age between two dates in Excel 2007?
The same DATEDIF formulas work in Excel 2007. The function does not show up in the formula wizard, so type it directly into the cell. Avoid newer functions such as IFS in Excel 2007, because it does not support them.
How to calculate age difference between two dates?
Put the older person's date of birth as the start date and the younger person's date of birth as the end date, then calculate the difference in years, months and days. For example, 12 Jun 1995 and 03 Nov 1998 differ by 3 years, 4 months and 22 days.
How to calculate age between two dates in Android?
Use the java.time classes (API level 26 and above, or lower versions with core library desugaring):
LocalDate start = LocalDate.of(1998, 8, 15);
LocalDate end = LocalDate.of(2026, 10, 23);
Period p = Period.between(start, end);
int years = p.getYears(); // 28
int months = p.getMonths(); // 2
int days = p.getDays(); // 8
long totalDays = ChronoUnit.DAYS.between(start, end); // 10296How to calculate age between two dates in C?
Subtract the parts and borrow days and months when they go negative. A simple version looks like this:
#include <stdio.h>
int is_leap(int y) { return (y % 4 == 0 && y % 100 != 0) || (y % 400 == 0); }
int days_in_month(int m, int y) {
int d[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
return (m == 2 && is_leap(y)) ? 29 : d[m - 1];
}
int main(void) {
int d1 = 15, m1 = 8, y1 = 1998; /* start date */
int d2 = 23, m2 = 10, y2 = 2026; /* end date */
int years = y2 - y1, months = m2 - m1, days = d2 - d1;
if (days < 0) {
int pm = (m2 == 1) ? 12 : m2 - 1;
int py = (m2 == 1) ? y2 - 1 : y2;
months--;
days += days_in_month(pm, py);
}
if (months < 0) {
years--;
months += 12;
}
printf("%d years, %d months, %d days\n", years, months, days);
return 0;
}
This prints 28 years, 2 months, 8 days.
How does the calculator handle leap years?
It uses the real calendar, so 29 February is counted in leap years such as 2020 and 2024 and skipped in other years. This is why total days between two dates are always exact.
Does the age calculator count the end date?
By default, no. The result is the usual difference between the dates. If your rule counts both the first and the last day, add one day to the result or tick the include end date option. For example, 1 Apr 2015 to 31 Mar 2026 is 10 years, 11 months and 30 days, or exactly 11 years when the last day is included.
How do I find my age as on a cut-off date for an exam or job?
Enter your date of birth as the start date and the cut-off date from the official notification as the end date. For example, a candidate born on 20 Sep 2001 is 24 years, 3 months and 12 days old as on 1 Jan 2026. Always compare the result with the age limit and relaxations given in the notification.
Can I use the age calculator between two dates for astrology?
Yes, to find the exact age at the time of an event, such as marriage or a dasha change, by entering the date of birth and the event date. The tool does not create a birth chart. Check with your astrologer if they count age in a different way, such as running age.
Can I enter a future date as the end date?
Yes. This is useful to find out how old someone will be on a future date, for example on the last date of a form or on retirement day.
Is this age calculator free, and are my dates stored?
It is completely free with no signup or login. The calculation runs in your browser and the dates you enter are not saved on our servers.
Disclaimer: This calculator gives a standard calendar-based age for information and planning. Government departments, universities, employers and insurers may follow their own rules for counting age, so always confirm the final figure with the official source.