Number of Days Calculator

Find how many days are in any year or month, which day of the year a date is, days remaining in the year, and whether the year is a leap year.

Time & Date Leap year Day of year
Rate this calculator · 3.7 (3)

Number of days in a year, month, or to-date

Days in year, month, day-of-year, leap-year check

Instructions — Number of Days Calculator

1

Pick a mode

Today: see day-of-year for any date, plus how many days remain. Year: total days for any year (365 or 366) with leap-year status. Month: length of any month, weekday breakdown, and the day-of-week the month starts and ends.

2

Enter the inputs

For "Today" mode, use the date picker — defaults to today. For Year mode, type a year between 1 and 9999. For Month mode, pick a year and month. Results recompute as you type.

3

Read the result

The headline shows the main number with a leap-year badge where relevant. The cells below break it down into weeks, weekday counts, and hours. Quick-pick buttons let you check known edge cases (2024 leap, 2100 non-leap).

Leap rule: divisible by 4, unless also divisible by 100 and not by 400. 2024 leap; 1900 not; 2000 yes; 2100 no.
Day-of-year: Jan 1 = day 1, Dec 31 = day 365 (or 366). The ISO 8601 ordinal date format is YYYY-DDD.

Formulas

Calendar arithmetic at the level of "days in a year" comes down to the leap year rule and the fixed month lengths.

Leap year test
$$ \text{leap} = (y \bmod 4 = 0) \land \lnot(y \bmod 100 = 0 \land y \bmod 400 \neq 0) $$
Divisible by 4 means leap, except century years not divisible by 400. So 2000 was leap, 1900 was not, 2100 will not be.
Days in year
$$ d_{year} = \begin{cases} 366 & \text{if leap} \\ 365 & \text{otherwise} \end{cases} $$
Astronomical year length is 365.2422 solar days. The Gregorian calendar averages 365.2425 days, accurate to within one day per 3,236 years.
Days in month
$$ d_m \in \{28, 29, 30, 31\} $$
Jan, Mar, May, Jul, Aug, Oct, Dec have 31. Apr, Jun, Sep, Nov have 30. February has 28 (29 in a leap year). Average month: 30.44 days.
Day of year (ordinal)
$$ D = \sum_{i=1}^{m-1} d_i + d $$
Sum the lengths of all prior months in the same year, then add the day-of-month. May 13 in a non-leap year = 31+28+31+30+13 = day 133.
Days remaining in year
$$ r = d_{year} - D $$
If today is day 133 of a 365-day year, 232 days remain. Useful for annual budgets, year-end planning, and OKR tracking.
Average month length
$$ \bar{m} = \frac{365.2425}{12} = 30.4369 \text{ days} $$
Used in finance for actuarial calculations and average-rate problems. Not used in calendar arithmetic, where each month is its actual length.

Reference

Days in each month
MonthDaysMnemonic
January31Knuckle
February28 (29 in leap)Short one
March31Knuckle
April30Gap (30 days hath...)
May31Knuckle
June30Gap
July31Knuckle
August31Knuckle (next hand)
September30Gap
October31Knuckle
November30Gap
December31Knuckle

Leap years and exceptions

Recent and upcoming leap years plus the century exceptions.

Recent leap years
YearStatus
2000Leap (div by 400)
2004Leap
2008Leap
2012Leap
2016Leap
2020Leap
2024Leap
2028Leap
Century exceptions
YearStatus
1600Leap (div by 400)
1700Not leap
1800Not leap
1900Not leap
2000Leap (div by 400)
2100Not leap
2200Not leap
2400Leap (div by 400)

Note: Microsoft Excel treats 1900 as a leap year due to a bug inherited from Lotus 1-2-3, deliberately preserved for backward compatibility. Date math in Excel before March 1, 1900 is off by one day.

Article — Number of Days Calculator

Number of days: in a year, in a month, day of the year

A regular calendar year has 365 days. A leap year has 366. February has 28 days, or 29 in a leap year. The other eleven months have either 30 or 31 days following a pattern that has not changed since Pope Gregory XIII reformed the calendar in 1582. The day-of-year for any date is the ordinal number from 1 (January 1) through 365 or 366 (December 31).

