How can I use Google Sheets to calculate age from a given date of birth? 2

How to Calculate Age in Google Sheets from a Date of Birth

Google Sheets is an exceptionally powerful and adaptable tool, widely recognized for its capabilities in handling complex data processing and mathematical calculations. Among its many useful applications is the ability to accurately determine an individual’s age based on their date of birth. This process leverages the platform’s robust suite of built-in date and time functions, allowing users to effortlessly calculate the precise age difference between two specific points in time. The most critical function employed for this task is the DATEDIF function, which is specifically designed to compute the number of elapsed years, months, or days between a start date (the birthdate) and an end date (usually the current date, derived using the NOW function). This functionality is invaluable for professionals, researchers, and organizations that require rapid and reliable age verification for purposes such as determining eligibility for specific programs, statistical analysis, or managing personnel records, providing instant accuracy directly within the spreadsheet environment.

Google Sheets: Calculate Age from Date of Birth


The Power of Date Functions: DATEDIF and YEARFRAC

Calculating age accurately requires understanding how Google Sheets manages date values. Internally, dates are stored as serial numbers, making arithmetic operations possible. To determine age, we rely primarily on two specialized date functions. The first, the DATEDIF function (Date Difference), is crucial for calculating the difference in whole units—years, months, or days—between the specified start date (the date of birth) and the current date. Although not explicitly listed in the standard function list of Google Sheets documentation, DATEDIF is fully supported and essential for producing clean, whole-number age results.

The second primary function is YEARFRAC function (Year Fraction). While DATEDIF provides the age in completed years, YEARFRAC is designed to return the fraction of the year represented by the number of whole days between two dates. This is particularly useful when calculating age with high precision, such as for actuarial science or financial modeling, where partial years must be accounted for. By combining these functions, users gain comprehensive control over how age is presented, ranging from simple whole years to highly detailed breakdowns involving years, months, and remaining days.

It is important to note that all age calculations require a reference point for the birth date and a reference point for the current date. For consistency across the examples provided, we will assume that the individual’s date of birth is consistently placed in cell A2, and the current date is dynamically generated using the NOW function. The NOW function retrieves the current system date and time, ensuring that the calculated age updates automatically every time the spreadsheet is opened or recalculated, maintaining accuracy without manual intervention.

Formula 1: Calculating Age in Whole Years (Using DATEDIF)

The simplest and most commonly required format for age calculation is the age expressed only in whole, completed years (e.g., 23 years). This calculation ignores months and days, focusing solely on the number of full twelve-month periods that have passed since the date of birth. To achieve this concise result, we leverage the power of the DATEDIF function, utilizing the specific interval unit code “y”.

The syntax for DATEDIF requires three components: the start date, the end date, and the unit of measurement. When calculating age, the start date is the cell containing the birthdate (A2), and the end date is the current moment (NOW()). The “y” unit ensures that the function returns the count of completed years. This structure guarantees that the resulting number is always a whole integer, representing the age as understood in common parlance.

Below is the specific formula used to calculate age exclusively in completed years. This foundational formula is the cornerstone for most basic age reports in Google Sheets:

Formula 1: Calculate Age in Years (e.g. 23 years)

=DATEDIF(A2,NOW(),"y")

Formula 2: Calculating Age in Decimal Years (Using YEARFRAC)

In certain analytical contexts, such as finance, insurance, or academia, a more granular age representation is required. Instead of calculating only the whole years, analysts often need the age expressed as a decimal number, where the fractional part represents the portion of the current year that has elapsed since the last birthday. This level of precision is achieved using the YEARFRAC function.

The YEARFRAC function calculates the difference between two dates and expresses the result as a fractional year. For instance, if a person turns 23 in January and the calculation is performed in July, the result will be approximately 23.5. This calculation is inherently more precise than simply using the “y” unit in DATEDIF, as it accounts for the exact number of days elapsed relative to the calendar year length.

