{"id":57970,"date":"2016-02-06T05:09:32","date_gmt":"2016-02-06T03:09:32","guid":{"rendered":"http:\/\/wpcalc.com\/?p=57970"},"modified":"2026-09-28T10:40:12","modified_gmt":"2026-09-28T07:40:12","slug":"days-in-month","status":"publish","type":"post","link":"https:\/\/wpcalc.com\/en\/life\/days-in-month\/","title":{"rendered":"Days in Month Calculator"},"content":{"rendered":"<section class=\"not-prose calculator-box\" aria-labelledby=\"calculator-title\"><div class=\"flex items-baseline sm:items-center justify-between gap-2 sm:gap-3\"><div class=\"flex flex-col sm:flex-row sm:items-center gap-2\"><span class=\"icon icon-calculator text-primary-700! text-base! dark:text-primary-300!\" aria-hidden=\"true\"><\/span><h2 id=\"calculator-title\" class=\"text-lg font-display font-bold\">Days and Months Calculator<\/h2><\/div><div class=\"calcdash-favorite group\">\n  <button type=\"button\" class=\"favorite\" id=\"favorite\" data-favorite-id=\"57970\" data-favorite-title=\"Days in Month \" data-favorite-url=\"https:\/\/wpcalc.com\/en\/life\/days-in-month\/\" data-favorite-excerpt=\"Enter a year to see the number of days in each month, the total days in the year, and whether it is a leap year.\" aria-label=\"Add to Favorites\" data-favorite-icon=\"icon icon-date\">\n    <span class=\"icon icon-shape-star-empty\" aria-hidden=\"true\"><\/span>\n  <\/button>\n  <div class=\"calcdash-favorite__tip\" aria-hidden=\"true\">\n   <span class=\"favorite-tooltip\" id=\"favorite-tooltip\"><\/span>\n  <\/div>\n  <span class=\"sr-only\" role=\"status\" id=\"favorite-status\"><\/span>\n<\/div><\/div><form action=\"https:\/\/wpcalc.com\/en\/life\/days-in-month\/\" method=\"POST\" class=\"calculator\" id=\"calculator-57970\" data-post=\"57970\"><fieldset class=\"fieldset-input\"><legend class=\"sr-only\">Input Fields<\/legend><div class=\"field is-single\" id=\"input-1\"><label for=\"field-1\">Enter the year<\/label><input type=\"number\" name=\"enter_the_year\" id=\"field-1\" step=\"any\" value=\"2026\"\/><\/div><\/fieldset><div class=\"buttons\"><button type=\"submit\" data-text=\"Re-Calculate\" id=\"calculate-button\" data-post=\"57970\">Calculate<\/button><button type=\"reset\">Reset<\/button><\/div><div class=\"field is-checkbox hidden!\" id=\"field-auto-calc\"><input type=\"checkbox\" id=\"auto-calc\"><label for=\"auto-calc\">Calculate automatically<\/label><small>If enabled, the result will update automatically when you change any value.<\/small><\/div><div class=\"fieldset-result is-hidden\" aria-labelledby=\"result-title\" aria-live=\"polite\" role=\"region\"> <h3 class=\"result-title bg-gradient-to-r from-primary-50 to-gray-50 dark:from-primary-900 dark:to-gray-800\" id=\"result-title\"><span class=\"icon icon-s-pulse\" aria-hidden=\"true\"><\/span> Your Results<\/h3><div class=\"result-box\"><div class=\"field-result\" id=\"output-1\"><span class=\"field-title\"><span>January<\/span><\/span><span class=\"field-value\" id=\"result-1\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-2\"><span class=\"field-title\"><span>February<\/span><\/span><span class=\"field-value\" id=\"result-2\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-3\"><span class=\"field-title\"><span>March<\/span><\/span><span class=\"field-value\" id=\"result-3\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-4\"><span class=\"field-title\"><span>April<\/span><\/span><span class=\"field-value\" id=\"result-4\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-5\"><span class=\"field-title\"><span>May<\/span><\/span><span class=\"field-value\" id=\"result-5\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-6\"><span class=\"field-title\"><span>June<\/span><\/span><span class=\"field-value\" id=\"result-6\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-7\"><span class=\"field-title\"><span>July<\/span><\/span><span class=\"field-value\" id=\"result-7\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-8\"><span class=\"field-title\"><span>August<\/span><\/span><span class=\"field-value\" id=\"result-8\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-9\"><span class=\"field-title\"><span>September<\/span><\/span><span class=\"field-value\" id=\"result-9\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-10\"><span class=\"field-title\"><span>October<\/span><\/span><span class=\"field-value\" id=\"result-10\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-11\"><span class=\"field-title\"><span>November<\/span><\/span><span class=\"field-value\" id=\"result-11\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-12\"><span class=\"field-title\"><span>December<\/span><\/span><span class=\"field-value\" id=\"result-12\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-13\"><span class=\"field-title\"><span>Total days in the year<\/span><\/span><span class=\"field-value\" id=\"result-13\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-14\"><span class=\"field-title\"><span>Is a Leap Year?<\/span><\/span><span class=\"field-value\" id=\"result-14\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><\/div><div class=\"result-actions\"><button type=\"button\" class=\"copy-link\"><svg viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z\"\/><path d=\"M11.603 7.963a.75.75 0 0 0-.977 1.138 2.5 2.5 0 0 1 .142 3.667l-3 3a2.5 2.5 0 0 1-3.536-3.536l1.225-1.224a.75.75 0 0 0-1.061-1.06l-1.224 1.224a4 4 0 1 0 5.656 5.656l3-3a4 4 0 0 0-.225-5.865Z\"\/><\/svg><span class=\"copy-link__text\">Copy link to this calculation<\/span><\/button><span class=\"sr-only\" role=\"status\" id=\"copy-link-status\"><\/span><\/div><\/div><a href=\"#respond\" class=\"hidden transition-opacity duration-300 opacity-0 w-50 text-sm justify-center items-center gap-2 px-4 py-2 rounded bg-gray-200 text-gray-700 hover:bg-gray-300\" id=\"leave-comment\"><span class=\"icon icon-comments\" aria-hidden=\"true\"><\/span>Leave a Comment<\/a><\/form><\/section><section id=\"calc-reactions\" class=\"not-prose hidden my-12 bg-gradient-to-r from-primary-50 to-gray-50 border border-indigo-100 rounded-xl px-6 py-4 shadow-sm\" data-post=\"57970\" aria-live=\"polite\" aria-labelledby=\"calc-reactions-title\"><p id=\"calc-reactions-title\" class=\"text-sm text-gray-500 text-center mb-2\">How did this result make you feel?<\/p><div role=\"group\" aria-labelledby=\"calc-reactions-title\" class=\"grid grid-cols-3 sm:flex sm:flex-row sm:justify-around gap-4 sm:items-center sm:flex-wrap\"><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"like\"><span class=\"reaction-count\" data-reaction-count=\"like\">1<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude00 <\/span><span class=\"reaction-description font-medium\">Like <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"helpful\"><span class=\"reaction-count\" data-reaction-count=\"helpful\">1<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\udca1 <\/span><span class=\"reaction-description font-medium\">Helpful <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"confused\"><span class=\"reaction-count\" data-reaction-count=\"confused\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude15 <\/span><span class=\"reaction-description font-medium\">Confused <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"disappointed\"><span class=\"reaction-count\" data-reaction-count=\"disappointed\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude1e <\/span><span class=\"reaction-description font-medium\">Disappointed <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"inaccurate\"><span class=\"reaction-count\" data-reaction-count=\"inaccurate\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\u274c <\/span><span class=\"reaction-description font-medium\">Inaccurate <\/span><\/button><\/div><div id=\"reaction-message\" class=\"hidden mt-8 rounded-md border border-primary-100 bg-white\/50 backdrop-blur-sm px-4 py-2 text-sm text-center shadow-sm\"><\/div><\/section><div class=\"calcdash-ad not-prose calcdash-ad--calc_result calcdash-ad--in-article\"><ins class=\"adsbygoogle\" style=\"display:block\" data-ad-client=\"ca-pub-1721569815777345\" data-ad-slot=\"6317458308\" data-ad-layout=\"in-article\" data-ad-format=\"fluid\"><\/ins><script>(adsbygoogle = window.adsbygoogle || []).push({});<\/script><\/div>\n<style id=\"wpcoderpro-inline-1\">.formula-box {\r\n\tborder-bottom: none !important;\r\n}<\/style><section class=\"formula-box\" aria-labelledby=\"formula-title\">\r\n\t<div id=\"formula-title\" class=\"not-prose font-display mb-4\"><span class=\"icon icon-formula\" aria-hidden=\"true\"><\/span><h2>Days in Month Formula<\/h2><\/div>\r\n\t<figure class=\"not-prose formula\">\r\n\t\t<figcaption class=\"formula-title\">Formula<\/figcaption>\r\n\t\t<div class=\"text-base text-gray-800\" id=\"formula\">\n\\[ L(y)=\\begin{cases}1,&amp;4\\mid y\\text{ and }100\\nmid y,\\text{ or }400\\mid y\\\\0,&amp;\\text{otherwise}\\end{cases} \\]\n\\[ D(m,y)=\\begin{cases}31,&amp;m\\in\\{1,3,5,7,8,10,12\\}\\\\30,&amp;m\\in\\{4,6,9,11\\}\\\\28+L(y),&amp;m=2\\end{cases}\\qquad T(y)=\\sum_{m=1}^{12}D(m,y) \\]\n<\/div>\r\n\t<\/figure>\r\n\t<\/p>\n<p><strong>Where:<\/strong><\/p>\n<ul>\n<li>\\(y\\) \u2014 the entered year.<\/li>\n<li>\\(m\\) \u2014 the month number, from 1 for January to 12 for December.<\/li>\n<li>\\(L(y)\\) \u2014 1 if the year is a leap year; otherwise, 0.<\/li>\n<li>\\(D(m,y)\\) \u2014 the number of days in a month; \\(T(y)\\) \u2014 the total days in the year.<\/li>\n<\/ul>\n<p>The calculator uses Gregorian leap-year rules to determine February\u2019s length. Adding the days in all 12 months gives 365 days in a common year or 366 in a leap year.<\/p>\n<p>\r\n<\/section>\n<style id=\"wpcoderpro-inline-459\">.calculation-box {\r\n\tborder-bottom: none !important;\r\n}<\/style><section id=\"calculation\" class=\"calculation-box\" aria-labelledby=\"calculation-title\">\r\n\t<div id=\"calculation-title\" class=\"not-prose font-display\"><span class=\"icon icon-unordered-list\" aria-hidden=\"true\"><\/span><h2>Days in Month \u2013 Calculation Example<\/h2><\/div>\r\n\r\n<\/p>\n<p><strong>Example:<\/strong> enter 2026 to find February\u2019s length and the total days in that year.<\/p>\n<p>\\[2026\\bmod 4=2\\quad\\Rightarrow\\quad L(2026)=0\\]<\/p>\n<p>\\[D(2,2026)=28,\\qquad T(2026)=7(31)+4(30)+28=365\\]<\/p>\n<p><strong>Result:<\/strong> February 2026 has 28 days, the full year has 365 days, and \u201cIs a Leap Year?\u201d shows \u201cNo.\u201d<\/p>\n<p>\n\r\n<\/section>\n<h2>How to use the calculator<\/h2>\n<ol>\n<li>Find the <strong>Enter the year<\/strong> field. It is initially filled with the current year; replace it if you want to check another year.<\/li>\n<li>Enter a whole-number year, such as 2026 or 2028. There is no month selector: one entry produces results for the entire year.<\/li>\n<li>Read the result beside the month you need, from <strong>January<\/strong> through <strong>December<\/strong>. For example, use the <strong>February<\/strong> result to check whether it has 28 or 29 days.<\/li>\n<li>Check <strong>Total days in the year<\/strong> for the annual total and <strong>Is a Leap Year?<\/strong> for a Yes or No answer.<\/li>\n<\/ol>\n<h2>How many days are in a month?<\/h2>\n<p>In the Gregorian calendar, seven months have 31 days: January, March, May, July, August, October, and December. Four months have 30 days: April, June, September, and November. February is the only month whose length changes with the year. It has 28 days in a common year and 29 days in a leap year.<\/p>\n<p>A leap year adds one day to February, bringing the annual total from 365 to 366. The extra day is February 29. This matters when checking whether a date exists, counting the available days in a month, or planning work that crosses the end of February. The calculator lists every month separately so you can find the month you need without calculating the annual total yourself.<\/p>\n<p>The leap-year rule has an important exception: a year divisible by 4 is usually a leap year, but a year divisible by 100 is not unless it is also divisible by 400. For example, 1900 was not a leap year, while 2000 was. The calculator applies this rule to both the February result and its Yes or No leap-year result.<\/p>\n<p>The annual total is a count of calendar days in the entered year, not the number of days between two particular dates. To measure an interval with specific start and end dates, use the <a href=\"https:\/\/wpcalc.com\/en\/life\/days-between-dates\/\">Days Between Dates calculator<\/a>. If you need to move a date forward or backward by a number of days, use the <a href=\"https:\/\/wpcalc.com\/en\/life\/adding-days-to-dates\/\">Date Addition calculator<\/a>.<\/p>\n<h2>Assumptions and practical tips<\/h2>\n<p>The results follow the Gregorian calendar\u2019s month lengths and leap-year rules. For older historical dates, the calendar actually used in a particular place may have been different. A Gregorian result for an early year therefore should not automatically be treated as a description of a local historical calendar.<\/p>\n<p>Enter a complete, whole-number year rather than a month, a date, or a decimal value. For reliable results, use a year from 100 through 9999. The calculator\u2019s underlying date function treats years 0 through 99 as years in the 1900s when finding month lengths, which can make the displayed month lengths disagree with the leap-year answer for those entries.<\/p>\n<p>When planning around month-end, remember that a month\u2019s length does not identify the weekday of its last day. The <a href=\"https:\/\/wpcalc.com\/en\/life\/monthly-calendar\/\">Monthly Calendar Generator<\/a> can show how the dates fall across a month. For a particular date\u2019s weekday, use the <a href=\"https:\/\/wpcalc.com\/en\/life\/the-day-of-a-year-date-validity\/\">Day of the Week calculator<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Enter a year to see the number of days in each month, the total days in the year, and whether it is a leap year.<\/p>\n","protected":false},"author":70,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[6],"tags":[20],"class_list":["post-57970","post","type-post","status-publish","format-standard","hentry","category-life","tag-date"],"acf":[],"_links":{"self":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/57970","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/users\/70"}],"replies":[{"embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/comments?post=57970"}],"version-history":[{"count":2,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/57970\/revisions"}],"predecessor-version":[{"id":65357,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/57970\/revisions\/65357"}],"wp:attachment":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/media?parent=57970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/categories?post=57970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/tags?post=57970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}