Welcome to TNW Basics, a collection of tips, guides, and advice on how to easily get the most out of your gadgets, apps, and other stuff.
There are a lot of ways to calculate the number of days between two dates. You could use free online calculators. You could do it programmatically, with coding languages, if it’s needed for a product you’re building. But if you want a solution somewhere in between where you’re not required to code, but do wish to feel some ‘wizardly’ gratification, there’s always good ‘ol Excel or Google Sheets.
Now, you could use such a formula in many different ways, for many different purposes. You could, for instance, use it to track how long a certain work project has been running. For this example, we’re going to be using a personal project though: your life in its totality.
Head over to Google Sheets and do the following:
- First, let’s type some headers in the first row to explain the data we’re about to enter and calculate below it. ‘Date of birth’ in A1, ‘Today’ in B1, ‘# of days alive’ in C1
- In the first cell of the first row below the headers, A2 to be precise, type your birth date in the following format: mm/dd/yyyy
- In the next cell, B2, type ‘=today()’ and hit enter. It will now show today’s date.
- In the final cell, C3, type ‘=minus(B2,A2)’ and hit enter. It will now show the total number of days you’ve lived in C3.
There you go, it’s that simple to calculate the number of days between two dates. Feel free to use this in any other way, for any other purpose.
Get the TNW newsletter
Get the most important tech news in your inbox each week.