dash–calculator

04 Numbers and Counting

Number of Days in a Year? Calendar Facts

Readout 04-0393 · Updated · Standard formula, shown below

The calculator on this page is switched off while it is checked. The formula is below, and the worked example shows how to do the sum by hand.

A common year has 365 days, and a leap year has 366 days. The number of days in a year depends on whether the year is a leap year, which occurs every 4 years with some exceptions.

Formula

The number of days in a year is calculated using the Gregorian calendar rule:

Days = 365 + (1 if leap year else 0)

A year is a leap year if it is divisible by 4, except if it is divisible by 100, unless it is also divisible by 400. In formula form:

Leap = (year divisible by 4) AND (NOT (year divisible by 100) OR (year divisible by 400))

For the calculator, the expression 365 + floor(year/4) - floor(year/100) + floor(year/400) counts the number of leap days added since year 1, but for a single year it simplifies to checking divisibility. For a given year, the result is either 365 or 366.

Worked Example

Using the default year 2024:

  1. Check if 2024 is divisible by 4: 2024 / 4 = 506, remainder 0 → yes.
  2. Check if 2024 is divisible by 100: 2024 / 100 = 20.24 → no (remainder 24).
  3. Since it is divisible by 4 but not by 100, it is a leap year.
  4. Therefore, 2024 has 366 days.

The calculator gives 366, matching the expected result.

Why 365 Days? The Astronomical Background

The Earth takes about 365.2422 days (the tropical year) to orbit the Sun. If we used exactly 365 days, the calendar would drift by about 1 day every 4 years, causing seasons to shift over centuries. To keep the calendar aligned with the seasons, we add an extra day every 4 years (leap year), making the average year length 365.2425 days, very close to the tropical year.

How the Gregorian Calendar Works

The Gregorian calendar, introduced in 1582, refined the earlier Julian calendar. The rules are:

  • Every year divisible by 4 is a leap year (366 days).
  • Exception: years divisible by 100 are not leap years (e.g., 1700, 1800, 1900).
  • Exception to the exception: years divisible by 400 are leap years (e.g., 1600, 2000).

This gives an average year length of 365.2425 days, which is accurate to about 1 day in 3,300 years.

Common Misconceptions

Many people think a leap year occurs every 4 years without exception, but the century rule is often forgotten. For example, the year 1900 was not a leap year, even though it is divisible by 4. The year 2000 was a leap year because it is divisible by 400. This subtlety keeps the calendar accurate.

Another misconception: the number of days in a year is always 365 or 366. But in some historical calendars (like the Julian calendar) the rules were simpler, and in other calendar systems (like the Islamic lunar calendar) a year has 354 or 355 days. This article focuses on the Gregorian calendar used internationally.

How to Use the Calculator

Enter any year from 1 to 9999. The calculator will tell you if it is a common year (365 days) or a leap year (366 days). This is useful for:

  • Planning events or contracts that span a year.
  • Calculating interest or pro-rated amounts.
  • Understanding historical dates.
  • Checking if February has 28 or 29 days.

The result is a whole number: 365 or 366.

Common Mistakes When Counting Days

When manually calculating, people often forget the century rule. For example, 2100 is divisible by 4, but it is not a leap year because it is divisible by 100 and not by 400. Another mistake is using the Julian calendar rule for modern dates; the Gregorian calendar is the standard today.

Also, when counting days between dates, remember that a leap day (February 29) adds one day to the year. If you are calculating the number of days in a specific year, just check the divisibility rules.

Limitations and Notes

The Gregorian calendar is not perfect; the tropical year is slightly longer than 365.2425 days, so eventually a correction may be needed. However, for practical purposes, the current system is accurate for centuries to come. The calculator works for the proleptic Gregorian calendar, which extends the rules backward before 1582, which is common for astronomical calculations.

If you need the number of days in a specific month, remember: January, March, May, July, August, October, December have 31 days; April, June, September, November have 30 days; February has 28 days (or 29 in a leap year).

Frequently Asked Questions

Is 2024 a leap year?

Yes, 2024 is divisible by 4 and not by 100, so it has 366 days. February 2024 has 29 days.

Why does February have 28 days?

In the Roman calendar, February was the last month and had 28 days. When the leap day was added, it was placed at the end of February, giving it 29 days in leap years.

What is the next leap year?

The next leap year after 2024 is 2028, since it is divisible by 4 and not by 100.

Are there any years with 365.25 days?

No, a calendar year is always a whole number of days. The average over a 400-year cycle is 365.2425 days, but each individual year is either 365 or 366 days.

What about the year 2000?

2000 was a leap year because it is divisible by 400. It had 366 days.

How many days are in a year on other planets?

On Mars, a year is about 687 Earth days. On Venus, a year is about 225 Earth days. The number depends on the planet’s orbit around the Sun.

Related

Formula used
in year | Year | - | 2024 | 1 | 9999
out days | Days in year | days | 365 + floor(year / 4) - floor(year / 100) + floor(year / 400) | 0

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More on this panel

The whole Numbers and Counting panel →