Excel: Calculate monthly difference with datedif
The "Excel" spreadsheet program offers you the "datedif" function to calculate the difference between two dates. You can have the result output in any time unit.
Calculate monthly difference with datedif in Excel
To calculate the monthly difference, first open the desired workbook or create a new Excel file.
- Now click in the cell in which you want to carry out the calculation and in which the result should appear afterwards.
- In this cell you have to write the following formula: "= datedif (start date; end date;" time unit ")".
- You can either enter a cell for the start and end date (e.g. A1) or enter the date directly. When you write the date in the formula, you must put quotation marks around it.
- Alternatively, you can use the "TODAY ()" function for the end date, which automatically inserts the current date. This practical tip shows you how to use the "TODAY ()" function most effectively.
- To output the difference between the dates in months, enter "m" for the time unit. Make sure that the time unit must also be in quotation marks.
- Now press "Enter" to carry out the calculation.
- TIP: If you use "d" or "j" for the time unit, you can also output the result in days or years.