How to Calculate the Difference Between Two Dates in Excel

Data Translates
219 followers
Hi everyone, my name is Kevin. Today I want to show you how you can work with dates in Microsoft
Excel, how you can subtract dates, how you could add dates, and then I'm also going to share a
little bit of information about how dates work in the back end of Microsoft Excel. And as full
disclosure before we jump into this, I work at Microsoft as a full-time employee. All right,
well let's jump into it. Here I am on my desktop and I have Microsoft Excel open and we're just
going to start working with dates here. Now the great thing about Microsoft Excel and formulas
in Excel is that you can work with dates very easily. And so the first thing that I want to
show you how to do is first off how to subtract dates. And so what we're going to do is we're
going to show a quick example of how you can take your birth date and then subtract today's date
from it. And that'll tell you how many days are left until your birthday. So let's go ahead and
try this out. So for today's date, what we're going to do is well today's date is 12-29-2019.
So I could just type that in or what I could do is let's say I always want this to update
as I'm using my spreadsheet. What I could do instead is I could type in today. This is a
formula in Excel. And so the way you enter formulas is you enter equals today and then
open and close parentheses and then we could hit enter. So what that'll do is that'll insert today's
date. And then if I come back tomorrow, it'll show that it's now 12-30 and then the following
day 12-31. So it'll automatically increment based on the day that it is. Let's say that I wanted to
lock this so it doesn't automatically update. What I can do is I'll click on control C. So I'll copy
this and then I'll go to paste. And what I'm going to do then is I just want to paste the value. So
if I go to paste value, you'll see that the formula has gone away and now it just keeps that date
static. So that's one day that I could keep it. I just undid that so it'll show today again.
Now what I'm going to do next is I'm going to enter in my birthday. My birthday is August 11
and it's coming up on August 11, 2020. And that's the next time my birthday takes place.
And I'm going to hit enter. So how many days are in between August 11 and then today 12-29? Well,
what we could do is the great thing is you could simply take one date and subtract another date
from it. So what we're going to do is we're going to enter a formula. And to do that,
I'm going to type in the equal sign. That's how you always enter a formula in Excel. And then
what we're going to do is we're going to select cell B3. That's my birthday. So my birthday is
farther out than today. So we want to take the bigger number and subtract the smaller number.
So now what we're going to do is I'm going to subtract today's date from my birthday. So B3
minus B2. And then I'm going to click on enter. And it tells me that there are 226 days left
until my next birthday. So I get to be this age for a little while longer before I get older again.
Now, one of the things that's interesting. So here you'll see these dates in Excel.
The way Excel calculates the numbers in between these. So here, if I click on,
I just clicked on my right mouse button. And what I could do is I could go to format cells.
Right now it's set to the date format, but I could also just go to number format and I'm
and then click on. Okay. So Excel, what it does is it takes 8, 11,
20, 20, and it takes today's date of 12, 29, 2019, and it converts these into a number.
And so here you'll see that my birthday is on basically day 44,054. And then it subtracts
today's date, which is 43,828 to get 226. Now, interesting fact about Excel, Excel starts
its dates on January 1st, 1900. So if I type in one, one 1900. So I've entered a date, but if I
now format that to a number, you'll see that this is day one. So day one is in the early 1900s or
is 1900. I'm going to go ahead and let's format these back to a date. So I'm going to go ahead
and format these as a date again. And there we go. So the date shows up. Now what you can also
do is this example is subtracting dates from one another. What I can also do is I can add dates. So
here you know, I have a Sonicure toothbrush at home and they always recommend using it for about,
I think it's about maybe three months or so before replacing your toothbrush head. But when that is,
this is always a mystery to me. I always just keep going until it looks like it's gotten a little
older. But today maybe I could use a spreadsheet to really help me stay on top of that. So what
I'll do is let's say I installed a new toothbrush head today. So 12, 29, 2019. So I'm going to go
ahead and enter that in. What I could also do is I can type in now, that's another formula
that'll give me today's date and time. So I entered that in. So 12, 29, 2019. And what I can do then
is I'm going to type in a formula. So we'll do equals today's date. And let's see, I think they
always recommend about three months. So that's about 90 days. So I'm going to add 90 to it.
So I'm taking this date and then adding 90 days. And so now what it tells me is that's end of March.
So 3, 28, 2020 is in about 90 days. And so this will remind me, okay, so I need to replace my
toothbrush head on this date. Now I showed two different formulas as we were going through this.
One of them is today. I'm going to go ahead and type that in. So type in that formula.
And then I'm also going to type in this other one I typed in, which is now. What's the difference?
Well, the difference is today, we'll show you just the date today. Now we'll not only show me
the date, but it'll also show me the time. So it gives me a little extra detail when I type in
either one of those formulas. But those are two different ways where you could get the current
date and or time to show. All right. Well, that's how you work with dates in Microsoft Excel. You
could very easily add dates. You can subtract dates. And hopefully you're an expert working
with dates in Microsoft Excel. Now, if you feel like you are an expert working with dates,
please give this video a thumbs up. If you want to see more videos like this in the future,
please hit that subscribe button. That way you'll get a notification anytime new content like this
comes out. And lastly, if there are any other videos that you want to see me cover on my
channel in the future, leave a comment down below. I take a look at them and I'll add that to my list
of videos to create. All right. Well, that's all I have for you today. I'll see you next time. Bye.
