{"id":520,"date":"2018-06-28T11:42:03","date_gmt":"2018-06-28T11:42:03","guid":{"rendered":"http:\/\/officetuts.net\/excel\/?p=520"},"modified":"2024-03-30T11:00:57","modified_gmt":"2024-03-30T11:00:57","slug":"mathematical-operations-on-date-and-time","status":"publish","type":"post","link":"https:\/\/officetuts.net\/excel\/training\/mathematical-operations-on-date-and-time\/","title":{"rendered":"Mathematical Operations on Date and Time in Excel"},"content":{"rendered":"\n

You can perform such arithmetic operations as addition or subtraction not only on numbers but also on dates. In this lesson, I will show you a few examples of how you can do it.<\/p>\n\n\n\n

Calculating the number of days between two dates<\/h2>\n\n\n\n

Example 1:<\/h3>\n\n\n\n

If you want to perform addition or subtraction on dates, first, you need to save them in separate cells. Let it be cell A1<\/strong> and cell A2.<\/strong><\/p>\n\n\n\n

A1 = January 10, 2014 15:15:00<\/pre>\n\n\n\n
A2 = February 12, 2014<\/pre>\n\n\n\n

When a date includes time other than midnight (24:00:00 is the default time) then the number of days that are returned will be reduced by one. The following examples show ways to ignore time and use only the date part.<\/p>\n\n\n\n

Example 2:<\/h3>\n\n\n\n
= DAYS(A2, A1)<\/pre>\n\n\n\n

returns 33.<\/strong><\/p>\n\n\n\n

In this example, the DAYS<\/strong> function returns the number of days between two dates.<\/p>\n\n\n\n

Example 3:<\/h3>\n\n\n\n
= INT(A2) - INT(A1)<\/pre>\n\n\n\n

returns 33.<\/strong><\/p>\n\n\n\n

The date and time were rounded to the nearest integer<\/a> (in this case, it means getting rid of the time part, so only a day will be remembered. The time will be set to the default value, which is 24:00:00).<\/p>\n\n\n\n

Adding and subtracting days<\/h2>\n\n\n\n

Let’s use the example from the previous exercise.<\/p>\n\n\n\n

Example 4:<\/h3>\n\n\n\n
A1 = January 10, 2014<\/pre>\n\n\n\n

If you want to see what date will be 33 days after the date of January 10, 2014<\/strong>, you can add to that date the number 33.<\/p>\n\n\n\n

Look at the following formula:<\/p>\n\n\n\n

= A1 + 33<\/pre>\n\n\n\n

The result will be February 12, 2014<\/strong>. You can also check what date was 33 days before the date of February 12, 2013<\/strong>.<\/p>\n\n\n\n

A2 = February 12, 2014<\/pre>\n\n\n\n
= A2 - 33<\/pre>\n\n\n\n

The result is January 10, 2014<\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"

You can perform such arithmetic operations as addition or subtraction not only on numbers but also on dates. In this lesson, I will show…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[190],"yoast_head":"\nMathematical Operations on Date and Time in Excel<\/title>\n<meta name=\"description\" content=\"Learn to perform arithmetic operations on dates, including finding the number of days between two dates. Examples provided.\" \/>\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\/training\/mathematical-operations-on-date-and-time\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Mathematical Operations on Date and Time in Excel\" \/>\n<meta property=\"og:description\" content=\"Learn to perform arithmetic operations on dates, including finding the number of days between two dates. Examples provided.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/officetuts.net\/excel\/training\/mathematical-operations-on-date-and-time\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-06-28T11:42:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-30T11:00:57+00:00\" \/>\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=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/officetuts.net\/excel\/training\/mathematical-operations-on-date-and-time\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/officetuts.net\/excel\/training\/mathematical-operations-on-date-and-time\/\"},\"author\":{\"name\":\"Tomasz Decker\",\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42\"},\"headline\":\"Mathematical Operations on Date and Time in Excel\",\"datePublished\":\"2018-06-28T11:42:03+00:00\",\"dateModified\":\"2024-03-30T11:00:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/officetuts.net\/excel\/training\/mathematical-operations-on-date-and-time\/\"},\"wordCount\":250,\"publisher\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42\"},\"keywords\":[\"pinterest\"],\"articleSection\":[\"training\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/officetuts.net\/excel\/training\/mathematical-operations-on-date-and-time\/\",\"url\":\"https:\/\/officetuts.net\/excel\/training\/mathematical-operations-on-date-and-time\/\",\"name\":\"Mathematical Operations on Date and Time in Excel\",\"isPartOf\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#website\"},\"datePublished\":\"2018-06-28T11:42:03+00:00\",\"dateModified\":\"2024-03-30T11:00:57+00:00\",\"description\":\"Learn to perform arithmetic operations on dates, including finding the number of days between two dates. Examples provided.\",\"breadcrumb\":{\"@id\":\"https:\/\/officetuts.net\/excel\/training\/mathematical-operations-on-date-and-time\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/officetuts.net\/excel\/training\/mathematical-operations-on-date-and-time\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/officetuts.net\/excel\/training\/mathematical-operations-on-date-and-time\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/officetuts.net\/excel\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mathematical Operations on Date and Time 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":"Mathematical Operations on Date and Time in Excel","description":"Learn to perform arithmetic operations on dates, including finding the number of days between two dates. Examples provided.","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\/training\/mathematical-operations-on-date-and-time\/","og_locale":"en_US","og_type":"article","og_title":"Mathematical Operations on Date and Time in Excel","og_description":"Learn to perform arithmetic operations on dates, including finding the number of days between two dates. Examples provided.","og_url":"https:\/\/officetuts.net\/excel\/training\/mathematical-operations-on-date-and-time\/","article_published_time":"2018-06-28T11:42:03+00:00","article_modified_time":"2024-03-30T11:00:57+00:00","author":"Tomasz Decker","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Tomasz Decker","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/officetuts.net\/excel\/training\/mathematical-operations-on-date-and-time\/#article","isPartOf":{"@id":"https:\/\/officetuts.net\/excel\/training\/mathematical-operations-on-date-and-time\/"},"author":{"name":"Tomasz Decker","@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42"},"headline":"Mathematical Operations on Date and Time in Excel","datePublished":"2018-06-28T11:42:03+00:00","dateModified":"2024-03-30T11:00:57+00:00","mainEntityOfPage":{"@id":"https:\/\/officetuts.net\/excel\/training\/mathematical-operations-on-date-and-time\/"},"wordCount":250,"publisher":{"@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42"},"keywords":["pinterest"],"articleSection":["training"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/officetuts.net\/excel\/training\/mathematical-operations-on-date-and-time\/","url":"https:\/\/officetuts.net\/excel\/training\/mathematical-operations-on-date-and-time\/","name":"Mathematical Operations on Date and Time in Excel","isPartOf":{"@id":"https:\/\/officetuts.net\/excel\/#website"},"datePublished":"2018-06-28T11:42:03+00:00","dateModified":"2024-03-30T11:00:57+00:00","description":"Learn to perform arithmetic operations on dates, including finding the number of days between two dates. Examples provided.","breadcrumb":{"@id":"https:\/\/officetuts.net\/excel\/training\/mathematical-operations-on-date-and-time\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/officetuts.net\/excel\/training\/mathematical-operations-on-date-and-time\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/officetuts.net\/excel\/training\/mathematical-operations-on-date-and-time\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/officetuts.net\/excel\/"},{"@type":"ListItem","position":2,"name":"Mathematical Operations on Date and Time 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\/520"}],"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=520"}],"version-history":[{"count":5,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts\/520\/revisions"}],"predecessor-version":[{"id":17409,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts\/520\/revisions\/17409"}],"wp:attachment":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/media?parent=520"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/categories?post=520"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/tags?post=520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}