{"id":4628,"date":"2019-09-16T11:06:53","date_gmt":"2019-09-16T11:06:53","guid":{"rendered":"http:\/\/officetuts.net\/excel\/?p=4628"},"modified":"2024-02-19T15:30:13","modified_gmt":"2024-02-19T15:30:13","slug":"calculate-days-between-two-dates","status":"publish","type":"post","link":"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/","title":{"rendered":"Calculate Days Between two Dates in Excel"},"content":{"rendered":"\n
Calculate-Days-Between-two-Dates<\/a>Download File<\/a><\/div>\n\n\n\n

Calculating the number of days between two days is easy and pretty straightforward. You have to subtract an older date from the newer one.<\/p>\n\n\n\n

Here\u2019s how it works.<\/p>\n\n\n\n

You have two dates:<\/p>\n\n\n\n

2015-12-14<\/code><\/pre>\n\n\n\n
2018-06-09<\/code><\/pre>\n\n\n\n

The first date is older than the second date, therefore you subtract the first date from the second one.<\/p>\n\n\n\n

Number of days = 2018-06-09 - 2015-12-14\n<\/code><\/pre>\n\n\n\n
\"\"<\/figure>\n\n\n\n

The number of days between these two dates is 908<\/strong>.<\/p>\n\n\n\n

You can use this simple arithmetical operation\nbecause dates in Excel are stored\nas numbers<\/a> and not dates.<\/p>\n\n\n\n

If you select both dates, right-click and choose Format Cells \u2026<\/strong> from the contextual menu.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Inside the Format Cells<\/strong> window, choose the following options.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

You can set decimal places<\/a> to 0 because days are represented as integers. Also, add the thousands separator<\/a> for readability.<\/p>\n\n\n\n

After you press OK<\/strong>, inside the formatted cell dates<\/a> are now displayed as numbers.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

If you subtract the lower number from the bigger one, you are going to get 908 days<\/strong>.<\/p>\n\n\n\n

You can modify the formula to:<\/p>\n\n\n\n

=ABS(A1-B1)<\/code><\/pre>\n\n\n\n

Let\u2019s use the ABS function<\/a> to return the absolute value.<\/p>\n\n\n\n

Now, even if you subtract a higher number from the lower one you will always get a positive number.<\/p>\n\n\n\n

Count the number of days using a function<\/h2>\n\n\n\n

You can subtract one date from the other by using\nsimple arithmetical operations, but there is another, probably more elegant\nway.<\/p>\n\n\n\n

You can calculate the number of days with the DAYS<\/strong> function.<\/p>\n\n\n\n

This formula shows how you can do it.<\/p>\n\n\n\n

=DAYS(A1,B1)<\/code><\/pre>\n\n\n\n

With this formula, you can also get negative values. Let\u2019s fix this problem.<\/p>\n\n\n\n

=ABS(DAYS(B1,A1))<\/code><\/pre>\n\n\n\n
\"\"<\/figure>\n\n\n\n

The other function, that is similar to DAYS<\/strong> is DAYS360<\/strong>.<\/p>\n\n\n\n

This function treats a year as 12 30-day months =\n360 days.<\/p>\n\n\n\n

Let\u2019s try this formula.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

As you can see the number is somewhat smaller.<\/p>\n\n\n\n

Count only the working days<\/h2>\n\n\n\n

The NETWORKDAYS function counts only the working days<\/a>, and it has the following syntax.<\/p>\n\n\n\n

=NETWORKDAYS (start_date, end_date, [holidays])<\/code><\/pre>\n\n\n\n

Let\u2019s try it using our example.<\/p>\n\n\n\n

=NETWORKDAYS(B1,A1)<\/code><\/pre>\n\n\n\n

This formula will return 650, as the number of\nworking days. You can add your own list of free days as the third optional\nparameter. If a day on the list is a working day the number will be smaller if\nthe day is a holiday it will be ignored.<\/p>\n","protected":false},"excerpt":{"rendered":"

Calculating the number of days between two days is easy and pretty straightforward. You have to subtract an older date from the newer…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[170],"yoast_head":"\nCalculate Days Between two Dates in Excel<\/title>\n<meta name=\"description\" content=\"Learn how to calculate the number of days between two dates in Excel, including formatting cells and using simple arithmetic operations. Download the file now.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Calculate Days Between two Dates in Excel\" \/>\n<meta property=\"og:description\" content=\"Learn how to calculate the number of days between two dates in Excel, including formatting cells and using simple arithmetic operations. Download the file now.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-09-16T11:06:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-19T15:30:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2019\/09\/calculate-days-simple-method.png\" \/>\n<meta name=\"author\" content=\"Tomasz Decker\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tomasz Decker\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/\"},\"author\":{\"name\":\"Tomasz Decker\",\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42\"},\"headline\":\"Calculate Days Between two Dates in Excel\",\"datePublished\":\"2019-09-16T11:06:53+00:00\",\"dateModified\":\"2024-02-19T15:30:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/\"},\"wordCount\":367,\"publisher\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42\"},\"image\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2019\/09\/calculate-days-simple-method.png\",\"keywords\":[\"file\"],\"articleSection\":[\"formulas\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/\",\"url\":\"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/\",\"name\":\"Calculate Days Between two Dates in Excel\",\"isPartOf\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2019\/09\/calculate-days-simple-method.png\",\"datePublished\":\"2019-09-16T11:06:53+00:00\",\"dateModified\":\"2024-02-19T15:30:13+00:00\",\"description\":\"Learn how to calculate the number of days between two dates in Excel, including formatting cells and using simple arithmetic operations. Download the file now.\",\"breadcrumb\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/#primaryimage\",\"url\":\"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2019\/09\/calculate-days-simple-method.png\",\"contentUrl\":\"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2019\/09\/calculate-days-simple-method.png\",\"width\":368,\"height\":166},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/officetuts.net\/excel\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Calculate Days Between two Dates in Excel\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/officetuts.net\/excel\/#website\",\"url\":\"https:\/\/officetuts.net\/excel\/\",\"name\":\"\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/officetuts.net\/excel\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42\",\"name\":\"Tomasz Decker\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/18cbe22837193574870ae40ba56bf712?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/18cbe22837193574870ae40ba56bf712?s=96&d=mm&r=g\",\"caption\":\"Tomasz Decker\"},\"logo\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/\"},\"description\":\"Spreadsheet and Python enthusiast.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Calculate Days Between two Dates in Excel","description":"Learn how to calculate the number of days between two dates in Excel, including formatting cells and using simple arithmetic operations. Download the file now.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/","og_locale":"en_US","og_type":"article","og_title":"Calculate Days Between two Dates in Excel","og_description":"Learn how to calculate the number of days between two dates in Excel, including formatting cells and using simple arithmetic operations. Download the file now.","og_url":"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/","article_published_time":"2019-09-16T11:06:53+00:00","article_modified_time":"2024-02-19T15:30:13+00:00","og_image":[{"url":"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2019\/09\/calculate-days-simple-method.png"}],"author":"Tomasz Decker","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Tomasz Decker","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/#article","isPartOf":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/"},"author":{"name":"Tomasz Decker","@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42"},"headline":"Calculate Days Between two Dates in Excel","datePublished":"2019-09-16T11:06:53+00:00","dateModified":"2024-02-19T15:30:13+00:00","mainEntityOfPage":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/"},"wordCount":367,"publisher":{"@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42"},"image":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/#primaryimage"},"thumbnailUrl":"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2019\/09\/calculate-days-simple-method.png","keywords":["file"],"articleSection":["formulas"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/","url":"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/","name":"Calculate Days Between two Dates in Excel","isPartOf":{"@id":"https:\/\/officetuts.net\/excel\/#website"},"primaryImageOfPage":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/#primaryimage"},"image":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/#primaryimage"},"thumbnailUrl":"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2019\/09\/calculate-days-simple-method.png","datePublished":"2019-09-16T11:06:53+00:00","dateModified":"2024-02-19T15:30:13+00:00","description":"Learn how to calculate the number of days between two dates in Excel, including formatting cells and using simple arithmetic operations. Download the file now.","breadcrumb":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/#primaryimage","url":"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2019\/09\/calculate-days-simple-method.png","contentUrl":"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2019\/09\/calculate-days-simple-method.png","width":368,"height":166},{"@type":"BreadcrumbList","@id":"https:\/\/officetuts.net\/excel\/formulas\/calculate-days-between-two-dates\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/officetuts.net\/excel\/"},{"@type":"ListItem","position":2,"name":"Calculate Days Between two Dates in Excel"}]},{"@type":"WebSite","@id":"https:\/\/officetuts.net\/excel\/#website","url":"https:\/\/officetuts.net\/excel\/","name":"","description":"","publisher":{"@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/officetuts.net\/excel\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42","name":"Tomasz Decker","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/18cbe22837193574870ae40ba56bf712?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/18cbe22837193574870ae40ba56bf712?s=96&d=mm&r=g","caption":"Tomasz Decker"},"logo":{"@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/"},"description":"Spreadsheet and Python enthusiast."}]}},"_links":{"self":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts\/4628"}],"collection":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/comments?post=4628"}],"version-history":[{"count":10,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts\/4628\/revisions"}],"predecessor-version":[{"id":13634,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts\/4628\/revisions\/13634"}],"wp:attachment":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/media?parent=4628"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/categories?post=4628"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/tags?post=4628"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}