Excel Age Formula Not Working: Eight Causes and Fixes
A wrong age in a spreadsheet almost never means a broken Excel. It means one of eight specific things has happened, and each of them leaves a different fingerprint.
Work through them in the order below. The list is arranged the way the problems actually surface: the loud errors first, then the silent ones that return a plausible number.
The Loud Failures: Error Values
| Error | Most likely cause | Fix |
|---|---|---|
#NAME? | The function name is mistyped — Excel gives no help because DATEDIF is not in the function list | Retype the name in full, including the third argument |
#NUM! | The start date is later than the end date | Swap the references, or guard the call with an IF test |
#VALUE! | One cell holds text rather than a real date | Test with ISNUMBER, then convert with DATEVALUE or Text to Columns |
These three are the easy ones, because Excel tells you where to look. The remaining five are harder: they return a number that looks perfectly reasonable and is quietly wrong.
Mistake 1: The Result Is a Date, Not a Number
Subtract two dates in a column that is formatted as dates and the result inherits the format. A true difference of 4 days displays as a date in January 1900. Nothing is broken; the display is simply lying about what the cell contains.
Press Ctrl+1 and choose General or Number. The signature to remember: any day count displaying a 1900 date has the right value and the wrong format.
Mistake 2: Subtracting the Years
The formula that starts most of these investigations:
=YEAR(TODAY())-YEAR(A2)
It is correct for part of the year and wrong for the rest. For a birth date of 1990-12-01 read on 2026-09-20, it reports 36 for a person who is 35, because the December birthday has not arrived.
Use DATEDIF(A2,TODAY(),"Y") instead, which counts completed anniversaries rather than calendar-year boundaries.
Mistake 3: The Birth Date Is Text
A date pasted from another system often arrives as a string. Excel stores it happily, left-aligns it, and refuses to do arithmetic with it. Diagnose with a test column:
=ISNUMBER(A2)
A FALSE confirms text. Select the column and run Data > Text to Columns, then click Finish — the quickest reliable conversion. For individual cells, =DATEVALUE(A2) works if the string is in a format Excel recognises.
Mistake 4: Day and Month Silently Swapped
This is the most dangerous item on the list, because it produces a valid date and therefore a valid-looking age. When you type 03/09/2026, Excel resolves the ambiguity using your regional settings, not your intention. If both numbers are 12 or lower, the swap happens without any warning or indicator.
The error it introduces is up to eleven months of age. The defences are simple: enter dates in an unambiguous order, use a date picker where available, and spot-check any imported column by looking for a suspicious clustering of the same month.
Mistake 5: The MD Unit Returns an Impossible Number
The "MD" unit is meant to return days between 0 and 30, and there are month combinations where it does not. Microsoft's own documentation warns that the function may calculate incorrect results in certain scenarios.
If the days component of an age looks impossible, stop using "MD" and derive the remainder from the total: take "D" for the full elapsed days and subtract the years and months you have already accounted for. It is more work and it is correct.
Mistake 6: A Reference That Slides When You Fill Down
Writing =DATEDIF(A2,TODAY(),"Y") in row 2 and filling down is exactly right, because each row reads its own birth date. Reaching for $A$2 out of habit does the opposite: every row then reports the age of the person in row 2, and the spreadsheet looks convincing all the way down.
Lock the reference only when the cell really is constant across rows — a shared reference date, for instance. A column of mixed row-6 results is the giveaway.
Mistake 7: Dates Before 1900
Excel cannot represent any date earlier than 1 January 1900. Typing an 1889 birth date produces text, and text cannot be subtracted. For historical data, keep the birth date as text, store the reference date as a real date, and compute the age in two steps rather than one formula.
Mistake 8: The 1900 Leap Year Bug
Excel treats 1900 as a leap year, reserving serial number 60 for a 29 February that never existed. Microsoft documents this as a compatibility decision inherited from Lotus 1-2-3 and retained deliberately ever since.
For modern ages it never matters, because every date from 1 March 1900 onward carries the same one-day offset and the errors cancel in a subtraction. It matters in exactly one situation: a span with one date in January or February 1900 and the other on or after 1 March 1900. The difference reports one day too many.
A Ten-Second Check on Any Age Formula
Before you trust a figure, verify it by hand in the way Excel should have computed it: take the birth date, add the whole years, then the months, then the days, and see whether you land on the reference date. If you land a day early or late, the formula is using an average year length or a rounded month.
A second opinion takes even less time. The age calculator computes from calendar rules rather than from average lengths, so a disagreement between the sheet and the calculator is a reliable signal that something in the spreadsheet needs the checklist above.
The Short Checklist
- Every birth date passes
ISNUMBER. - Every difference cell is formatted as Number or General.
- No formula uses
YEAR()-YEAR(). - No ambiguous dates with both parts 12 or less.
- The earlier date comes first in every
DATEDIFcall. - Cell references are locked only where the value is genuinely constant.
- No dates before 1 March 1900 unless you have deliberately handled them.
- The figure has been reproduced once by hand.
Check the figure against a calculator that uses real calendar rules.
Open the Age Calculator →Frequently Asked Questions
Why does my age formula return #NAME?
The function name is mistyped. DATEDIF is not offered in the function list, so Excel provides no autocomplete or tooltip — the name has to be typed in full and spelled exactly.
Why is my age one year too high?
Almost always because the formula subtracts one year number from another. That reports a new age from 1 January rather than from the birthday, so it overstates the age for everyone whose birthday has not yet arrived.
Why does my result show a date instead of a number?
The cell inherited a date format from the column. The value is correct; set the format to General or Number to display it as a count.
How can I tell if a cell contains text instead of a date?
Use ISNUMBER on the cell. FALSE means text. Text is usually left-aligned and may show a small green triangle in the corner.
Can a date be wrong without Excel showing an error?
Yes. If both the day and month are 12 or less, Excel resolves the order using regional settings and can swap them silently, producing a valid date and an age error of up to eleven months.
What is wrong with the MD unit?
It can return values outside the expected 0 to 30 range for certain month combinations. Microsoft warns that the function may calculate incorrect results in some scenarios.
Does Excel handle dates before 1900?
No. The earliest supported date is 1 January 1900. Earlier entries are stored as text and cannot be used in date arithmetic without conversion.
What is the 1900 leap year bug?
Excel assumes 1900 was a leap year and reserves a serial number for 29 February 1900, which never existed. It was kept for compatibility with Lotus 1-2-3 and affects only spans crossing that boundary.
Why do all my rows show the same age?
The birth date reference has been locked with dollar signs while being filled down, so every row reads the same cell. Remove the dollar signs unless the reference should genuinely be constant.
Are the dates I enter on this site kept private?
Yes. Everything runs in your browser — nothing is sent to a server and nothing is saved.
Sources
- Microsoft Learn: Excel incorrectly assumes that the year 1900 is a leap year
- Microsoft Support: DATEDIF function
- Microsoft Support: YEARFRAC function