EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Certification Courses
  • 120+ Courses All in One Bundle
  • Login
Home Excel Excel Resources Excel Tips Subtract Date in Excel
Secondary Sidebar
Excel Functions
  • Excel Tips
    • Recover Document in Excel
    • Excel Shortcut to Select Row
    • Excel Header Row
    • Excel Insert Button
    • Excel Translate
    • Budget in Excel
    • KPI Dashboard in Excel
    • Blank Invoice Excel Template
    • Write Formula in Excel
    • Auditing Tools in Excel
    • Autofit Row Height in Excel
    • Formatting Text in Excel
    • Add Rows in Excel Shortcut
    • Divide Cell in Excel
    • Compare Two Columns in Excel for Matches
    • Excel Troubleshooting
    • Unprotect Excel Workbook
    • Subtract Date in Excel
    • Carriage Return in Excel
    • Negative Numbers in Excel
    • Worksheets in Excel
    • Excel Match Multiple Criteria
    • Exponential Moving Average Formula
    • Sentence Case in Excel
    • Excel Reverse Order
    • Excel Timesheet Template
    • Weighted Average in Excel
    • CTRL Shift-Enter in Excel
    • Excel Expense Tracker
    • INDEX MATCH Function in Excel
    • Percent Change in Excel
    • Drag and Drop in Excel
    • Shade Alternate Rows in Excel
    • Excel Database Template
    • Inverse Matrix in Excel
    • New Line in Excel Cell
    • Format Cells in Excel
    • Excel Text with Formula
    • Project Management Template in Excel
    • Vlookup vs Index Match
    • Embedded in Excel
    • Count Colored Cells in Excel
    • Excel Hacks
    • Column Header in Excel
    • Database Function in Excel
    • Excel Spell Check
    • Linear Interpolation in Excel
    • Convert Excel to CSV
    • Excel Not Responding
    • Delta Symbol in Excel
    • Excel Mortgage Calculator
    • Excel Show Formula
    • Break Links in Excel
    • VLOOKUP Examples in Excel
    • Alternate Row Color Excel
    • Checklist in Excel
    • Microsoft Office Tips
    • Excel vs Access
    • Excel Change Case
    • Count Characters in Excel
    • Formula Bar in Excel
    • Invoice Template in Excel
    • Find and Replace in Excel
    • PowerPivot in Excel
    • Wildcard in Excel
    • Line Break in Excel
    • NULL in Excel
    • Text Formula in Excel
    • Family Tree in Excel
    • Insert Calendar in Excel
    • Page Setup in Excel
    • Search For Text in Excel
    • Switching Columns in Excel
    • 3D Cell Reference in Excel
    • Roadmap Template in Excel
    • Cell References in Excel
    • Excel Automation
    • Matching Columns in Excel
    • Evaluate Formula in Excel
    • How to Find Mean in Excel
    • How to Add Cells in Excel
    • Project Timeline in Excel
    • TODAY Formula in Excel
    • Poisson Distribution in Excel
    • YEAR Formula in Excel
    • REPLACE Formula in Excel
    • Create Spreadsheet in Excel
    • SEARCH Formula in Excel
    • HYPERLINK Formula in Excel
    • Pivot Table with Multiple Sheets
    • COLUMNS Formula in Excel
    • DAY Formula in Excel
    • RIGHT Formula in Excel
    • INDIRECT Formula in Excel
    • Excel IRR Formula
    • Pivot Table Sort
    • OR Formula in Excel
    • Pivot Table Formula in Excel
    • How to Edit Drop Down List in Excel?
    • WEEKDAY Formula in Excel
    • Chart Wizard in Excel
    • Time Difference in Excel
    • Lookup Table in Excel
    • SUBTOTAL Formula in Excel
    • LOOKUP Formula in Excel
    • Themes in Excel
    • Group Worksheets in Excel
    • Excel ISNUMBER Formula
    • 3D Maps in Excel
    • VLOOKUP Tutorial in Excel
    • Moving Columns in Excel
    • Grouping Columns in Excel
    • Excel Formula of Percentage
    • Excel Leading Zeros
    • Timesheet in Excel
    • Nested IF Formula in Excel
    • SUMIF Formula in Excel
    • Concatenation in Excel
    • Excel Insert Page Break
    • LEN Formula in Excel
    • Insert Comment in Excel
    • Excel Print
    • Fractions in Excel
    • Excel Add a Column
    • Borders in Excel
    • Excel Sum by Color
    • Excel vs Google Sheets
    • Calculate Percentage Increase in Excel
    • Excel Format Phone Numbers
    • Excel Search Box
    • Excel vs CSV
    • Excel vs Numbers
    • Excel Concatenate Date
    • Excel Bullet Points
    • Calculate Compound Interest in Excel
    • Find External Links in Excel
    • Excel Comma Style
    • Excel Remove Leading Spaces
    • Combine First and Last Name in Excel
    • How to Calculate Ratio in Excel
    • SUMPRODUCT Function with Multiple Criteria
    • Create Excel Template
    • Excel Greater than or Equal
    • Excel Keyboard Shortcuts
    • Excel Row vs Excel Column
    • Excel Operators
    • Excel Text Compare
    • Excel Uppercase Function
    • Excel Auto Numbering
    • Watermark in Excel
    • Excel Delete Row Shortcut
    • Excel Word Count
    • Row Count in Excel
    • Excel Grade Formula
    • Excel Percentage Difference
    • Excel Rows and Columns
    • Excel Group
    • Excel Move Columns
    • Excel Row Height
    • Excel Sparklines
    • Excel Drawing a line
    • Multiple IFS in Excel
    • Excel Strikethrough
    • Numbering in Excel
    • Share Excel Workbook
    • Excel Shortcut For Merge Cells
    • Excel OneDrive
    • Excel Track changes
    • Excel Hide Formula
    • Excel Filter Shortcuts
    • Excel 3D Reference
    • Protect Excel Workbook
    • Excel Moving Averages
    • Excel Row Limit
    • Excel Absolute Value
    • Excel Print Area
    • Excel Format Painter
    • Excel Separate text
    • Excel Autofit
    • Excel Columns to Rows
    • Excel Paste Shortcut Option
    • Excel Rows to Columns
    • Excel Insert Row Shortcut
    • Excel Extensions
    • Excel Unmerge Cells
    • Divide in Excel Formula
    • Excel Compare Two Columns
    • Not Equal To Excel
    • Excel Remove Duplicates
    • Excel Remove Spaces
    • Excel Calculate Age
    • Copy Excel Sheet
    • Excel Conditional Formatting Based on Another Cell Value
    • Excel Cell Reference
    • Excel Split Cell
    • Excel Circular Reference
    • Highlight Every Other Row in Excel
    • Errors in Excel
    • Excel Delete Pivot Table
    • Excel Pivot Table
    • Subtraction in Excel
    • Count Unique Values in Excel
    • Excel Highlight Duplicates
    • Excel Data Formatting
    • Random Numbers in Excel
    • Basic Excel Formulas
    • Page Numbers in Excel
    • Excel CAGR Formula
    • Excel Combine cells
    • IFERROR with VLOOKUP in Excel
    • Column Sort in Excel
    • Print Comments in Excel
    • Cheat Sheet of Excel Formulas
    • Remove Hyperlinks in Excel
    • Excel Drop Down List
    • Remove (Delete) Blank Rows in Excel
    • Relative Reference in Excel
    • Subscript in Excel
    • Superscript in Excel
    • Excel Insert Multiple Rows
    • Excel Absolute Reference
    • Unhide Columns in Excel
  • Excel Functions (12+)
  • Excel Tools (114+)
  • Financial Functions in Excel (17+)
  • Logical Functions in Excel (14+)
  • Lookup and Reference Functions in Excel (35+)
  • Maths Function in Excel (47+)
  • TEXT and String Functions in Excel (26+)
  • Date and Time Function in Excel (24+)
  • Statistical Functions in Excel (59+)
  • Information Functions in Excel (4+)
  • Excel Charts (56+)
  • Workplace Productivity (4+)
  • Microsoft Office Tools (15+)
  • Excel Formula and Functions (22+)
  • MS Excel Shortcuts (4+)
