Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, 2016, 2019, and Word in Office 365. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Age Calculation with Fields.

Age Calculation with Fields

by Allen Wyatt
(last updated March 7, 2020)


If you desire, you can use fields to calculate an age. For instance, the field could calculate the number of years between some base date and today's date. The following compound field will do the trick:

{ = INT({ DATE \@ "yyyy" } + { DATE \@ "M" } /
12 + { DATE \@ "d" } / 365.25 - YYYYb - Mb / 12 -
Db / 365.25) }

As those who are familiar with fields know, each pair of braces in this sample represents a new field. Thus, to put in the entire compound field, you will need to press Ctrl+F9 a total of four times. In addition, you should replace the YYYYb, Mb, and Db placeholders with the year, month, and day of month for the base date. For instance, if your birthday were 21 June 1959, then you would replace YYYYb with 1959, replace Mb with 6, and Db with 21. When you then calculate the field (by selecting it and pressing F9), it is replaced with a number representing the number of years between the base date and today.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (9541) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and Word in Office 365. You can find a version of this tip for the older menu interface of Word here: Age Calculation with Fields.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...


Formatting Comments

Need to change the appearance of the text in your comments? It's easy to do using techniques you are already familiar with.

Discover More

Adjusting a Range's Starting Point

Select a range of cells, and one of those cells will always be the starting point for the range. This tip explains how to ...

Discover More

Deleting Worksheets in a Macro

Processing workbooks using a macro often involves the possible creation and subsequent deletion of worksheets. When it ...

Discover More

Do More in Less Time! Are you ready to harness the full power of Word 2013 to create professional documents? In this comprehensive guide you'll learn the skills and techniques for efficiently building the documents you need for your professional and your personal life. Check out Word 2013 In Depth today!

More WordTips (ribbon)

Understanding the COMPARE Field

The COMPARE field is rather esoteric, but it can be helpful when you need to compare two values using fields. The result ...

Discover More

Implementing a Dynamic Document Control Table

Accurately and repeatedly referencing information within a document is a common task that needs to be done. One way to ...

Discover More

Differences between SEQ and LISTNUM Fields

Word provides several different fields you can use for custom numbering in a document. Two of the most commonly used are ...

Discover More

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.


If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 8 + 1?

2017-07-20 10:12:13

Kaye A

Thank you, thank you!!! This works great on our company resumes for determining the number of years with the company and number of years in the industry. Thanks again!

2017-04-22 00:47:07

Judy Kunz

Finally got it to work! Thanks for the tip about pressing CONTROL + F9 to create the brackets. This is nifty.

2017-04-21 23:45:31

Judy Kunz

I need to create a field that calculates the age of a person and updates with each year. I am working with Word 2016 and am not very knowledgeable about how to create a field that does this from scratch. Using these instructions is not working. Can someone provide clear instructions as to how to create a custom field that does this. Thank you.

2015-05-18 12:47:59

Mario Dollschnieder

I am having a lot of difficulty with this process. Seems so straightforward in Excel but can't seem to get this. I am having difficulty trying to determine spacing from this formula and I can't get the ctrl f9 to work in the add field component of word 2013. It doesn't work. I am trying to insert the function in a table, is that the problem? if yes where should I be inserting the field?

Thanks in advance

2014-09-30 05:19:49


An alternative solution to calculate the age with fields but without the use of having to divide by 365.25.
If you put the birthdate in a DocVariable in the notation d/M/yyyy then you could use the following formula:
{IF {={IF{DATE @ "M"}>={DOCVARIABLE "Birthdate" @ "M"} 1 0}*{={IF{DATE @ "d"}>={DOCVARIABLE "Birthdate" @ "d"} 1 0}} > 0 "{={DATE @ "yyyy"}-{DOCVARIABLE "Birthdate" @ "yyyy"}}" "{={DATE @ "yyyy"}-{DOCVARIABLE "Birthdate" @ "yyyy"}-1}"}
The braces cannot be typed, but have to be inserted with CTRL+F9(starting a new field.

2014-09-22 15:37:39


Thank you for the tip. This work great. I have question. What if I only interest in months not years. How to do this. Secondly, can the YYYYb, MB, Db replace from another input field. Thanks

2014-06-22 07:40:32

Michael Balieu

If you are using another language than english, then the 365.25 may need to be 365,25 if the language use , as decimal symbol

2014-06-08 13:35:14


As stated at the beginning, this is a COMPOUND field. That means that every pair of { braces } you see is created by pressing Ctrl+F9.

Thus, to put in the entire compound field, you will need to press Ctrl+F9 a total of 4 times.

If you don't, you will get errors.


2014-06-08 09:04:15

Pranab N.V.

I get the same error "!Syntax Error, {", besides after making sure the entire syntax is on the same line.

2014-06-08 09:03:02

Pranab N.V.


I get the same error "!Syntax Error, {" besides I made sure its on the single line.

2014-04-08 12:09:48

Ronald Pederson

Word 2010 -

1. CTRL F9 --> get { }
2. Type in { = {DATE @ "yyyy"} }
3. Highlight the whole thing and press F9 --> I get a syntax error:
!Syntax Error, {

I expected to get 2014

What am I doing wrong?

2014-04-07 13:39:36


Pasting will do no good; you'll get errors. (Why? Because you would be pasting three lines, as it appears in the article. You need to put the thing in as a single line.)

It is better to simply insert field braces in the document (press Ctrl+F9) and then type the field as it appears in the article.


2014-03-31 18:26:52


This does not work or the instructions are just poor

2014-03-19 09:25:23

Mark Pearson

I keep getting syntax error when pasting the formula into the Formula field

2014-03-17 09:25:00

Jane Bernal

need help inserting age calculation fields from start to finish! Please!

This Site

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.

Newest Tips

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.