The results in column C are fractional values with the percentage number format applied.  *By default, the YEARFRAC function uses a 30/360 day convention, assuming a year contains twelve 30-day months = 360 days. This is controlled by an optional argument called “basis”. The core of the formula is the YEARFRAC function, which returns the fractional years between two dates as a decimal value. The formula in C5, copied down, is: YEARFRAC takes two dates: a start date and an end date: We calculate the start date with the DATE function and YEAR function like this: The YEAR function extracts the year from the date in B5: The number is returned directly to the DATE function with the number “1” hard-coded for both month and day arguments: The end date is the date given in column B. With January 15, 2021 in B5, the formula is evaluated like this: Note: the large serial numbers in step 3 above are Excel dates in their raw format. The YEARFRAC function returns the decimal value 0.0388888888888889. Then this value is formatted with the Percentage number format which displays as a percentage.

Current year and date

To return the percent of year completed based on the current year and current date, you can adjust the formula to use the TODAY function like this: In this version, the TODAY function returns the current date which goes into YEARFRAC twice – once as the start date, and once as as the end date. Note the start date uses the DATE function to create a date for the first of the year, by hard-coding the number 1 for month and day, and extracting the current year with the YEAR function. The result is the percentage of the year completed through as of today. This percentage will continually update over time.

Percent of year remaining

To calculate the percent of year remaining instead of percent complete, you can adjust the formula to subtract the fractional year from “1”. In the example shown, D5 contains this formula copied down:

Formatting percentages in Excel

In mathematics, a percentage is a number expressed as a fraction of 100. For example, 35% is read as “thirty-five percent” and is equivalent to 35/100 or 0.35. Accordingly, the values in columns C and D are decimal values with the Percentage number format applied.

Dave Bruns

Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.