
- MS Excel Basics
- Excel - Home
- Excel - Getting Started
- Excel - Explore Window
- Excel - Backstage
- Excel - Entering Values
- Excel - Move Around
- Excel - Save Workbook
- Excel - Create Worksheet
- Excel - Copy Worksheet
- Excel - Hiding Worksheet
- Excel - Delete Worksheet
- Excel - Close Workbook
- Excel - Open Workbook
- Excel - Context Help
- Editing Worksheet
- Excel - Insert Data
- Excel - Select Data
- Excel - Delete Data
- Excel - Move Data
- Excel - Rows & Columns
- Excel - Copy & Paste
- Excel - Find & Replace
- Excel - Spell Check
- Excel - Zoom In-Out
- Excel - Special Symbols
- Excel - Insert Comments
- Excel - Add Text Box
- Excel - Undo Changes
- Formatting Cells
- Excel - Setting Cell Type
- Excel - Setting Fonts
- Excel - Text Decoration
- Excel - Rotate Cells
- Excel - Setting Colors
- Excel - Text Alignments
- Excel - Merge & Wrap
- Excel - Borders and Shades
- Excel - Apply Formatting
- Formatting Worksheets
- Excel - Sheet Options
- Excel - Adjust Margins
- Excel - Page Orientation
- Excel - Header and Footer
- Excel - Insert Page Breaks
- Excel - Set Background
- Excel - Freeze Panes
- Excel - Conditional Format
- Working with Formula
- Excel - Creating Formulas
- Excel - Copying Formulas
- Excel - Formula Reference
- Excel - Using Functions
- Excel - Builtin Functions
- Advanced Operations
- Excel - Data Filtering
- Excel - Data Sorting
- Excel - Using Ranges
- Excel - Data Validation
- Excel - Using Styles
- Excel - Using Themes
- Excel - Using Templates
- Excel - Using Macros
- Excel - Adding Graphics
- Excel - Cross Referencing
- Excel - Printing Worksheets
- Excel - Email Workbooks
- Excel- Translate Worksheet
- Excel - Workbook Security
- Excel - Data Tables
- Excel - Pivot Tables
- Excel - Simple Charts
- Excel - Pivot Charts
- Excel - Keyboard Shortcuts
- MS Excel Resources
- Excel - Quick Guide
- Excel - Useful Resources
- Excel - Discussion
Calculate the difference between two dates in days, weeks, months and years in Excel
When working with dates in a worksheet, it may be necessary to determine the number of days, weeks, months, or years between two provided dates.
Calculate the difference between two given dates in Days
You can use the following formulas to calculate the number of days that exist between two specific dates.
Step 1
At first, you must create a sample data as shown in following screenshot.
Step 2
Any one of the following formulas should be entered into a blank cell to generate the correct result.
Formulas
=DATEDIF(B3,C3,"D")
Or,
=C3-B3
Here, B3 is Start Date and C3 End Date.
Step 3
The number of days between the two dates will then be determined as seen in the screenshot below by dragging the fill handle downward into the cells.
Calculate the difference between two given dates in Months
Let's see how to calculate the difference between two given dates in months.
Step 1
Enter the following formula into a blank field to determine how many months there are between two specific dates.
=DATEDIF(B3,C3,"M")
See the following screenshot.
Step 2
Then, drag the fill handle down to the cells to apply this formula, and the difference in months between two dates is determined as shown in the following screenshot.
Calculate the difference between two given dates in Years
Now let's see how to calculate the difference between two given dates in years.
Step 1
The DATEDIF function can also be used to compute the number of years between two dates. Type the following formula into a cell that is empty.
=DATEDIF(B3,C3,"Y")
See the following screenshot.
Step 2
Then, drag the fill handle down to the cells to use this formula. The number of years between the two specific dates has been returned, as seen in the screenshot below.
Calculate the difference between two given dates in Days, Months and Year
Follow the steps given below to calculate the difference between two given dates in days, months, and year.
Step 1
If you need to figure out the difference in days, months, and years between two dates, use the formula given below.
=DATEDIF(B3, C3, "y") &" years, "&DATEDIF(B3, C3, "ym") &" months, " &DATEDIF(B3, C3, "md") &" days"
See the following screenshot.
Step 2
The fill handle to the cells where you wish to apply this formula, and then drag it down.
Calculate the difference between two given dates in Weeks
Follow the steps given below to calculate the difference between two given dates in weeks.
Step 1
Use the following formula to determine the number of full weeks between two dates.
=ROUNDDOWN((DATEDIF(B3, C3, "d") / 7), 0)
Step 2
Next, drag the fill handle to the cells where you wish to apply this formula by dragging it downward.
Conclusion
In this tutorial, we explained in detail how you can calculate the difference between two dates in days, months, years, weeks in Excel.
- Related Articles
- How to calculate the weeks and days between two dates in Excel?
- Converting days into years months and weeks - JavaScript
- How to get days, months and years between two Java LocalDate?
- How to find the number of days and number of weeks between two dates in R?
- How to calculate the percentage between two dates in Excel?
- How to calculate the midpoint between two dates in Excel?
- How to calculate average between two dates in Excel?
- How to calculate the employee tenure in months or years in Excel?
- How Add or Subtract Specific Years, Months and Days to a Date in Excel?
- How to Convert Months to Years and Months in Excel?
- How to calculate the difference between two dates in JavaScript?
- How can I calculate full 24hour days between two specified dates in MySQL?
- Program to convert given number of days in terms of Years, Weeks and Days in C
- Convert:a. 60 hours into days and hoursb. 50 months into years and months
- How do I calculate number of days between two dates using Python?