The structure for YEARFRAC is straightforward, requiring only the start date (A2) and the end date (NOW()). This method is highly recommended when precise chronological distance is necessary for external models or calculations that rely on continuous time measurement:

Formula 2: Calculate Age in Decimal Years (e.g. 23.567 years)

=YEARFRAC(A2,NOW())

Formula 3: Detailed Age Breakdown (Years, Months, Days)

For reporting purposes, or when maximum clarity regarding the elapsed time is needed, the age calculation should display the exact years, months, and days passed since the date of birth. This advanced calculation requires combining multiple instances of the DATEDIF function, each using a different unit parameter, and concatenating the results into a single, user-friendly text string using the ampersand (&) operator.

To achieve this breakdown, three specific DATEDIF calculations are performed:

  1. The first DATEDIF uses “y” to calculate the total completed years.
  2. The second DATEDIF uses “ym” to calculate the remaining months after the completed years have been accounted for.
  3. The third DATEDIF uses “md” to calculate the remaining days after both the completed years and months have been accounted for.

By stringing these three results together with descriptive text—” years, “, ” months, “, and ” days”—we produce a comprehensive age report that is easy to read and highly informative.

This combined formula is the most complex but yields the most detailed human-readable output, ensuring every unit of time elapsed since the birthdate is accurately represented:

Formula 3: Calculate Age in Years, Months, Days (e.g. 23 years, 6 months, 25 days)

=DATEDIF(A2,NOW(),"y")&" years, "&DATEDIF(A2,NOW(),"ym")&" months, "&DATEDIF(A2,NOW(),"md")&" days"

It is critical to remember that in all the scenarios described above, the calculation relies on the assumption that the source data—the date of birth—is located in cell A2. If your data begins in a different cell, you must adjust the cell reference (e.g., replace A2 with A3 or B2) within all formula instances before implementation.

Practical Application: Data Setup and Overview

To effectively demonstrate the functionality of these three distinct calculation methods within Google Sheets, we will utilize a sample dataset. This dataset features a column dedicated to various dates of birth (Column A). The goal is to populate the adjacent Column B with the calculated age using each respective formula. This setup allows for a clear, side-by-side comparison of the output generated by DATEDIF (in whole years), YEARFRAC function (in decimal years), and the combined DATEDIF string (in years, months, and days).

The visualization below illustrates the initial state of our data table, showing the input dates in Column A:

Note how Google Sheets automatically formats the input dates. Ensure that your input cells are formatted as ‘Date’ to prevent calculation errors. We will now proceed through each example, demonstrating the steps required to implement and propagate the formulas down the column to handle the entire dataset efficiently.

Practical Application: Example 1 (Whole Years)

This first practical demonstration focuses on implementing Formula 1, which calculates the age strictly in completed years using the DATEDIF function with the “y” unit. This is the fastest way to get a common, integer age value for reporting.

To begin, we select cell B2, which corresponds to the first date of birth listed in A2. We input the following formula, which compares the start date in A2 with the dynamically updating current date derived from the NOW function:

=DATEDIF(A2,NOW(),"y")

Once the formula is entered into B2, the cell will display the age as a whole number. To apply this calculation to the remaining dates in Column A, the formula must be copied down. In Google Sheets, this is typically achieved by clicking on the small square handle at the bottom-right corner of cell B2 and dragging it down the column. This action automatically adjusts the cell reference (A2 becomes A3, A4, and so forth) for each subsequent row.

The result is a clear visualization of the ages calculated in whole years for every entry in the list, providing immediate insight into the age distribution of the data set:

As evident in the output, Column B successfully displays the age for each corresponding birth date in Column A, rounded down to the nearest completed year, perfectly aligning with the constraints of the DATEDIF function “y” unit.

Practical Application: Example 2 (Decimal Years)

Moving to Example 2, we implement Formula 2, utilizing the YEARFRAC function to achieve high-precision age calculation expressed as a decimal value. This is particularly useful when precise time differences are needed for statistical analysis rather than simple human reporting.

