# How to Calculate the Percentage of Time in Excel – 4 Examples

## Basic Formula for Percentage Calculation

=(Part/Total)*100

Excel automatically multiplies the result of the â€˜=Part/Totalâ€™ portion with 100 when you apply the percent (%) Number format.

The dataset belowÂ  showcases a percentage of working hours.

=(8/24)

### Example 1 – Calculating the Percentage of Time Using a Simple Formula

This a sample dataset.

Steps:

• Enter the following formula in C8 and press Enter.
=C5/C4

• Â 25% of your vacation is spent at home.

• Use the below formula to get the percentage of vacation days spent in New York.
=C6/C4

Read More:Â How to Calculate Total Hours in Excel

### Example 2 –Â  Using the Excel DATEDIF Function to Calculate the Percentage of Time in a given period

Use the DATEDIF function and the TODAY function toÂ calculate how much time has elapsed between a date range and the current date. Use the IFERROR function to avoid errors.

Steps:

• Enter the formula in F5.
=IFERROR((DATEDIF(C5,TODAY(),"d"))/E5,"")

• Press Enter to see the result.
• Use the Fill Handle (+) to copy the formula to the rest of the cells.

• The percentages of time completed will be displayed. In Task 3, the formula returns blank, as the task has not started.

Â Formula Breakdown

TODAY()

returns the current date {44623}.

âž¤Â DATEDIF(C5,TODAY(),”d”))

returns {92}.

âž¤ IFERROR((DATEDIF(C5,TODAY(),”d”))/E5,””)

returns {.239583333333333}; which is multiplied by 100 due to Number formatting and converted to 24%.

Read More: How to Calculate Lag Time in Excel

### Example 3 – Applying the YEARFRAC Function to Find the Percentage of a date range in a Year in Excel

Steps:

• Enter the formula in D5 and press Enter.
=YEARFRAC(B5,C5,1)

• This is the output.
• Copy the formula to the rest of the cells using the Fill Handle.

### Example 4 –Â  Combining theÂ  YEARFRAC, DATE, and YEAR Functions to Get the Percentage ofÂ  time in a YearÂ

Use a combination of the YEARFRAC, DATE, and YEAR functions.

Steps:

• Enter the formula in C5. Press Enter.
=YEARFRAC(DATE(YEAR(B5),1,1),B5)

• This is the output.
• Use the Fill Handle to copy the formula to the rest of the cells.

• To see the percentage of remaining time, subtract the above formula from 1.
=1-YEARFRAC(DATE(YEAR(B5),1,1),B5)

• Press Enter and use the Fill Handle to see the percentage of days in a year.

Â Formula Breakdown

âž¤ YEAR(B5)

converts the date in B5 to 44576 and returns the year {2022}.

âž¤ DATE(YEAR(B5),1,1)

returns {44562}.

âž¤ YEARFRAC(DATE(YEAR(B5),1,1),B5)

returns {4%}.

## Things to Remember

To format the output column: Home > Number group. Click â€˜%â€™.

Use Ctrl + Shift + % to change the number format.

## Related Articles

<< Go Back to Calculate Time | Date-Time in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Hosne Ara

Hosne Ara is a materials and metallurgical engineer who loves exploring Excel and VBA programming. To her, programming is like a time-saving superhero for dealing with data, files, and the internet. She's skilled in Rhino3D, Maxsurf C++, MS Office, AutoCAD, and Excel & VBA, going beyond the basics. With a B. Sc. in Materials and Metallurgical Engineering from Bangladesh University of Engineering and Technology, she's shifted gears and now works as a content developer. In this role, she... Read Full Bio

We will be happy to hear your thoughts

Advanced Excel Exercises with Solutions PDF