Ravindra BagaleCourses & study guides Track your progress

Excel YEARFRAC Function

Chala mitrano — today YEARFRAC. How much of a year sits between two dates? Finance uses that fraction for interest.

Fictional sample data for learning. Interest and pro-rata rent in Ahmedabad NBFCs and Frankfurt banks. Mixed ₹ and €.

Purpose

Return the fraction of a year between two dates (for interest and pro-rata).

Return value

A decimal year fraction.

Syntax

YEARFRAC(start_date, end_date, [basis])

Arguments

ArgumentRequired?Description
start_dateRequiredStart.
end_dateRequiredEnd.
basisOptional0 = US 30/360; 1 = actual/actual; 2 = actual/360; 3 = actual/365; 4 = EU 30/360.

Version

All modern Excel; LibreOffice YEARFRAC. Basis codes match financial day-count conventions.

How to use — Why → What → How

Why: Pro-rata rent and simple interest need a year fraction, not whole months only. Interest and pro-rata rent in Ahmedabad NBFCs and Frankfurt banks. In Indian back offices and foreign sister teams, YEARFRAC shows up on leave, SLA and invoice sheets every week.

What: YEARFRAC returns a decimal. basis picks the day-count rule — agree it with finance before you ship. Read every argument in the table once before you type; each one changes the answer on purpose.

How — numbered steps:

  1. Type =YEARFRAC(A2,B2,1) for actual/actual.
  2. Multiply by annual rate or annual rent.
  3. Document the basis code on the sheet.

Ravindra Bagale's Tip

Friends, after you learn YEARFRAC, open a real schedule sheet and find one cell this function would fix this week.

Ravindra Bagale's Tip

Friends, sleep on YEARFRAC and rebuild example 1 tomorrow without looking.

Ravindra Bagale's Tip

Friends, say the business question in plain words before =YEARFRAC.

Ravindra Bagale's Tip

Friends, after you finish YEARFRAC, open yesterday’s real workbook and find one place this function would have saved ten minutes. That habit turns lessons into salary skills.

Ravindra Bagale's Tip

Friends, treat YEARFRAC like a seatbelt on date sheets — use it before a manager asks why the deadline slipped.

Download practice file: practice-yearfrac.xlsx (includes sheet About this data, practice sheets, and Answers).

Worked examples

1) Half year actual/365

Ahmedabad NBFC.

StartEnd₹ rate
2026-01-012026-07-010.12
Formula: =YEARFRAC(A2,B2,3)

Result: 0.49589

What it means: About 0.5 year on actual/365.

2) Interest idea

Principal ₹100000.

StartEndPrincipal
2026-01-012026-07-01100000
Formula: =100000*0.12*YEARFRAC(A2,B2,3)

Result: 5950.68

What it means: Simple interest ≈ rate × fraction × principal.

3) Tenure fraction

Frankfurt € bond style demo.

StartEnd€
2020-03-152026-10-315000
Formula: =YEARFRAC(A2,B2,1)

Result: 6.6329 (approx basis3 shown; basis1 similar order)

What it means: Multi-year fraction for long holds (confirm basis with finance).

4) vs DATEDIF Y

Same span.

StartEnd
2020-03-152026-10-31
Formula: =DATEDIF(A2,B2,"Y")&" vs "&YEARFRAC(A2,B2,1)

Result: 6 vs ~6.63

What it means: Whole years vs fractional years.

5) Pro-rata rent

Occupied 90 days.

StartEndAnnual ₹
2026-10-012026-10-31120000
Formula: =C2*YEARFRAC(A2,B2,3)

Result: 9863.01

What it means: Rent share for the period.

6) Basis note

Document.

CodeMeaning
1actual/actual
3actual/365
Formula: (legend)

Result: agree before shipping

What it means: Wrong basis → wrong money.

Common errors and fixes

#NUM! — Bad basis / dates. Fix: Fix codes and order.
#VALUE! — Non-dates. Fix: Convert.
Money mismatch — Basis disagreed. Fix: Write the legend; confirm with finance.

Notes and tips

  • Revisit YEARFRAC errors after quiz.
  • Build one example from memory.
  • Check formats if wrong.
  • Teach a tip in Marathi/Hindi.
  • Keep currency consistent in one column.
  • Note version fallbacks.
  • Drill: pro-rata three rent rows with YEARFRAC basis 1.
  • YEARFRAC vs DATEDIF Y: fraction for finance vs whole years for age.
  • Fictional data only.
  • Print YEARFRAC revision card.
  • Predict before Enter.
  • Track top mistake monthly.
  • Interest and pro-rata rent in Ahmedabad NBFCs and Frankfurt banks.
  • Dates are serials.
  • Verify on a known calendar.
  • Print the revision card for YEARFRAC and stick it near your monitor for one week of real worksheets.
  • When helping a junior, ask them to predict the result before pressing Enter — prediction builds judgement.
  • Keep a personal notebook of the one mistake you make most often with this function; review it monthly.
  • Share one tip from this page with a classmate in Marathi or Hindi — teaching locks the idea.
  • If a result looks wrong, check date formats and regional settings before changing the formula.
  • Date serial numbers are how Excel stores dates — formatting only changes the display.
  • Share one tip from this page with a classmate in Marathi or Hindi — teaching locks the idea.
  • Keep currency symbols consistent inside a single report column even when practice mixes ₹ $ £ € across examples.
  • Classroom habit: after YEARFRAC, open yesterday’s real workbook and find one place this function saves time.
  • For interviews, explain why calendar days and working days differ on a project that crosses a weekend.

In real work

Drill: pro-rata three rent rows with YEARFRAC basis 1. Interest and pro-rata rent in Ahmedabad NBFCs and Frankfurt banks. Classroom drill: write three brand-new YEARFRAC formulas on a blank sheet using names from your own city — if you can invent them without the page open, you own the skill. Then break one formula on purpose and watch the error; recovering from that break is half of interview readiness. Always verify with a known calendar date before trusting a long chain of date formulas. Keep a personal notebook of the one mistake you make most often with this function; review it monthly. When Excel versions differ at home and in class, write the fallback formula under the modern one in a comment cell.

How it compares

YEARFRAC vs DATEDIF Y: fraction for finance vs whole years for age.

Interview corner

Why YEARFRAC?
Interest/pro-rata need fractions.
Basis?
Day-count convention.
vs DATEDIF?
Fraction vs whole units.

DATEDIF, EDATE, NETWORKDAYS

Practice tasks (10)

  1. Task 1. YEARFRAC 1 Jan–1 Jul 2026 basis 3.
    3.
  2. Task 2. Simple interest demo.
    Multiply.
  3. Task 3. Compare DATEDIF Y.
    Both.
  4. Task 4. Pro-rata rent Oct 2026.
    Annual×frac.
  5. Task 5. Write basis legend.
    Doc.
  6. Task 6. Explain actual/365.
    Interview.
  7. Task 7. Wrong order → note error.
    Order.
  8. Task 8. Teach classmate.
    Teach.
  9. Task 9. Format fraction 0.000.
    Fmt.
  10. Task 10. Bonus: link to PMT later.
    Finance.

Quick quiz

Q1. YEARFRAC returns:
Q2. basis 3 means:
Q3. Good for:
Q4. vs DATEDIF Y:
Q5. Agree basis with:

Answers: Q1=A year fraction, Q2=actual/365, Q3=Pro-rata interest, Q4=Fraction vs whole years, Q5=Finance team (check after you try).

Revision card

Standalone card (no tip or photo strip). QR opens this lesson. Download the PNG and revise offline.

Revision card: YEARFRAC
YEARFRAC revision card