Excel Subtract Datetime: How to Calculate Time Differences | WPS Office Blog (2023)

Over time, Excel datetime functionality has become more essential due to time-based events, date calculations, and data analysis. Excel is a powerful tool that performs various functions such as project management, scheduling, financial modeling, data-driven tasks, etc.

Excel subtract datetime function is a versatile tool for many applications, including enhancement of data analysis and time management capabilities. Users can calculate the duration between two events, track progress over time, and automate calculations. Using the Subtract Datetime function, we can save time, reduce errors, and make informed decisions based on accurate and reliable information.

In this article, we will introduce Excel subtract datetime and how we can use it. Moreover, we will recommend a perfect software to subtract datetime.

Part 1. What is Subtract Datetime in Excel?

In Excel, subtracting datetime is a fundamental operation that allows you to calculate the time difference between two specific points. As one of the many functions available, it plays a crucial role in various scenarios. People can use this function to calculate durations, track time intervals, manage project schedules, analyze trends, and generate insightful reports. By employing the Excel subtract datetime function, Excel users can efficiently handle temporal data and make informed decisions based on time-related insights.

free download

Part 2. How to Subtract Datetime in Excel?

We will describe in detail Excel subtract datetime based on different conditions/scenarios.

Below is a step-by-step tutorial on how to subtract time in Excel based on different conditions:

Scenario 1: Subtracting Two Date Values

Step 1: Open WPS Excel and Go to the Home Tab.

Step 2: Select Cell ‘A2+B2’ and choose the ‘more number formats’ from the dropdown menu as mentioned in the above screenshot and highlighted with step 3.

Step 3: Choose the highlighted format of the date and click the ok button.

(Video) Calculate time difference in excel between 2 times

Step 4: Enter the two date values you want to subtract in separate cells. For example, let's say you have the start date in cell A2 and the end date in cell B2.

Step 5: In an empty cell where you want the result to appear, enter the following formula to count days: =B2 - A2

Step 6: We are getting the total number of days in the C2 cell as the format of Cell is General, representing the number.

Step 7: Similarly, if we change the format from General to Date of C2, we will get the following result.

Scenario 2: Subtracting Dates to Calculate Year Duration.

Step 1: If you want to calculate the duration (in years) between two dates, you can simply subtract one date from the other, as mentioned in the screenshot;

Step 2: Copy formula =YEAR(B2)-YEAR(A2) and paste in D2 to calculate the total years. (‘YEAR’ is an additional word with a negative operator)

Step 3: Excel will provide the years between the two dates (33 Years).

Scenario 3: Subtracting Two Date Values to Calculate Months

Step 1: If you want to subtract two date values, you can use the DATEDIF function to get the month's difference.

Formula: =DATEDIF($A2,$B2, "M")

Step 2: Simply paste the formula into the E2 cell to get the total months.

WPS Excel will show the month difference between the two dates.

(Video) How to Add or Subtract Time in Excel - Calculate Hours and Minutes for Accurate Timekeeping

Scenario 4: Handling Negative Date Values

Step 1: When subtracting values, the end date is earlier than the start date), Excel will display negative values.

Step 2: To handle negative time values, you can write the old date first and then the end date; otherwise, you will get the same result but with negative values.

With the above mentioned methods, you can effectively subtract datetime values in Excel based on different conditions and achieve accurate results for various time-related calculations.

Part 3: Best Alternative Choice - WPS Office

WPS Office is free and the best alternative to Microsoft Office, making it an excellent choice for users on a budget and reliable for performing datetime calculations. Therefore a suitable choice for individuals and businesses.

Moreover, it provides a wide range of datetime functions, such as DATEDIF(), DATE(), and arithmetic operators, enabling us to perform various datetime calculations efficiently.


Excel Subtract Datetime: How to Calculate Time Differences | WPS Office Blog (1)

WPS Office- Free All-in-One Office Suite

  • Use Word, Excel, and PPT for FREE, No Ads.

    (Video) How to Calculate the Number of Months Between 2 Dates in Excel

  • Edit PDF files with the powerful PDF toolkit.

  • Microsoft-like interface. Easy to learn. 100% Compatibility.

  • Boost your productivity with WPS's abundant free Word, Excel, PPT, and CV templates.

5,820,008 User

Excel Subtract Datetime: How to Calculate Time Differences | WPS Office Blog (2)

Algirdas Jasaitis


Feature of WPS Office

WPS Office offers a unique set of features that make it stand out from other Office suites:

1. Interface: WPS Office provides a tabbed interface to open multiple documents in a single window.

(Video) Calculate time in Excel

2. Cloud integration: It integrates with many popular cloud storage services such as Google Drive, Dropbox, OneDrive, etc. Therefore, it allows users to access and save their documents anywhere on any device.