The calculator at the top of this page covers all three questions: how many days are in a chosen year, how many days are in a chosen month, and what day-of-year corresponds to any date. Each mode also reports the leap year status, which determines whether February has 28 or 29 days.

How many days are in a year?

A common year has 365 days. A leap year has 366. The astronomical year (the time Earth takes to orbit the Sun once) is 365.2422 mean solar days. To keep the calendar aligned with the seasons, the Gregorian system adds one day to February every four years, with three exceptions every 400 years. The result averages 365.2425 days per year, accurate to within one day per 3,236 years.

Other definitions of a year exist for specialized purposes. The Julian year used in astronomy is exactly 365.25 days. The sidereal year (one full rotation against the fixed stars) is about 20 minutes longer than the tropical year. For calendar purposes, only the 365 or 366 number matters.

Year lengths
Common year 365 days
Leap year 366 days
Tropical year 365.2422 days (astronomy)
Gregorian average 365.2425 days
Julian year (astronomy) 365.25 days exactly

How many days are in each month?

Seven months have 31 days, four have 30, and February has 28 or 29. The pattern: January, March, May, July, August, October, December are the 31-day months. April, June, September, November are the 30-day months. February stands alone.

The knuckle mnemonic works for the 31-versus-30 split. Make a fist and count the knuckles starting from the left index finger: each knuckle is a 31-day month, each gap a 30-day month, with February as the exception. When you reach July at the right pinky knuckle, start again from the left fist for August. The pattern is symmetrical only by accident — the order was assembled across centuries of calendar reform.

  • January = 31 days
  • February = 28 or 29 days
  • March = 31 days
  • April = 30 days
  • May = 31 days
  • June = 30 days
  • July = 31 days
  • August = 31 days
  • September = 30 days
  • October = 31 days
  • November = 30 days
  • December = 31 days

The leap year rule

A year is a leap year if it is divisible by 4, unless it is also divisible by 100 and not by 400. The double exception exists because adding one day every four years overcorrects slightly: the tropical year is 365.2422 days, but the simple leap rule averages 365.25. Dropping three leap days every 400 years brings the average down to 365.2425, very close to the astronomical value.

2000 was a leap year because it is divisible by 400. 1900 was not a leap year because it is divisible by 100 but not 400. 2100 will not be a leap year either, for the same reason. The next non-leap century year that humans alive today might see is 2100, which will quietly have a 365-day year despite being divisible by 4.

Did you know

Microsoft Excel treats February 29, 1900 as a real date even though 1900 was not a leap year. The bug was inherited from Lotus 1-2-3 in the 1980s and deliberately preserved for backward compatibility, because changing it would break decades of existing spreadsheets. Microsoft documents the bug publicly and has stated it will never be fixed. Date math in Excel before March 1, 1900 is off by one day for this reason.

Why February is the short month

February has 28 days because of Roman numerology. When the legendary second king of Rome, Numa Pompilius, reformed the old 10-month Roman calendar around 700 BC, Romans considered even numbers unlucky. Each month was supposed to have an odd number of days. But the total had to work out to roughly 355 days (the lunar year length), which is mathematically impossible with twelve odd numbers.

One month had to break the rule, and February got the short straw because it was the last month of the year (the Roman year started in March). It received 28 days, the only even-numbered month in the calendar. Numbers like 30 and 31 came later when Julius Caesar reformed the calendar in 46 BC, but February kept its original short length.

Did you know

The Latin names of September, October, November, and December mean "seventh," "eighth," "ninth," and "tenth" — not ninth, tenth, eleventh, and twelfth. The original Roman calendar started the year in March, so September really was the seventh month. When January and February were added to the start of the year, the four month names were never updated. We have been using a linguistic relic from ancient Rome for over 2,000 years.

Day of the year (ordinal date)

The day of the year is the ordinal position of a date counting from January 1. January 1 is day 1. January 31 is day 31. February 1 is day 32. December 31 is day 365 (or 366 in a leap year). The format is sometimes written as YYYY-DDD in ISO 8601, so March 1, 2026 is 2026-060.

Ordinal dates show up in logistics, manufacturing, and aerospace because they avoid the irregular month boundaries. A shipment numbered 2026-133 was queued on the 133rd day of 2026, which is May 13. NASA mission logs, military operations, and scientific data series often use this format. The Julian Day Number used by astronomers is a related but different system: a continuous count of days since January 1, 4713 BC.