Excel Functions Courses
  • EXCEL COURSE
  • Online Excel Data Analysis Course
  • Excel for Finance Course

Subtract Date in Excel

By Madhuri ThakurMadhuri Thakur

Subtract Date in Excel

Excel Subtract Date (Table of Contents )

  • Overview of Excel Subtract Date
  • Examples to Subtract Date in Excel

Overview of Excel Subtract Date

Working with dates in Excel is common for someone being a data analyst, isn’t it? You might have worked on a lot of those. However, while working with a large set of dates, the possible chances are that you may encounter a situation where you want to find out the difference between the two dates. Maybe, you are interested in getting the number of days between two date values. I might be interested in finding out the number of months that are falling between those two dates or likewise being interested in years as well. It is an easy task at first when you look at it.

Examples to Subtract Date in Excel

This article will see how to subtract two dates based on certain criteria to get the desired result. Follow the article as well as steps for each example below:

You can download this Subtract Date Excel Template here – Subtract Date Excel Template

Example #1 – Two Dates in Number of Days

Consider data as shown below, where we have two columns named First Date and Second Date:

Start Your Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

Subtract Date in Excel 1-1

Step 1: In cell C2, use a usual subtraction method to subtract the First Date from the Second Date. Use the formula as =B2-A2.

Subtract Date in Excel 1-2

Press the Enter key, and you’ll get the difference between the two dates as shown below:

