Skip to content

5000+ Great Articles

Best Articles & Essays: Interesting Articles to Read Online

  • Fix Media is Write Protected in Windows 7 Computer Tips
  • The best in furniture design toolkit 2023 How-To
  • How to create a thread on Twitter and how to view 2022 Computer Tips
  • How To Use a Public Computer Safely Computer Tips
  • Best calculator ti-84 plus 2020

    Best calculator ti-84 plus 2020. 1 - Protective Case for Texas Instruments TI-84 Plus Top Reviews I ordered this case a

  • Free 4 webcam monitoring apps for Android iOS
  • Apple Watch does not vibrate, how to fix it? Apple Watch
  • OTT Explains – What File Format is Best for USB Drives? Computer Tips

How to Subtract Dates in Excel

Posted on October 6, 2020 By blog_786 No Comments on How to Subtract Dates in Excel

If you have an Excel spreadsheet with a large number of dates, chances are you will eventually need to calculate the differences between some of those dates. Maybe you want to know how many months it took you to pay off your debt or how many days it took you to lose a certain amount of weight?

Calculating the difference between dates in Excel is easy, but it can get tricky depending on how you want to calculate certain values. For example, if you want to know the number of months between 02/05/2016 and 01/15/2016, should the answer be 0 or 1? Some people may say 0 because there is not a full month between dates, while others may say 1 because it is a different month.

In this article, I will show you how to calculate the difference between two dates to find the number of days, months, and years using different formulas depending on your preference.

The days are between two dates

The simplest calculation we can do is to get the number of days between two dates. The good thing about counting days is that there is really only one way to calculate a value, so you don’t have to worry about different formulas giving different answers.

How to Subtract Dates in Excel

In my example above, I have two dates stored in cells A2 and A3. On the right, you can see the 802 days difference between the two dates. Excel always has several ways to calculate the same value and that is what I did here Let’s take a look at the formulas:

How to Subtract Dates in Excel

The first formula is a simple subtraction of two dates, A3 – A2. Excel knows it is a date and simply calculates the number of days between those two dates. Easy and very simple. Alternatively, you can also use the DAYS function.

= DAYS (A3, A2)

This function takes two arguments: an end date and a start date. If you change the dates in the formula, you just end up with a negative number. Finally, you can use the DATEDIF function, which is included in Excel from Lotus 1-2-3 days, but is not an officially supported formula in Excel.

= DATEDIF (A2, A3, “D”)

When you enter the formula, you will see that Excel does not offer any options for fields, etc. Fortunately, you can see the syntax and all supported arguments for the DATEDIT function here

As an added bonus, what if you want to count the number of days per week between two dates? It’s easy enough because we have a built-in formula:

= NETWORKDAYS (startDate, endDate)

Counting the number of days and weekdays is easy enough, so let’s talk about months.

The most famous between two dates

The most difficult calculation is the number of months, because you can round up or down depending on whether it is a full month or an incomplete month. Excel now has the MONTHS function, but it is very limited because it only considers the month, not the year, when calculating the difference. This means that it can only be used to calculate the difference between two months of one year.

Since this is pointless, let’s look at a few formulas that will give us the correct answer. Microsoft provided them here, but if you’re too lazy to visit the link, I’ve provided them below as well.

Round Up – = (YEAR (LDate) -YEAR (EDate)) * 12 + MONTH (LDate) -MONTH (EDate) Round down – = IF (DAY (LDate )> = DAY (EDate), 0, -1) + (YEAR (LDate) -YEAR (EDate)) * 12 + MONTH (LDate) -MONTH (EDate)

These are two rather long and complex formulas, and you really don’t need to understand what’s going on. Here are the formulas in Excel:

How to Subtract Dates in Excel

Note that you should edit the rounding formula in the cell itself, because for some strange reason the entire formula does not appear in the formula bar. To see the formula in the cell itself, click the Formulas tab and click Show Formulas.

How to Subtract Dates in Excel

So what is the final result of the two formulas in our current example? See below:

How to Subtract Dates in Excel

Rounding gives me 27 months, rounding down gives me 26 months, which is exact depending on how you want to look at it. Finally, you can also use the RAZDIF function, but it only calculates full months, so in our case it returns 26.

= RAZDIF (A2, A3, “M”)

Years between two dates

