How to Calculate How Many Days in a Year in Google Sheets

Learn how to accurately calculate the number of days in a year using Google Sheets, including handling leap years and creating dynamic formulas that update automatically each year.

I've been doing this year progress calculation in Sheets where I get the total number of days that have passed divided by the number of days in a year, and we get 7.95%. That's because today is January 30th, so there's been 29 days so far. So we do equals 29 divided by 365, and we get 7.95 something. Right? And the numerator of this, the days, is pretty simple. We just get the date. Diff of today versus the first of this year. What actually is interesting is how many different ways we can calculate the number of days in a year. Because this denominator here shouldn't actually be 365. How Many Days Between Two Dates? How Many Days This Year? Google Sheets Formula

Even last year was a leap year. So we need to make sure that we get the correct number of days in a year. So how do we calculate how many days in a year? I've looked at Date diff, and I just go from January 1st, 2025 to January 1st, 2026. This is pretty hard coded, right? To get a rolling number where I don't have to come in and update this every year, I can say year and wrap that around date. today. And then for the 2026, I can also say today wrap year around it. Of course, we're going to get the exact same year as now, but we just add plus one. Now this will update every single year without my intervention. How Many Days Between Two Dates? How Many Days This Year? Google Sheets Formula

I don't have to come in here and update this 2025 to 2026 or anything like that. Today is always going to be rolling, but there are some other ways to do this, to just get how many dates. in a year. We could just take the date, and let's say today, and we need three things. We need the year, right, and we're going to say 12 31. So this is December 31st this year, and we could minus the date, same year, which we're on it by today, 11, which is January 1st. But you see, this is 364. This is getting us the difference between these two years. Sorry, the difference between these two days, but they're not inclusive. So we need to add plus one. How Many Days Between Two Dates? How Many Days This Year? Google Sheets Formula

And even in leap years, this will be correct. This won't be 365. In leap years, this will be 364 366. Let's try that. So last year was a leap year. So this year, we can add minus one. And for this year. You can say minus one, and see, we just tested this for last year, it's 366. I do believe this, just using date and minus, and subtracting these two dates, is the simplest way to calculate how many days in a year, but I really do like the date diff. Because for me, date Diff just makes sense. If we look at this in simply date diff, we're just looking at the start date , the end date , and the unit, which is gonna be days. Just have to make sure we're inclusive of the whole year. How Many Days Between Two Dates? How Many Days This Year? Google Sheets Formula

So let's do 2024. We still have to use dates 20 24 1 1 end date , date. 2024 12 31, and in units D, 12 12 31, we see that this is 365, which again, last year was a leap year, so this 12 31 should probably be 2025, one, one. And that's the correct answer. So we just have to make this very small adjustment, just like we're adding plus one, that we're looking at the difference between the first and the first gets us the actual number of days in a year. So we can say probably 2028 is it, is the next leap year. How Many Days Between Two Dates? How Many Days This Year? Google Sheets Formula

So this has to be 2029. There you go. But let's say we're in 2027. We have to go to 2028. And that's not a leap year. 365. I like this. This sort of makes more sense. Date diff. But again, you have to, make sure you're going to the right dates. But you could simply subtract two dates, which I like too, because that's just pure math of dates. If you want to see cool things like year progress in spreadsheets, make sure you subscribe here on YouTube to BetterSheets. How Many Days Between Two Dates? Google Sheets Interface Changes How Many Days This Year? Google Sheets Formula