Skip to content

DIY Cost Tools

Leap Year Calculator

Check whether a year is a leap year and find the nearest previous and next leap years.

Whole number from 1 to 9999.

Use the units shown. Blanks, words, comma-formatted numbers, fractions, non-finite values, and values outside the stated ranges are rejected.

Leap year?No
Days in year365
Previous leap year2024
Next leap year2028

How to use this calculator

  1. Replace the example values with your own measurements or planning assumptions.
  2. Keep every value in the unit printed beside its field.
  3. Select Calculate and review the result together with the formula and limitations below.

Formula and method

A Gregorian year is a leap year when divisible by 4, except century years must also be divisible by 400.

Results are hidden whenever an input changes or validation fails, so an old answer cannot be mistaken for a current calculation.

Worked example

Year = 2026. The calculator returns Leap year? = No; Days in year = 365; Previous leap year = 2024; Next leap year = 2028.

The worked example uses the same default values displayed in the calculator.

Limitations and safety

The calculation uses the proleptic Gregorian calendar for years 1 through 9999. Historical local calendars may differ before Gregorian adoption.

Frequently asked questions

Is every year divisible by four a leap year?

No. Years divisible by 100 are not leap years unless they are also divisible by 400.

Why might the real result differ?

The calculation uses the proleptic Gregorian calendar for years 1 through 9999. Historical local calendars may differ before Gregorian adoption.

How should I round the answer?

Keep extra precision while planning, then round up when purchasing whole containers, bags, pieces, or stock lengths. Follow the output labels and supplier packaging.

Review notes and reference

Reviewed October 4, 2026. The formula was checked against the displayed worked example, and the script was tested for defaults, boundaries, invalid formats, condition-specific errors, and recovery. Reference: NIST Time and Frequency Division. Explanations and examples are original.

Related calculators