As with months, years can also be calculated depending on whether you want to count 1 year as a full 365 days or whether the year change is taken into account. So let’s take our example where I used two different formulas to calculate the number of years:

How to Subtract Dates in Excel

One formula uses RAZDAT, and another uses the YEAR function. Since the difference in the number of days is only 802, RAZDAT shows 2 years, while the YEAR function shows 3 years.

How to Subtract Dates in Excel

Again, this is a matter of preference and depends on what exactly you are trying to calculate. It is recommended to know both methods in order to solve different problems with different formulas.

If you choose the formulas you use carefully, it is fairly easy to figure out exactly what you are looking for. Besides the ones I mentioned, there are also many more functions for working with dates, so feel free to check them out on the Office support site as well. If you have any questions, do not hesitate to comment. Enjoy!

–

Share this:

  • Twitter
  • Facebook
MS Office Tips

Post navigation

Previous Post: How to Stop an LCD Monitor from Flickering
Next Post: Ultimate Guide to Running Windows on a Mac

Related Posts

  • Top 40 Microsoft Excel Keyboard Shortcuts MS Office Tips
  • How To Get Microsoft Word For Free MS Office Tips
  • Ultimate Troubleshooting Guide for Office 2013 Installation Problems MS Office Tips
  • The 7 Best Microsoft Word Add-Ins MS Office Tips
  • How to write macros in Excel MS Office Tips
  • Add a Linear Regression Trendline to an Excel Scatter Plot MS Office Tips

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Archives

  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • March 2021
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • December 2019
  • July 2019
  • May 2019
  • April 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018

Categories

  • AI Tools & Guides
  • Amazon Web Services
  • Apple Watch
  • Computer Tips
  • Cool Websites
  • Featured Posts
  • Free Software Downloads
  • Gadgets
  • Gaming
  • General Software
  • Google Software/Tips
  • Hardware
  • Help Desk
  • How-To
  • iOS
  • iPad
  • iPhone
  • islamic Books
  • Linux
  • Linux Tips
  • Mac OS X
  • macOS
  • MS Office Tips
  • Networking
  • Office Tips
  • OS X
  • Product Reviews
  • Reviews
  • Safari
  • Smart Home
  • Smartphones
  • Software Reviews
  • technology
  • text
  • Tools Review
  • Troubleshooting
  • Tutorials
  • Uncategorized
  • Urdu Books PDF
  • Web Site Tips
  • Windows
  • Windows 10
  • Windows 7
  • Windows XP Tips
  • Wordpress
  • 10 Things to Check Before Publishing a YouTube Video
  • A Simple Trick to Get 50% Discount on Audible for Three Months
  • How to reset your SIM card
  • This Simple Trick Lets You Play YouTube in the Background on iOS
  • How to go Back to the old YouTube Layout (2013)
DMCA.com Protection Status

Recent Posts

  • How to Get 2 Free Audiobooks From Audible Trial Instead of 1
  • 10 Things to Check Before Publishing a YouTube Video
  • MailTag: Real-time Email Tracking, Made Easy
  • Pokemon Sleep: what is it and how to play
  • How to Respond to Messages on Instagram (Mobile and PC)

Recent Comments

  1. This Simple Trick Lets You Play YouTube in the Background on iOS on YouTube Not Working? Here Are Quick Fixes To Try
  2. How to Bypass Chromecast DNS and Circumvent Geo Blocking on 5 Cool Websites to Find Good Movies and TV Shows on Netflix
  3. 5 Cool Websites to Find Good Movies and TV Shows on Netflix on check netflix video quality internet explorer
  4. SmartDNS vs VPN “What’s the Difference?” on How to Watch Apple TV on Roku
  5. How to go Back to the old YouTube Layout (2013) on 10 Things to Check Before Publishing a YouTube Video
  • Best clipboard with calculator 2020 black
  • How To Create a Retweet Twitter Bot Cool Websites
  • Best ti baii plus calculator 2020

    Best ti baii plus calculator 2020. 1 - The Best TI BA II Plus Business Calculator Top Reviews .... . 2 - Navitech Red Graphics Calculator Ha

  • Best ti 84 graphing calculator 2020 Calculator
  • 5 Ways to Mute Yourself on Zoom Computer Tips
  • What is wudfhost.exe ? Windows 10
  • How to Take Screenshots in Restricted Apps in Android How-To
  • How to quickly transfer data from Mac to Mac macOS

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Go to mobile version