Scenario
You would like to calculate someone’s age based on their birthday.
Recipe
Add a date field for the birthday
Add a Date Field called Birthday to an Object. We will use a Person Object for this example.
Set the Field’s defaults to "none" and make the Field required.
Add an equation field

Add an Equation Field called Birthday.

Set the Equation Type to "Date" and the Date Type to “years.”

Make sure the Result Type is set to "Number," which is the default.

Use the following equation which subtracts the birthday from the current date: currentTime()  {Birthday}
Your Equation Field should look like this:
Test the equation
Add a Person record:
...and verify that the equation has worked:
Optional Features
4.1 Using a Conditional Equation
If you would like to make your Birthday field optional or to add an extra layer of protection against bad data, you can use the following conditional equation:
{Birth Date} ? 0 : currentTime()  {Birth Date}
This allows us to ensure that there is actually a value stored for the Birthday Field before running the calculation. If there is no value for the Birthday field, we set Age in Years to zero.