Free tech support / small logo


How do I figure out how many days I've been alive?

For a school project I'm supposed to figure out exactly how many days I've been alive. Is there some easy way to do that or do I have to count how many days since my last birthday plus the number of years I've been alive?


Dave's Answer:

A perfect question for the last day of the year, as I'm writing this on December 31, 2010. December, btw, gets its name from it being the tenth (dec) month in the early Roman calendar. In fact, Sept = seven, Oct = eight, Nov = nine too. Good random trivia!

As you know from the existence of leap years, our calendar doesn't quite perfectly encompass a year of time, so every four years we add a day on February 29th. When do those occur? It's a bit tricky: we have leap years when the year is exactly divisible by four, with the exception of century years that aren't also divisible by 400.

A century year is a year that ends with "00", like 1900, 2000, and so on. If those are evenly divisible by 400, like 2000 (which is 5 * 400), then it's also a leap year. 1900, on the other hand, wasn't a leap year as it isn't evenly divisible by 400.

So your calculation will need to take into account leap years, which, since we know 2000 was a leap year, means that for the last 110 years every fourth year has been a leap year. Start with 2008 as the most recent leap year (until it's 2012, of course, but according to the Mayan calendar we have all sorts of other issues to worry about at that point).

To calculate how many days you've been alive, I think you're on the right track, though I would do it slightly differently. I would calculate the number of days that occurred between the day of your birth and the end of that year and the number of days between the first day of the current year and the current date. That way when you calculate years, the leap year rule applies evenly.

For example, I was born on August 3rd of, oh, let's say, 1970. August 3 is the 215th day of the year on non-leap years (which I ascertained by using Google to search for what day of the year is august 3, btw!), which means that there were 365 - 215 (150) days left in that first year.

Today is the last day of 2010, a non-leap year, so that's easy: it's the 365th day of the year.

2009 - 1970 = 39 years, so that's 39 * 365 + leap years days total. (why not 2010 - 1970? Because we've already factored in the days in the current year)

How many leap years occurred? 1970 wasn't a leap year (not divisible evenly by 4) but 1972 was (4 * 493), so 72, 76, 80, 84, 88, 92, 96, 00, 04 and 08 were leap years, which means we'll need to add 10 extra days. Our formula therefore looks like this:

    150 days in the first year I was alive
+ 14,235 (39 * 365) days in the intervening years
+ 10 extra days for leap years
+ 365 days into the current year

For a total of 14,760 days between the day I was born in 1970 and the current, last, day of the year, 2010. Let's check: 14760/365 = 40.4, or 40 years and roughly five months. Yeah, that's about right for a 1970 birthday.

Having gone through all the tedious calculations, there are of course Web pages online that can easily calculate the number of days between two dates (see calculate date math) but those don't explain how they're doing the calculation, so they're not as interesting. Still, it's good to be able to double check your calculation!

Hope that helps you out!


Also check out:








Subscribe!
Never miss another Q&A article! Click to subscribe: Add to Google Reader Add to My Yahoo! Subscribe in NewsGator RDF XML
Comments (5) · Add Comment

"...14,235 (38 * 365) days in the intervening years"

14,235 is //39// times 365.

Posted by: Some Random Guy on the Internet at January 9, 2011 3:11 AM

You're right, I forgot to update the explanation of where the numbers came from. Fixed. :-)

Posted by: Dave Taylor at January 9, 2011 10:49 AM

Just go here http://www.wolframalpha.com/ and type you birth date

Posted by: byronfern at January 29, 2011 1:02 PM

For the total number of days you've been alive, you would also have to count your birthday, so your total should be 14,761 days. Wouldn't it?

Posted by: Dennis K at March 28, 2011 12:43 PM

Not sure, Dennis. Let's say I was born on the 5th. On the 6th, have I been alive one day, or two?

Posted by: Dave Taylor at March 28, 2011 12:50 PM
Starbucks coffee cup I do have a lot to say, and questions of my own for that matter, but first I'd like to say thank you for all your efforts on this Web site by buying you a cup of coffee!

I do have a comment, now that you mention it!











Remember personal info?


Please note that I will never send you any unsolicited email. Ever.

While I'm at it, please note that by submitting a question or comment you're agreeing to my terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site.









Recent Entries


Search
I Need Help!
Need Help? Ask Dave Taylor!


© 2002 - 2012 by Dave Taylor. All Rights Reserved.

Note: This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this web site or on any linked site.

[whiteboard marker tray]
"Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.