A year is 365.24 days. Or 8,765 hours, or 526,000 minutes, or 31.6 million seconds.
The tricky one is the number of days. Because the earth year doesn’t work out to exactly 365 days, we have the leap year. If we didn’t, days in the calendar wouldn’t match up with the position of the Earth in its orbit. Eventually, the months would flip around, and the northern hemisphere would have summer in January, and vice versa.
To fix this, we put on extra days in some years, called leap years. In those leap years, a year lasts 366 days, and not the usual 365. This gets tacked onto the end of February. Normally, February only has 28 days, but in leap years, it has 29 days.
When to you have leap years? It’s actually pretty complicated.
The basic rule is that you have a leap year if you can divide the year by 4. So 2004, 2008, etc. But years divisible by 100 are not leap years. So 1800, 1900 aren’t leap years. Unless they’re divisible by 400. So 1600 and 2000 are leap years. By following this algorithm, you can have an Earth orbit that lasts 365.24 days.
With the current system, it’s not actually perfect. There’s an extra 0.000125 days being accumulated. Over course of 8,000 years, the calendar will lose a single day.
Here’s an article about how astronomers might use cosmic rays to measure time on Earth.
And here is more information on how to calculate leap years from timeanddate.com.
We did an episode of Astronomy Cast just on the Earth. Give it a listen, Episode 51: Earth.