YEARFRAC Google Sheet Formula
Generate Google Sheet YEARFRAC Formulas in seconds
Interactive Formula Generator
Formula Generator
Create complex Google Sheets formulas with natural language. Simply describe what you want to calculate.
Upgrade to Sheet Alchemy Pro
Get advanced formulas, batch processing, and priority support
Input
Result
Your formula will be displayed here:
Your formula will appear here
Describe what you want to calculate and click Generate
Pro Features Available
Sheet Alchemy Pro includes additional advanced features to enhance your formula generation.
Advanced Formulas
Complex array formulas and dynamic ranges
Batch Processing
Generate multiple formulas at once
Unlimited History
Save and organize all your formulas
YEARFRAC Formula Syntax
Example Use Case
Calculating the fraction of a year between two dates
Understanding the YEARFRAC Formula
The YEARFRAC function in Excel calculates the fraction of a year between two dates, using various day count conventions. It's a time proportion tool for financial calculations—like computing partial-year interest or pro-rated annual figures.
YEARFRAC("2023-01-01", "2023-06-30", 0) returns approximately 0.5, representing half a year using the US (NASD) 30/360 day count convention. It takes start_date, end_date, and optional basis arguments (0-4 for different conventions), providing precise fractional year measurements.
Why Use YEARFRAC?
YEARFRAC computes partial years—think bond yields or accrued interest. Its multiple day-counting methods support various financial industry standards, making it essential for accurate interest calculations, depreciation, or any scenario requiring precise fractional year values.
Example with Sample Data
Date Range, [Basis] | Formula | Result |
---|---|---|
1/1/2023 to 6/30/2023, 0 | =YEARFRAC("1/1/2023", "6/30/2023", 0) | 0.5 (30/360 basis) |
1/1/2023 to 6/30/2023, 1 | =YEARFRAC("1/1/2023", "6/30/2023", 1) | 0.4959 (Actual/actual basis) |
3/1/2023 to 7/31/2023, 3 | =YEARFRAC("3/1/2023", "7/31/2023", 3) | 0.4167 (Actual/365 basis) |
YEARFRAC measures fractional years: Jan-Jun 2023 is 0.5 years in 30/360 basis. It's a year fraction calculator.
Explore More Google Sheet Formulas
ROUND
Rounding a number to a specified decimal place for precision control
Learn moreDAYS
Calculating the number of days between two dates
Learn moreRATE
Calculating the interest rate for a loan or investment
Learn moreVLOOKUP
Looking up a value in the first column and returning a value from the same row
Learn moreTRUNC
Truncating a number to a specified decimal place for precise trimming
Learn moreTRANSPOSE
Converting a vertical range to horizontal or vice versa
Learn moreISPMT
Calculating the interest payment for a loan with straight-line amortization
Learn moreMDETERM
Calculating the determinant of a matrix for linear algebra applications
Learn moreUnlock the Full Power of Sheet Alchemy
Get access to all our formula generators, script generators, and conversion tools with a free Sheet Alchemy account.