ISLEAPYEAR Function (LibreOffice Calc)

Date & Time Beginner LibreOffice Calc Introduced in LibreOffice 3.5
date leap-year validation calendar scheduling

The ISLEAPYEAR function returns TRUE if a given year is a leap year and FALSE otherwise. It is essential for validation, scheduling, prorating, and calendar logic.

Compatibility

What the ISLEAPYEAR Function Does

  • Returns TRUE for leap years
  • Returns FALSE for non‑leap years
  • Accepts numeric years or YEAR() output
  • Implements full Gregorian leap‑year rules

It is designed to be simple, reliable, and ideal for calendar logic.

Syntax

ISLEAPYEAR(year)

Arguments

  • year:
    A four‑digit year (e.g., 2024).

Basic Examples

Check if 2024 is a leap year

=ISLEAPYEAR(2024)

Returns TRUE.

Check if 2023 is a leap year

=ISLEAPYEAR(2023)

Returns FALSE.

Check leap year for the current year

=ISLEAPYEAR(YEAR(TODAY()))

Check leap year from a date

=ISLEAPYEAR(YEAR(A1))

Advanced Examples

Leap year from text using DATEVALUE

=ISLEAPYEAR(YEAR(DATEVALUE(A1)))

Leap year from imported CSV timestamp

=ISLEAPYEAR(YEAR(DATEVALUE(LEFT(A1;10))))

Leap year from Excel serial date stored as text

=ISLEAPYEAR(YEAR(DATE(1899;12;30)+VALUE(A1)))

Determine if February has 29 days

=ISLEAPYEAR(YEAR(A1))

Build a label like “2024 is a leap year”

=YEAR(A1) & IF(ISLEAPYEAR(YEAR(A1)); " is a leap year"; " is not a leap year")

Validate a date range that must include Feb 29

=AND(ISLEAPYEAR(YEAR(A1)); MONTH(A1)=2; DAY(A1)=29)

Use leap-year logic in prorating

=AnnualCost / IF(ISLEAPYEAR(A1); 366; 365)

Leap‑Year Rules (Gregorian Calendar)

A year is a leap year if:

  • divisible by 4
  • except divisible by 100
  • unless divisible by 400

Examples:

  • 2024 → leap year
  • 1900 → not a leap year
  • 2000 → leap year

Edge Cases and Behavior Details

ISLEAPYEAR returns TRUE or FALSE

Accepts:

  • Integer years
  • YEAR() output
  • VALUE() output

Invalid year → Err:502

ISLEAPYEAR does not accept:

  • Dates directly
  • Text dates
  • Negative years
  • Years before Gregorian reform

ISLEAPYEAR of an error → error propagates

Common Errors and Fixes

Err:502 — Invalid argument

Cause:

  • Year is text
  • Year < 1583
  • Non-numeric input

Fix:

  • Wrap with VALUE
  • Validate year
  • Ensure numeric input

Wrong result due to text parsing

Fix:

  • Convert with VALUE(A1)

Best Practices

  • Use ISLEAPYEAR for validation and scheduling
  • Use YEAR(TODAY()) for dynamic logic
  • Use ISLEAPYEAR with DAYSINYEAR for prorating
  • Use ISLEAPYEAR to detect February 29
  • Use ISLEAPYEAR for calendar generation and automation
ISLEAPYEAR is your leap‑year detector — perfect for validation, scheduling, prorating, and any workflow where February’s length matters.

Related Patterns and Alternatives

  • Use DAYSINYEAR to get 365 or 366
  • Use DAYSINMONTH for month lengths
  • Use YEAR to extract the year
  • Use DATEVALUE for text conversion
  • Use TODAY for dynamic calculations

By mastering ISLEAPYEAR and its companion functions, you can build powerful, reliable, and fully dynamic date‑driven workflows in LibreOffice Calc.

Copyright 2026. All rights reserved.