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

Upgrade Now

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

=YEARFRAC("2023-01-01", "2023-06-30", 0)

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]FormulaResult
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.

Unlock the Full Power of Sheet Alchemy

Get access to all our formula generators, script generators, and conversion tools with a free Sheet Alchemy account.