Easily Calculate the Number of Days Between Two Dates in Microsoft Excel

Download Article

3 methods for finding the number of days between dates in Excel

Download Article

Trying to find how many days there are between two dates in Excel? There are a few easy methods for doing so! You can use the DATEDIF or DAYS functions. Or, just subtract the two dates! This How.com.vn guide will show you how to calculate the number of days between two dates in Microsoft Excel.

Things You Should Know

  • Use =DATEDIF(start_date, end_date, "d") to find the difference in days between two dates.
  • Or, Use DAYS(end_date, start_date) to calculate the days between two dates.
  • Alternatively, subtract the two dates using the subtraction operator (-).
Method 1
Method 1 of 3:

Using the DATEDIF Function

Download Article
  1. How.com.vn English: Step 1 Type the start date in a cell.
    For example, you could put 1/10/2023 in cell A1. The DATEDIF function calculates the difference between two dates in days, months, or years.[1]
    • If you’re searching for a specific date in a large dataset, try using the VLOOKUP function.
  2. How.com.vn English: Step 2 Type the end date in a second cell.
    For example, 1/17/2023 in cell A2.
    Advertisement
  3. Step 3 Type =DATEDIF(A1, A2, "d") in a third cell and press ↵ Enter.
    For example, this formula could be in A3. Replace A1 and A2 with the cells containing the start and end dates. This will find the number of days between cells A1 and A2. You’ll see the result in the cell you selected for the function.
    • The first parameter (A1) is the start date, and the second parameter (A2) is the end date.
    • Replace "d" with "m" to find the difference in months or "y" to find the difference in years.
    • Copy this formula as needed and paste it next to other dates you’re trying to find the difference between.
  4. Advertisement
Method 2
Method 2 of 3:

Using the DAYS Function

Download Article
  1. How.com.vn English: Step 1 Type the start date in a cell.
    For example, you could put 1/10/2023 in cell A1. The DAYS function calculates the number of days between dates.[2]
    • This function is useful for plenty of applications! For example, if you’re tracking your bills in Excel, you can calculate the days between two dates to average your per-day spending.
  2. How.com.vn English: Step 2 Type the end date in a second cell.
    For example, 1/17/2023 in cell A2.
  3. How.com.vn English: Step 3 Type =DAYS(A2, A1) in a third cell and press ↵ Enter.
    For example, this formula could be in A3. Replace A2 and A1 with the cells containing the start and end dates. This will find the number of days between cells A1 and A2. You’ll see the result in the cell you selected for the function.
    • The first parameter (A2) is the end date, and the second parameter (A1) is the end date. This is opposite the order of the DATEDIF function.
  4. Advertisement
Method 3
Method 3 of 3:

Using Subtraction

Download Article
  1. How.com.vn English: Step 1 Type the start date in a cell.
    For example, you could put 1/10/2023 in cell A1. You can use the subtraction operation (-) to find the days between two dates.
  2. How.com.vn English: Step 2 Type the end date in a second cell.
    For example, 1/17/2023 in cell A2.
  3. How.com.vn English: Step 3 Type =A2-A1 in a third cell and press ↵ Enter.
    For example, this formula could be in A3. Replace A2 and A1 with the cells containing the start and end dates. This will find the number of days between cells A1 and A2. You’ll see the result in the cell you selected for the function.
    • Using the SUM function is less useful for dates. Since dates are stored as serial numbers in Excel, SUM would just add those numbers together.
  4. Advertisement

Expert Q&A

Search
Add New Question
  • Question
    What is the formula to do a count down in days in a cell in Excel? Can I have the font turn red on day 0?
    How.com.vn English: Kyle Smith
    Kyle Smith
    How.com.vn Technology Writer
    Kyle Smith is a How.com.vn Technology Writer, learning and sharing information about the latest technology. He has presented his research at multiple engineering conferences and is the writer and editor of hundreds of online electronics repair guides. Kyle received a BS in Industrial Engineering from Cal Poly, San Luis Obispo.
    How.com.vn English: Kyle Smith
    How.com.vn Technology Writer
    Expert Answer
    You can use =DAYS(A1,TODAY()) to make a countdown in days. Replace "A1" with the cell that contains the date you're counting down to.To make the font turn red on day 0, select the cell with the DAYS formula. Go to the Home tab > Conditional Formatting > New Rule. Click "Format only cells that contain." Change "between" to "equal to" in the drop down menu. Enter 0 to the right of "equal to." Click "Format" and change the Font color to red. Click OK on both windows to confirm the change.
  • Question
    how to calculate no.of.days between two dates without mentioning the date in any cells/columns
    How.com.vn English: Kyle Smith
    Kyle Smith
    How.com.vn Technology Writer
    Kyle Smith is a How.com.vn Technology Writer, learning and sharing information about the latest technology. He has presented his research at multiple engineering conferences and is the writer and editor of hundreds of online electronics repair guides. Kyle received a BS in Industrial Engineering from Cal Poly, San Luis Obispo.
    How.com.vn English: Kyle Smith
    How.com.vn Technology Writer
    Expert Answer
    You can input the start and end dates as text in the DAYS function to calculate the number of days without needing to reference another cell. For example, =DAYS("4/15/2023","4/1/2023") would return the number of days between 4/15/2023 and 4/1/2023.
  • Question
    How many days between 22 June 2019 and 10 Jan 2020?
    How.com.vn English: Kyle Smith
    Kyle Smith
    How.com.vn Technology Writer
    Kyle Smith is a How.com.vn Technology Writer, learning and sharing information about the latest technology. He has presented his research at multiple engineering conferences and is the writer and editor of hundreds of online electronics repair guides. Kyle received a BS in Industrial Engineering from Cal Poly, San Luis Obispo.
    How.com.vn English: Kyle Smith
    How.com.vn Technology Writer
    Expert Answer
    Using the formula =DAYS("1/10/2020","6/22/2019"), there are 202 days between 22 June 2019 and 10 Jan 2020.
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
      Advertisement

      Tips

      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Thanks for submitting a tip for review!

      About This Article

      How.com.vn English: Kyle Smith
      Written by:
      How.com.vn Technology Writer
      This article was co-authored by How.com.vn staff writer, Kyle Smith. Kyle Smith is a How.com.vn Technology Writer, learning and sharing information about the latest technology. He has presented his research at multiple engineering conferences and is the writer and editor of hundreds of online electronics repair guides. Kyle received a BS in Industrial Engineering from Cal Poly, San Luis Obispo. This article has been viewed 154,813 times.
      How helpful is this?
      Co-authors: 5
      Updated: March 6, 2023
      Views: 154,813
      Categories: Microsoft Excel
      Thanks to all authors for creating a page that has been read 154,813 times.

      Is this article up to date?

      ⚠️ Disclaimer:

      Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
      Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

      Notices:
      • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
      • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
      • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
      • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

      Advertisement