YEARFRAC Function in Excel: Sometimes, we want to find the fraction of the year based on two specified dates. Doing this manually will lead to frustration because it is not an easy task for everyone. For that, Excel provides a special feature called the “YEARFRAC” function. With the help of this function, we can quickly calculate it in a few seconds.
Here, we will discuss the description, syntax, and usage of the YEARFRAC Function in Excel. Let’s step into this article!! Get an official version of MS Excel from the following link:
Description of YEARFRAC function
- This is one of the built-in functions in Excel.
- The YEARFRAC Function returns the fraction of the year by calculating the number of whole days between two dates.
- You can make use of this function to calculate age, determine the proportion of a entire year’s obligations/benefits and more.
- Here, you will see the syntax of the YEARFRAC function.
- To apply this function on your spreadsheet, you have to select a cell and enter the formula in the following format.
- Once you enter the formula, just click on the Enter button to get the result.
=YEARFRAC(start_date, end_date, [basis])
- Start date (Required): The start date to be used in the calculation.
- End date (Required): The end date to be used in the calculation.
- Basis (Optional): The kind of day count basis to use.
|Basis||Day count basis|
|0 or omitted||US (NASD) 30/360|
Let’s look at some examples of the YEARFRAC function and explore how to use it in Microsoft Excel.
- Initially, you have to open your Excel workbook on your PC and launch a worksheet that has data.
- For example, we have entered the start date and end date in cells B3 & C3. We are going to calculate the fraction of the year using these two dates.
- Now, we need to enter the above-mentioned formula to get the result.
- After entering the formula, you need to click the Enter button to get the output, as shown below.
- In the following image, you can see the range of input dates. We will find the fraction of each date given below with the help of the YEARFRAC function.
- Once you get the output value in the first cell, then you just need to drag down it to fill the remaining cells, as shown in the below image.
This post helped you to learn how to use the Excel YEARFRAC function in the spreadsheet with a few practical examples. If you have any queries/suggestions, kindly share it in the below comment box. To learn more about Excel functions, then visit our webpage Aawexcel.com.
The following video will show you how to use the YEARFRAC function in the Excel spreadsheet.
- How to Use Excel FLOOR.MATH Function?
- How to Use Excel FLOOR Function?
- How to Use Excel CEILING.PRECISE Function?
- How to Use Excel CEILING Function?
- How to Use Excel GCD Function?
Hi there, I’m Sridhar – an Excel enthusiast with over 10 years of experience working with software. I’m passionate about using Excel to solve complex problems and streamline business processes. Over the years, I have helped businesses of all sizes to improve their operations and save time and money.
Aside from working with Excel, I also enjoy writing and sharing my knowledge with others. You’ll often find me contributing to the AAW Excel blog, where I provide tips, tricks, and tutorials that are easy to understand for readers of all skill levels.