如何在Excel中快速将出生日期转换为年龄?

例如,您在Excel中获得了各种生日数据,并且需要转换这些生日以在Excel中显示其确切的年龄值,您想如何计算? 本文列出了一些技巧,可以在Excel中轻松地将出生日期转换为年龄。
方法A:
使用公式将生日转换为年龄
使用公式将生日转换为年龄
以下公式可帮助您根据Excel中的出生日期计算年龄。
使用INT函数将生日转换为年龄
INT功能可以根据给定的出生日期帮助计算一个人的年龄,请执行以下操作。
1.假设有两列分别包含生日和当前日期。
2.选择一个空白单元格以输出年龄,在其中输入以下公式,然后按 输入 键。 选择结果单元格,然后将其拖动 填充手柄 下来获得所有结果。
=INT((B2-A2)/365)
使用DATEDIF函数将生日转换为年龄
下面的DATEDIF函数也可以提供帮助。
选择一个空白单元格以输出年龄,在其中输入以下公式,然后按 输入 键。 选择结果单元格,然后将其拖动 填充手柄 下来获得所有结果。
=DATEDIF(A2,NOW(),"y")
使用ROUNDDOWN函数将生日转换为年龄
尝试使用ROUNDDOWN函数根据生日计算年龄,如下所示。
选择一个空白单元格以输出年龄,在其中输入以下公式,然后按 输入 键。 选择结果单元格,然后将其拖动 填充手柄 下来获得所有结果。
=ROUNDDOWN(YEARFRAC(A2, TODAY(), 1), 0)
使用DATEDIF功能将年龄显示为年+月+日格式
如果要将年龄显示为年+月+日格式,请尝试使用以下DATEDIF函数。
选择一个空白单元格以输出年龄,在其中输入以下公式,然后按 输入 键。 选择结果单元格,然后将其拖动 填充手柄 下来获得所有结果。
=DATEDIF(A2,TODAY(),"Y") & " Years, " & DATEDIF(A2,TODAY(),"YM") & " Months, " & DATEDIF(A2,TODAY(),"MD") & " Days"
轻松将生日转换为年龄 不记得公式
您可以轻松地将生日转换为年龄,而无需记住公式 日期和时间助手 of Kutools for Excel.
申请前 Kutools for Excel请 首先下载并安装.
1.选择一个空白单元格以输出年龄。 然后点击 Kutools > 公式助手 > 日期和时间助手.
2。 在里面 日期和时间助手 对话框,请进行以下配置。
- 2.1)转到 年龄 标签;
- 2.2)在 出生日期 框,选择包含要转换为年龄的生日的单元格;
- 2.3)选择 今天 在选项 至 部分;
- 2.4)从 输出结果类型 下拉列表;
- 2.5)点击 OK 按钮。
然后,在选定的单元格中填充年龄。 选择结果单元格,然后将“填充手柄”一直向下拖动以获取所有年龄。
备注:如果要将年龄显示为年+月+日格式,请选择 年+月+日 来自 输出结果类型 下拉列表。 结果将显示如下所示的屏幕截图。 它还支持根据您的需要将年龄显示为月,周或日。
如果您想免费试用该工具(30天), 请点击下载,然后按照上述步骤进行操作。
相关文章:
最佳办公效率工具
Kutools for Excel解决了您的大多数问题,并使您的生产率提高了80%
- 重用: 快速插入 复杂的公式,图表 以及您以前使用过的任何东西; 加密单元 带密码 创建邮件列表 并发送电子邮件...
- 超级公式栏 (轻松编辑多行文本和公式); 阅读版式 (轻松读取和编辑大量单元格); 粘贴到过滤范围...
- 合并单元格/行/列 不会丢失数据; 拆分单元格内容; 合并重复的行/列...防止细胞重复; 比较范围...
- 选择重复或唯一 行; 选择空白行 (所有单元格都是空的); 超级查找和模糊查找 在许多工作簿中; 随机选择...
- 确切的副本 多个单元格,无需更改公式参考; 自动创建参考 到多张纸; 插入项目符号,复选框等...
- 提取文字,添加文本,按位置删除, 删除空间; 创建和打印分页小计; 在单元格内容和注释之间转换...
- 超级滤镜 (将过滤方案保存并应用于其他工作表); 高级排序 按月/周/日,频率及更多; 特殊过滤器 用粗体,斜体...
- 结合工作簿和工作表; 根据关键列合并表; 将数据分割成多个工作表; 批量转换xls,xlsx和PDF...
- 超过300种强大功能。 支持Office / Excel 2007-2019和365。支持所有语言。 在您的企业或组织中轻松部署。 完整功能30天免费试用。 60天退款保证。