Days remaining in the year

Days remaining in the year equals the year length minus the day-of-year. On May 13, 2026 (day 133), 232 days remain (365 minus 133). On December 31, zero days remain.

This is useful for year-end planning: budget burn rates, OKR tracking, holiday shopping countdowns. It is also the standard way to project annualized rates from year-to-date data. If a company has earned $1.2 million through day 133, the simple annualized projection is $1.2 million times 365 over 133, or about $3.29 million for the full year — assuming the rate holds.

Tip

For year-end progress tracking, divide day-of-year by 365 to get the fraction of the year elapsed. May 13 is day 133, which is 36.4% of the way through the year. If your annual goal is 60% complete, you are ahead of schedule. If it is 30% complete, you are behind.

Working days per year

A typical year has about 251 working days in the United States. The math: 365 calendar days minus 104 weekend days (52 weeks of Saturdays and Sundays) minus roughly 11 federal holidays leaves 250 to 252 working days, depending on which year and how holidays land.

The exact count varies because holidays sometimes fall on weekends and the observance shifts. New Year's Day on a Saturday is usually observed on the preceding Friday, which removes a working day. Independence Day on a Sunday is observed on Monday. These shifts mean two years with the same set of holidays can have different working-day counts.

United States
~251 days
11 federal holidays
Japan
~245 days
16 national holidays

European working-day counts vary more by country. France typically has about 252 working days. Germany averages around 249 but ranges from 247 to 253 depending on the Bundesland, because state-level religious holidays differ. The UK has about 252 working days based on eight bank holidays. India varies wildly by state, generally 245 to 250.

Common day-count mistakes

Assuming all years have 365 days. Leap years break the assumption. Multiplying years by 365 underestimates the true day count by about one day every four years.

Treating 1900 as a leap year. Microsoft Excel does this by design, and the bug has propagated into countless spreadsheets. 1900 was not a leap year. The next non-leap century year is 2100.

Confusing 30 days with one month. 30 days is exactly 30 days. One calendar month varies from 28 to 31 days. "30 days from February 1" is March 3 (or March 2 in a leap year). "One month from February 1" is March 1.

Using 252 working days as a constant. Working days per year vary by jurisdiction and by how holidays land. For most US contracts and financial calculations the safe assumption is 250 to 252. Quants and actuaries often use exactly 252 by convention.

Year zero does not exist (in history)

Historical chronology jumps from 1 BC directly to 1 AD with no year zero. Astronomical year numbering does include year 0, which equals 1 BC, and then year -1 equals 2 BC. Calculations spanning the BC/AD boundary in a historical context are off by one if you assume continuous numbering. Astronomers use continuous numbering for clean arithmetic.

FAQ

365 days in a regular year, 366 days in a leap year. The astronomical year is 365.2422 solar days. The Gregorian calendar averages 365.2425 days per year, accurate to within one day per 3,236 years.
January, March, May, July, August, October, December have 31 days. April, June, September, November have 30 days. February has 28 (or 29 in a leap year). Average month length is 30.44 days.
Yes. 2024 is divisible by 4 and not divisible by 100, so it is a leap year with 366 days. February 2024 had 29 days. The next leap year is 2028.
No. 2025 is not divisible by 4 (2024 was, 2028 will be). 2025 has 365 days, with February having 28 days.
No. Even though 2100 is divisible by 4, it is also divisible by 100 and not by 400. By the Gregorian rule, that makes it a common year. The next century year that will be a leap year is 2400.
When the Roman king Numa Pompilius added February to a 10-month calendar around 700 BC, Romans considered even numbers unlucky. February got 28 days — the only month with an even count — because it was the last month of the year (the year started in March). The 12-month order survived but the original odd-number preference left February short.
It depends on the date. Pick "Today" mode and enter any date. The calculator returns the ordinal day number from 1 (January 1) to 365 or 366 (December 31). For example, May 13, 2026 is day 133 of 365.
In the US, about 251 working days (365 minus 104 weekend days minus roughly 11 federal holidays). UK ~252, Germany ~249, Japan ~245. The exact count varies year to year as holidays land on weekends.