Industry guru Dave Taylor offers tech support on technical and business topics, including iPhone, iPod, Microsoft Windows, Sony PSP, cellphones, online advertising, CSS, Web design, business, Unix, Linux, SEO, Mac OS X, and shell script programming.     


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!


More Useful d) None of the Above Articles:
✔   What's the most popular Halloween candy?
It's Halloween, All Hallow's Eve, and in the United States, at least, that means it's time for a strange custom that children throughout...
✔   Review: Sony NEX-5N Digital Camera
This is a guest post by professional photographer Paul M. Bowers... I was born and raised in the briar patch of commercial photography-...
✔   How do other countries celebrate Independence Day?
Hello Mr. Taylor. The other kids in my class say that every country celebrates Independence Day on July 4th and that it's a...
✔   What is a ponzi scheme?
Dave, a friend of mine listened politely to my explanation of how a multi-tiered marketing system I've signed up for works, then told...
✔   Update firmware on my Panasonic Blu-Ray DVD player?
I have a Panasonic DMP-BDT320 blu-ray DVD player and it's starting to report that I need a 'firmware' update or upgrade. I have...

Let's stay in touch!
Sign up for my weekly AskDaveTaylor Newsletter and you'll receive even more tech and gadget help right to your inbox, along with exclusive news and industry updates. It's good stuff. I promise!
    Enter your name: and your email addr:  





Categorized: d) None of the Above   (Article 9732, Written by )
Tagged: date math, leap years
Previous: How do I change the lock or home screen on my iPhone?
Next: How do I copy / paste a Web URL on my iPhone?




Reader Comments To Date: 5

Some Random Guy on the Internet said, on January 9, 2011 3:11 AM:

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

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

Dave Taylor said, on January 9, 2011 10:49 AM:

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

byronfern said, on January 29, 2011 1:02 PM:

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

Dennis K said, on March 28, 2011 12:43 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?

Dave Taylor said, on March 28, 2011 12:50 PM:

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

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, Dave, for all your helpful information by buying you a cup of coffee!

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











I will never send you any unsolicited email. Ever.






Check This Out Too...

 
Look for Answers
Need Help? Ask Dave Taylor!


Follow Me on Pinterest

Find Me on Google+
ADT on G+
© 2002 - 2013 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. Further, 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. My lawyer says "Thanks".
"Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.