Office选项卡为Office带来了选项卡式界面,使您的工作更加轻松
- 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,发布者,Access,Visio和Project。
- 在同一窗口的新选项卡中而不是在新窗口中打开并创建多个文档。
- 每天将您的工作效率提高50%,并减少数百次鼠标单击!

You are guest
or post as a guest, but your post won't be published automatically.
-
To post as a guest, your comment is unpublished.· 1 years agoHow to convert age to date of birth
-
To post as a guest, your comment is unpublished.Hi Catherine,
thank you so much for your formula! I am a related service provider for many students with various ages in a school setting. thanks to your formula, the student's age is in front of me during each session, and I am able to adjust session goals appropriately. -
To post as a guest, your comment is unpublished.thanks you so much very very good formula
-
To post as a guest, your comment is unpublished.
-
To post as a guest, your comment is unpublished.Do not show the Detedif Formula in my Excel
What to do Know? -
To post as a guest, your comment is unpublished.if I have their id number how to get their age example their id no consist first 6digit is date of birth
example 830901056252 , 830901 is date of birth.
how to take calculate their age-
To post as a guest, your comment is unpublished.
-
-
To post as a guest, your comment is unpublished.
-
To post as a guest, your comment is unpublished.please do i calculate the birth date from age
-
To post as a guest, your comment is unpublished.
-
To post as a guest, your comment is unpublished.
-
To post as a guest, your comment is unpublished.Thank you Catherine,
for the whole-hearted appreciation of my solution! -
To post as a guest, your comment is unpublished.I have used the following to calculate the age of children in my class.
=DATEDIF(B4,TODAY(),"Y")&"."&DATEDIF(B4,TODAY(),"YM")
with B4 being their date of birth. It produces the correct answer (eg) 9.11
They take tests 3 months later so I need in another cell to calculate '+3' months. But each time I do this I get 9.14 when I need it to say 10.2
Can anyone help.
Thanks-
To post as a guest, your comment is unpublished.
-
To post as a guest, your comment is unpublished.Unclear my post went through or not, in response to Catherine's query.
Repeat my formula which finds the difference between cell B4 contents and a date TODAY() advanced by 3 months:
=DATEDIF(B4,DATE(YEAR(TODAY()),MONTH(TODAY())+3,DAY(TODAY())),"Y")&"."&DATEDIF(B4,DATE(YEAR(TODAY()),MONTH(TODAY())+3,DAY(TODAY())),"YM") -
To post as a guest, your comment is unpublished.The DATEDIF formula used to give the Years and Months in a YY.MM format is understandable. However, each of the 2 components of this formula is a separate number, integer. So, adding 3 to the MM part will only give 14 if it is 11 before the addition. The formula does not know you are looking to set it up as a MONTH.
So, if you get the DATEDIF between B4, and a date which is a valid date but 3 months after TODAY(), try the following formula, works for me and gave 10.2:
=DATEDIF(B4,DATE(YEAR(TODAY()),MONTH(TODAY())+3,DAY(TODAY())),"Y")&"."&DATEDIF(B4,DATE(YEAR(TODAY()),MONTH(TODAY())+3,DAY(TODAY())),"YM")
Please confirm it worked for you.
-
-
To post as a guest, your comment is unpublished.Hi! how to calculate running out date (ROD), if i have a date of birth(DOB). i want that, if enter DOB the ROD can display automatically. i.e i was born in 23 Jan 1998 i need to display automatically ROD. Please help me
-
To post as a guest, your comment is unpublished.How to calculate the retied date, if have date of birth(DOB)? i want to display automatic once enter DOB, the retied date display
-
To post as a guest, your comment is unpublished.
-
To post as a guest, your comment is unpublished.
-
To post as a guest, your comment is unpublished.
-
To post as a guest, your comment is unpublished.One should be careful using Method C, with the YEARFRAC() function, because of rounding error in computations involving leap years. You will calculate the incorrect age for people born in a leap year.
Example:
John Smith was born on 6/5/1932. 1932 is a leap year. Compute John Smith's age on 6/5/2002. We would say John Smith is 70 years old on his 70th birthday, 6/5/2002. However, because YEARFRAC(DATE(1932,6,5),DATE(2002,6,5), 1) computes to 69.99795627, adding ROUNDDOWN computes to 69. In fact, John is 70. I'm not sure if this is the best solution, but I've added a precise day to the computation, which I assume shouldn't affect other calculations because it is shorter than the formula assumes a day to be.
(1/365.2422) is a precise day when accounting for leap years
My adjusted YEARFRAC is:
YEARFRAC(DATE(1932,6,5),DATE(2002,6,5), 1)+(1/365.2422) which computes to 70.00069418 and when combined with ROUNDDOWN, gives 70.
Putting it all together according to the references in the article:
=ROUNDDOWN(YEARFRAC(A2, TODAY(), 1)+(1/365.2422), 0) -
To post as a guest, your comment is unpublished.Correction to what I just posted, the data is sitting in Cells B2:C13 (not A1:B12)
-
To post as a guest, your comment is unpublished.What formula can I use to obtain the invoice amount for a specific month from a list of months with balances.
-
To post as a guest, your comment is unpublished.Month Invoice Amount Assume cells A1 through B12 contain the 12 month
Jan 810 names and amounts to invoive as at left.
Feb 1200 For month Jan
Mar 850 Invoie Amount 810
Apr 930
May 1250 The formula entered in the cell above here
Jun 1300 framed above is
Jul 1100
Aug 820 =VLOOKUP(G3,$B$2:$C$13,2,FALSE)
Sep 750
Oct 875
Nov 980
Dec 1450
Cedric, please confirm this answers your query
-
-
To post as a guest, your comment is unpublished.Thanks a lot for the formula. I got the desired result. Many thanks to the thread poster.
Regards,
KT -
To post as a guest, your comment is unpublished.6/4/1990 in A2
=TEXT(TODAY()-A2,"YY")&" Years, "&TEXT(TODAY()-A2,"mm")&" Months, "&TEXT(TODAY()-A2,"dd")&" Days"
use this simple formula and get answer as below :
26 Years, 03 Months, 15 Days -
To post as a guest, your comment is unpublished.
-
To post as a guest, your comment is unpublished.
-
To post as a guest, your comment is unpublished.This function is great. Very easy to understand. Thanks!
-
To post as a guest, your comment is unpublished.
-
To post as a guest, your comment is unpublished.Responding to Beloved 2016-03-04:2016-03-04 in my yahoo mail box.Somehow, I thought they were not directed at me as I don't seem to have given details with commas, spaces, etc. I had only suggested the use of YEARFRAC() instead of DATEDIF function which i wasn't getting on my Excel. A clarification is welcome.
-
To post as a guest, your comment is unpublished.Your teachings COULD be helpful but they are DEFINITELY NOT! Not because they are wrong per se but simply because 1. why do you use comma's (,) when Excel only accepts semi-colons (;) really beats me? 2. why do you put spaces in your examples when Excel NEVER accepts spaces?? Your work could be helpful but it confuses people instead. So, a perfectly good answer fails to produce the desired result practically on Excel because of YOUR carelessness. You spoil your own good work!...
-
To post as a guest, your comment is unpublished.It is amazing to understand and very very useful.
-
To post as a guest, your comment is unpublished.I couldn't find DATEDIF() in my Excel but YEARFRAC() did it. Hope it is reliable, any comment anyone?
-
To post as a guest, your comment is unpublished.In my Excel, I could not get the DATEDIF() function for whatever reason. Yet, I got a YEARFRAC() function which seems to do the same. Hope it is reliable.
Any comment anyone? -
To post as a guest, your comment is unpublished.how to convert date of birth in to worlds
02/02/1966
second february nineteen sixty six-
To post as a guest, your comment is unpublished.I have a feeling date functions may do this in later versions of Excel i.e. =month() etc. If not, you'll need to create a table with the number in the first column i.e. 1-12 and months in the 2nd column Jan-Dec) then use vlookups so that the function can convert the numbers into the correct text. A lot of fun to be had there as I once wrote a sheet that did this very thing, there was further issues involved in using the correct affix i.e. nd rd st or th. Again, lookup tables did that and I was able to shorten the funtions calculations by using if statements instead but that was very fiddly and half the time I found myself trying to use PHP which would do the job in no time! Have a look around online as someone's likely done some VBA that'll do the trick or KUTools probably have something.
-
-
To post as a guest, your comment is unpublished.I have about 100 cells with the calculated age as you done.
Is there any easy way to make groupings on all that are the age of 10 etc.
I have automated the document as we will have more people in all the time so I need automated groupings as well.
Any suggestions?
/Jacob -
To post as a guest, your comment is unpublished.Hello
Retirement age is 60 years and last date of each month and the formula works, but in our case if an employee's date of birth falls on 1st of any month then he/she will retire on the previous months last date. (eg. employee 1 DOB is 03/01/1960 then output needed is 28-02-2020 and employee 2 DOB is 03/02/1960 then 31-03-2020) -
To post as a guest, your comment is unpublished.Brilliant tips!
Really worked well! If you want the age to display as a single number on Method B - just format the cell to 'Number' with no decimal points - it works!! Hurrah!! -
To post as a guest, your comment is unpublished.Literally none of these worked. When I subtract, it just gives me another date like 03/03/1953
-
To post as a guest, your comment is unpublished.Channing,
Can you provide cell references and what data is entered in them along with your formula and that cell reference?
First thought is you should format your result as a number instead of Date. That might be your issue.
-
-
To post as a guest, your comment is unpublished.Another question in regards to age. How can I get the age in cell B2 [age?] when I have in Cell A2 [26/06/1966] and in Cell B1 [2013] just the year. Thanks.
-
To post as a guest, your comment is unpublished.Are you just trying to get the age they will be in the year of B1? If so, then just do B2 =(B1-(YEAR(A2)))
If that's not what you are looking for, can you explain what it is you need in more detail? -
To post as a guest, your comment is unpublished.
-
-
To post as a guest, your comment is unpublished.
-
To post as a guest, your comment is unpublished.Here is one i have that accounts for leap days (well it excludes them pretty much)
=IF((DATEDIF((DATE((YEAR(C3)+(DATEDIF(C3,C2,"y"))),MONTH(C3),DAY(C3))),C2,"d"))=365,(DATEDIF(C3,C2,"y"))+((DATEDIF((DATE((YEAR(C3)+(DATEDIF(C3,C2,"y"))),(MONTH(C3)),(DAY(C3)))),C2,"d")-1)/365),(DATEDIF(C3,C2,"y"))+((DATEDIF((DATE((YEAR(C3)+(DATEDIF(C3,C2,"y"))),(MONTH(C3)),(DAY(C3)))),C2,"d"))/365))
C2 = Current Date - could use TODAY()
C3 = DOB -
To post as a guest, your comment is unpublished.Not sure if this was covered, but a lot of people right these and don't consider leap years when looking at the difference in days. Here is one I wrote that considers leap year rules (even for the 100 & 400 year rules)....
=IF((DATEDIF((DATE((YEAR(A2)+(DATEDIF(A2,A1,"y"))),MONTH(A2),DAY(A2))),A1,"d"))=365,(DATEDIF(A2,A1,"y"))+((DATEDIF((DATE((YEAR(A2)+(DATEDIF(A2,A1,"y"))),(MONTH(A2)),(DAY(A2)))),A1,"d")-1)/365),(DATEDIF(A2,A1,"y"))+((DATEDIF((DATE((YEAR(A2)+(DATEDIF(A2,A1,"y"))),(MONTH(A2)),(DAY(A2)))),A1,"d"))/365))
where A2 is the date of birth, and A1 is the current date (which could be replaced with TODAY() also.
Please let me know if there are any flaws in this or simpliar ways to calculate it.-
To post as a guest, your comment is unpublished.Excellent function, Steve. I believe datedif also does consider leap years :) yours looks very similar to something I wrote a couple of years ago add the client wanted to account for leap years and didn't trust datedif
-
To post as a guest, your comment is unpublished.If I recall correctly, but datedif wasn't the issue regarding leap years. Once you get the number of days difference and you need to identify a specific date at which they will turn an age is when you need to factor in leap days. The second formula I wrote below does account for those days. If you don't consider that in the formula when you forecast you will be off by a few days.
-
-
-
To post as a guest, your comment is unpublished.Method D is exactly what I've been looking for, minus the day portion (easily removed). I've created an inventory of PCs for my company, and am using this to calculate hardware age based on purchase date. My question is this - is there a way to take this formula and make it so that I can essentially click a button to have it applied to a cell, and then just be able to then select the cell I want it to do the calculation on? Otherwise, I'm looking at having to copy/paste the formula to several hundred cells, and then go and manually change the target cell in each one.
Thanks. -
To post as a guest, your comment is unpublished.Hello,
I have added the formula for age that works well. I was able to continue the formula down the entire column which is what I needed. The issue is that a computed "age" appears in each cell despite the fact that I have not filled in a birthdate. ie: everything below the correct calculations in the column reads 115 years as a default. Is there a way to make the age cell blank until a value is placed in the birthdate cell so as not to see ongoing "115's?" Thanks in advance~ -
To post as a guest, your comment is unpublished.
-
To post as a guest, your comment is unpublished.I like the "Method B" format when figuring out the age. I'm wondering if there is a way to have the years old and just the months old if younger than 2 using that format. Thanks!
-
To post as a guest, your comment is unpublished.
-
-
To post as a guest, your comment is unpublished.Hello, I have a column in my spreadsheet for birth date, that is formatted as DD-Mon-YY (ie 11-Feb-03 for my son that was born on February 11, 2003). I used the =DATEDIF function referenced above and it is returning 115 Years, 2 Months, 11 Days. What is wrong and how do I correct it? Thanks for your help.
=DATEDIF(E13,TODAY(),"Y") & " Years, " & DATEDIF(E13,TODAY(),"YM") & " Months, " & DATEDIF(E13,TODAY(),"MD") & " Days"
Note: When I type =today() in a cell it is correctly listing 11-Mar-15 as today's date.
Also note: The regional settings in my control panel list short date as dd-MMM-yy, so I don't think this would be the problem.-
To post as a guest, your comment is unpublished.Hi Krista,
That would be the length of time since Excel's callander started :P
You're getting that because the cell you're referencing is blank - is you r son's DOB in Cell E13? Because that's the Cell it's calculating from.
Possible fixes:
- Your function contains errors, please see the corrected one below:
=DATEDIF(E13,TODAY(),"Y") & " Years, " & DATEDIF(E13,TODAY(),"YM") & " Months, " & DATEDIF(E13,TODAY(),"MD") & " Days"
- You need to use the format option to format it correctly as a date. i.e. to make it read in that format you'll need to go to the 'Custom' option under format and enter:[$-809]dd-mmm-yy;@ Under 'Type'
- If you're just typing it in like that, it probably won't read it as a date, you need to enter it as 11/02/2003
This will give you "12 Years, 1 Months, 1 Days"
Thanks,
Thom-
To post as a guest, your comment is unpublished.Oops. LOL I had drafted this long note to you telling you it was still not working, when I noticed you were right...cell E13 was empty. My son's DOB is in cell E15. Oops. LOL Thanks for your kind help. It's working now. :) Have a great day!!
-
-
-
To post as a guest, your comment is unpublished.Hi,
How do I convert fx 25102002 into a date and than age?-
To post as a guest, your comment is unpublished.Hi Tanja,
I'm assuming that would be the 25th October 2002? Is the FX part of the box? If so, I'd start with =right(A1,8) which would give you the last eight digits from cell A1, so if Cell A1 contained "fx 25102002" it would simply return "25102002". Now to convert that 8 digit string into a palatable date, I'd use the =date() function. I've done one for you, you just need to switch the A1 with the cell that contains your function =DATE(RIGHT(A1,4),RIGHT(LEFT(A1,4),2),LEFT(A1,2))
Thanks, Thom
-
-
To post as a guest, your comment is unpublished.hi what would the formula be to work out a child's date of birth in exact months (so 24/02/13 = 24mths?)
I am an early years teacher and we work in months not years and months.
Can you help?
Kimberley -
To post as a guest, your comment is unpublished.
-
To post as a guest, your comment is unpublished.Hi Thom,
Kindly Help me i am not understand this formula.
Please calculate my date of birth explained me my date of birth 15/09/1988 -
To post as a guest, your comment is unpublished.Great!!! All formulas works perfect. Thank you so much.