All in One Excel VBA Bundle(120+ Courses, 30+ Projects)
Basic ExcelAdvanced ExcelVBA & MacrosExcel Dashboards
Pivot TablesStatistical FunctionsFinancial FunctionsCharts & Graphs
Price
View Courses
120+ Online Courses | 30+ Projects | 500+ Hours | Verifiable Certificates | Lifetime Access
4.9 (64,547 ratings)

Subtract Date in Excel 1-3

Step 2: Select the entire column C and click on the Home tab under the Number group section; select either General or Number formatting through the dropdown list to convert it into numbers.

General - Subtract Date

You now can see the difference between two dates as a number of days as shown below:

Subtract Date in Excel 1-4

Step 3: Drag the formula until the last working row, and you can see the difference between all dates into a number of days, as shown below. You can hit keyboard strokes Ctrl + D after selecting all the working cells.

Subtract Date in Excel 1-5

Example #2 – Two Dates in Number of Years

Now, we will be looking to figure out how to find a difference between two dates in a number of years.

Since we need to find out the difference between the years of the Second Date and the First Date, we’ll be using the YEAR() function in Excel to find out the difference in years.

Step 1: In cell D2, use the =YEAR(B2) formula. It will extract the year from the date present under cell B2.

year substract 2-1

Step 2: Now, use subtract operator so that we can make subtraction between two date years.

year substract 2-2

Step 3: Again, use YEAR(A2) as a function which extracts the year from the date present under cell A2.

Substract Excel 2-2

Press Enter key, and you’ll get the number of years as a difference between Second Date and First Date as shown below.

year substract 2-3

Step 4: Drag the formula across cells to get the difference in the number of years for dates present across the cells.

year substract 2-4

If you could see column D, you will figure out that for row 4 and 7, the number of years difference is zero. Since both the dates associated are falling in the same year, to get a fraction of the year value, we can use the other function called YEARFRAC() to get the number of years, including a fraction of the years well.

Year in Fraction 3-1

In cell E2, use =YEARFRAC(A2, B2) as a formula so that we can get the year value with fractional part included in it.

Note that, YEARFRAC function has three parameters, start_date is the First Date, end_date is the Second Date. These two parameters are required arguments and are need to be provided. The third parameter is [basis], which is optional.

Year in Fraction 3-2

Now, drag the formula until cell E11, and you can see all the differences in fractional years. Pay more attention to row 4 and 7, as you will not see zero there.

Year in Fraction 3-3

Example #3 – Two Dates using DATEDIF Function

Now, we are about to see a function that is not listed in any of the Excel formulas. In cell F2, use the formula for DATEDIF and initiate the formula for the same.

Step 1: Use A2 as a first argument (start_date) and B2 as a second argument (end_date) under the DATEDIF formula.

DATEDIF function 3-1

Step 2: For the third argument (unit), use either of the units available to get the difference in the desired format. I will use M so that I can get the difference in a number of months.

DATEDIF function 3-2

Please have a look at the double quotes we have added for unit value. It is mandatory to enclose the value for the unit argument in double-quotes to get the formula working.

Step 3: Drag the formula until cell F11 to get the desired result as a difference between a number of months for given dates.

DATEDIF function 3-3

This is how we can subtract two dates in Excel to get the difference between either number of days, years or months. Let’s wrap the things up with some points to be remembered:

Things to Remember

  • DATEDIF function is not a part of any of the Excel formulas. However, it can be used within Excel.
  • Ensure that while using the YEARFRAC and DATEDIF function, the end_date should always be greater than the start_date. Otherwise, you’ll be encountered with #NUM! Error.
  • The unit “M” that extract a number of complete months between two date values. The same is with unit “Y” that returns year between two dates.

Recommended Articles

This has been a guide to Subtract Date in Excel. Here we discuss How to Subtract Date in Excel along with practical examples and a downloadable excel template. You can also go through our other suggested articles –

  1. Excel Subtract Time
  2. Compare Dates in Excel
  3. Excel Date Format
  4. Subtraction in Excel
Popular Course in this category
MS Excel Training Bundle
  13 Online Courses |  100+ Hours |  Verifiable Certificates |  Lifetime Validity
4.5
Price

View Course

Related Courses

Excel Training (23 Courses, 9+ Projects)4.9
Excel Data Analysis Training (17 Courses, 8+ Projects)4.8
Excel for Finance Training (18 Courses, 7+ Projects)4.7
0 Shares
Share
Tweet
Share
Primary Sidebar
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Excel Charts
  • Excel Tips
  • All Tutorials
Certification Courses
  • All Courses
  • Excel VBA Course - All in One Bundle
  • VBA Course
  • Excel Data Analysis Course
  • Excel for Marketing Course
  • Excel for Finance Course
  • Excel for HR Training

ISO 10004:2018 & ISO 9001:2015 Certified

© 2022 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA
Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA
Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

Download Subtract Date Excel Template

EDUCBA

Download Subtract Date Excel Template

EDUCBA

डाउनलोड Subtract Date Excel Template

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more