3. PDF conversion: Due to the advanced features of WPS Office, it includes a PDF editor software that allows users to convert any PDF file to its editable format, like Word or Excel, and vice versa.

4. User Interface: WPS Suit offers a customized user interface according to user preferences which include themes, fonts, toolbars, etc. UI makes creating a friendly working environment according to users' needs easy.

Overall, WPS Office offers cost-effective and user-friendly features to help users create, edit, and share their documents quickly and efficiently.


1. How do I subtract datetime values and display the result in a specific time unit?

Suppose you want Excel subtract datetime values and display the result in a specific time unit. In that case, you must simply subtract the two datetime cells using the subtraction operator and multiply the result by the appropriate conversion factor. To get the result in hours, multiply by 24 (since one day = 24 Hrs). Format the cell containing the formula as required (e.g., as a number or time format), and it will show the time difference in the desired time unit.

2. Can I subtract datetime values and get the result in decimal format?

Yes, you can subtract datetime values in Excel and get the result in decimals. Whenever you subtract two datetime values, Excel represents the result as a decimal number, where the integer part represents the number of days and the decimal part represents the fraction of a day (time). This format allows you to work efficiently with time intervals and durations numerically for various calculations and analyses.

3. How can I subtract datetime values and exclude the time component?

To subtract datetime values and exclude the time component in Excel, you can use the DATE function to extract only the date part from each datetime value before performing the subtraction. For example, if you have the start datetime in cell A1 and the end datetime in cell B1, you can use the following formula in a separate cell:


This formula will give you the time difference between the two datetime values in days, excluding the time component. The DATE function helps you focus solely on the date values and ignore the time portion, providing a clear and accurate result for your calculation.

Excel Subtract Datetime - Wrap-Up

Overall, the guide in this article is a helpful resource for anyone who needs to calculate time differences in Excel, whether for personal or professional reasons. Now, users can perform Excel Subtract datetime function without hesitation by following this tutorial.

Last, WPS Office provides a reliable and affordable alternative to Microsoft Excel to help you achieve your goals. It offers a user-friendly interface and a comprehensive set of functions. As WPS Office is a powerful tool, it has advanced features for users, such as manipulation of data, creation of charts/graphs, and complex calculations in Excel Spreadsheets. You can download WPS Office for free from its official website.

(Video) Convert UTC date/time to normal date/time in Excel

free download


Excel Subtract Datetime: How to Calculate Time Differences | WPS Office Blog? ›

To subtract a date from today in Excel, you can use the TODAY() function and subtraction. First, you input the earlier date in a cell (let's say A1 for example) and write the formula “=TODAY() – A1” in the next cell, then press Enter.

How do you subtract date and time in Excel? ›

To subtract a date from today in Excel, you can use the TODAY() function and subtraction. First, you input the earlier date in a cell (let's say A1 for example) and write the formula “=TODAY() – A1” in the next cell, then press Enter.

How do I subtract 2 months from a date in Excel? ›

You can use the EDATE function to quickly add or subtract months from a date. The EDATE function requires two arguments: the start date and the number of months that you want to add or subtract. To subtract months, enter a negative number as the second argument. For example, =EDATE("9/15/19",-5) returns 4/15/19.


1. Excel - Calculate Differences in a Pivot Table
(Mike Thomas)
2. How to Remove Time from Date Timestamp In Excel || Excel Tips & Tricks || dptutorials
3. Timediff in excel: How to calculate the Time difference in Excel ( not date difference )
(Krishna S)
4. Excel date differences- work out the number of days between Excel dates and why it looks1 day short
(AuditExcel Advanced Excel and Financial Model Training and Consulting)
5. Date Math in Microsoft Access. Date/Time Calculations: Days, Weeks, Hours, Minutes, Seconds.
(Computer Learning Zone)
6. Microsoft Access Number of Days Between Two Dates - DATEDIFF Function - Date Difference - TechHelp
(Computer Learning Zone)
Top Articles
Latest Posts
Article information

Author: Amb. Frankie Simonis

Last Updated: 28/09/2023

Views: 5911

Rating: 4.6 / 5 (56 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Amb. Frankie Simonis

Birthday: 1998-02-19

Address: 64841 Delmar Isle, North Wiley, OR 74073

Phone: +17844167847676

Job: Forward IT Agent

Hobby: LARPing, Kitesurfing, Sewing, Digital arts, Sand art, Gardening, Dance

Introduction: My name is Amb. Frankie Simonis, I am a hilarious, enchanting, energetic, cooperative, innocent, cute, joyous person who loves writing and wants to share my knowledge and understanding with you.