The formula is entered into cell B2, referencing the start date in A2 and the current date using NOW():

=YEARFRAC(A2,NOW())

After entering the formula, we again use the click-and-drag method to extend the calculation down through the rest of Column B. This automatically applies the YEARFRAC function to every corresponding date of birth in Column A, ensuring that the age calculation is consistent and highly precise across the entire dataset.

The resulting output clearly shows the difference compared to the whole-year calculation. The ages now include fractional components, providing detailed chronological information:

Column B now displays the age for each entry in terms of decimal years. The formatting in Google Sheets may be adjusted (e.g., increasing or decreasing decimal places) depending on the required level of reporting precision.

Practical Application: Example 3 (Years, Months, and Days)

The final example demonstrates the implementation of Formula 3, which provides the most comprehensive and detailed age result by concatenating multiple DATEDIF function calls. This method is preferred when the exact number of remaining months and days since the last birthday is required.

We input the full concatenated formula into cell B2. This complex string leverages DATEDIF three times, using the units “y”, “ym”, and “md”, interspersed with descriptive text labels:

=DATEDIF(A2,NOW(),"y")&" years, "&DATEDIF(A2,NOW(),"ym")&" months, "&DATEDIF(A2,NOW(),"md")&" days"

Upon execution, cell B2 displays a detailed age string. As before, we propagate this formula down Column B by clicking and dragging the fill handle. Google Sheets efficiently recalculates the age for every row, providing detailed results that update continuously with the system time, referenced by the internal NOW() component.

The final visual output confirms the success of the concatenation, displaying a highly specific age for each entry:

In this final configuration, Column B clearly displays the age for each corresponding date of birth in Column A, articulated in years, months, and days. This presentation offers the highest level of clarity for end-users seeking precise chronological data.

Conclusion and Further Resources

The capacity of Google Sheets to handle complex date calculations, specifically determining age from a date of birth, demonstrates its flexibility as a powerful data management platform. Whether the requirement is a simple whole number, a precise decimal value using YEARFRAC function, or a highly detailed breakdown using the concatenated DATEDIF function, Google Sheets provides the necessary tools. Understanding the parameters of DATEDIF (“y”, “ym”, “md”) and the utility of the NOW() function ensures that your age calculations are both accurate and automatically refreshing, eliminating the need for manual updates.

Mastering these date functions is essential for anyone using Google Sheets for serious data analysis, statistical tracking, or record keeping. By implementing these formulas correctly, users can transform raw date inputs into actionable and precise age metrics, significantly enhancing the utility and accuracy of their spreadsheets.

For those interested in expanding their knowledge beyond basic age calculation, the following tutorials explain how to perform other common tasks in Google Sheets:

Cite this article

stats writer (2026). How to Calculate Age in Google Sheets from a Date of Birth. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-use-google-sheets-to-calculate-age-from-a-given-date-of-birth/

stats writer. "How to Calculate Age in Google Sheets from a Date of Birth." PSYCHOLOGICAL SCALES, 24 Jan. 2026, https://scales.arabpsychology.com/stats/how-can-i-use-google-sheets-to-calculate-age-from-a-given-date-of-birth/.

stats writer. "How to Calculate Age in Google Sheets from a Date of Birth." PSYCHOLOGICAL SCALES, 2026. https://scales.arabpsychology.com/stats/how-can-i-use-google-sheets-to-calculate-age-from-a-given-date-of-birth/.

stats writer (2026) 'How to Calculate Age in Google Sheets from a Date of Birth', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-use-google-sheets-to-calculate-age-from-a-given-date-of-birth/.

[1] stats writer, "How to Calculate Age in Google Sheets from a Date of Birth," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, January, 2026.

stats writer. How to Calculate Age in Google Sheets from a Date of Birth. PSYCHOLOGICAL SCALES. 2026;vol(issue):pages.

Download Post (.PDF)
Slide Up
x
PDF
Scroll to Top