Decimal Year Calculator

Enter a calendar date to convert it to a decimal year.

Result

2024.2022
75
366

How it is calculated

The date must be typed as YYYY-MM-DD; impossible dates such as 2023-02-29 give no result. The tool finds the day of the year (1 for January 1) and the length of that year, 366 for leap years and 365 otherwise, and computes decimal year = year + (day of year − 1) ÷ days in year. Subtracting one means January 1 is exactly the whole year, and the value climbs to just under the next year on December 31 (2024-12-31 gives 2024.9973). A year is a leap year if it divides by 4, except century years, which must divide by 400. The date is treated as the start of the day, so no time of day is included. The result is rounded to four decimals and printed without a thousands separator, since a year is not a quantity.

Worked example

For 2024-03-15, 2024 is a leap year (divisible by 4, not a century), so it has 366 days. The day of the year is 31 (January) + 29 (February) + 15 = 75. The fraction is (75 − 1) ÷ 366 = 74 ÷ 366 = 0.2022. Adding the year gives 2024.2022. The tool also reports day of year 75 and 366 days in the year.

Try this example →

Common mistakes

  • Typing the date as 15/03/2024 or 03-15-2024. Only the year-month-day order with dashes is accepted, and other layouts return nothing.
  • Using the value as if it included the time of day. The date is counted from the start of the day, so noon on the same date has the same decimal year.
  • Expecting July 1 to be exactly 2026.5. The fraction is based on days, not months, and the subtraction of one day matters: June 30, 2026 gives 2026.4932 and July 1 gives 2026.4959.
  • Comparing a leap-year date with the same date in a normal year as if the fractions matched. Because the denominator is 366 instead of 365, the same calendar date gives a slightly different decimal.
  • Rounding the result to an integer or two decimals before sorting or subtracting. Adjacent days differ in the third or fourth decimal, so heavy rounding merges them.

About this calculator

A decimal year expresses a calendar date as a single fractional number, calculated as year + (day-of-year − 1) / days-in-year — so June 30 of a 365-day year lands around 2026.4932, roughly halfway through the year. Leap years use 366 in the denominator, which shifts the decimal value slightly compared to non-leap years for the same calendar date.

This calculator converts any calendar date into its decimal-year equivalent, correctly accounting for leap years. Decimal years are the standard time format in astronomy (for star catalog epochs), geophysics (for GPS and tectonic plate motion data), and scientific datasets where a single sortable, continuously increasing number is more convenient than separate year/month/day fields.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    A decimal year treats every day as an equal slice of that year, which is why 2026-06-21 is day 172 of 365 and returns 2026.4685. Use it to place dates on a chart axis, but note that two dates in a leap year and a normal year are not directly comparable by the fractional part alone. Subtract the full values instead. Where do you use decimal years: charts, science or finance?

Popular calculators

All Calculators