How to Get Month From Date in Excel

Learn multiple Excel methods to get month from date with step-by-step examples and practical applications.

excelformulaspreadsheettutorial
11 min read • Last updated: 7/2/2025

How to Get Month From Date in Excel

Why This Task Matters in Excel

Extracting the month portion of a date is one of the foundational building blocks of time-based analysis in Excel. Whether you manage sales pipelines, track employee attendance, or prepare financial statements, there is almost always a point where you need to summarize or filter data by calendar month. Imagine a retail analyst comparing December sales to July sales, an HR manager reviewing vacation patterns per month, or a project manager allocating monthly budget burn. In each case, the raw data is often timestamped at the day level, but the meaningful insight lives at the month level.

Excel’s grid structure and broad function library make it ideal for date manipulation. Internally, Excel stores dates as serial numbers―integers counting the days that have elapsed since 1 January 1900 (on Windows) or 1 January 1904 (on macOS). Because the month component is embedded in that serial number, Excel can isolate it instantly with formulas or formatting. Learning to “get month from date” unlocks many higher-level skills: dynamic dashboards, rolling 12-month analyses, seasonality modeling, cohort grouping, or time-intelligence calculations in Power Pivot and Power BI.

Failing to master this task has real consequences. Manually retyping months introduces errors and wastes time. Relying on ad-hoc workarounds—like splitting dates with text functions—often breaks when regional settings change or when dates are entered as text instead of true serial numbers. Understanding the formula-based techniques ensures your workbooks remain accurate, refreshable, and scalable. Finally, month extraction is a stepping-stone to more advanced date tasks: computing fiscal quarters, comparing year-over-year growth, and building interactive date slicers. The sooner you internalize the proper methods, the faster you can move on to those sophisticated analyses.

Best Excel Approach

The single most direct way to obtain the calendar month from a valid Excel date is the MONTH function. It returns an integer from 1 (January) through 12 (December) based on the serial number supplied. MONTH is efficient, intuitive, and available in every desktop version still in circulation, from Excel 2007 through Microsoft 365.

=MONTH(date_serial)
  • date_serial – A reference to a cell containing a valid Excel date or a literal date entered with the DATE function (for example, DATE(2025,3,15)).
  • Returned value – A whole number 1-12 representing the calendar month.

Why this method is best:

  • Simplicity – One required argument.
  • Speed – Native date math at the core calculation engine, no string parsing.
  • Stability – Unaffected by regional formats; it works as long as the source cell is an Excel date.
  • Flexibility – Combines seamlessly with other functions such as YEAR, DAY, and EOMONTH when you need additional components.

Alternative (textual) approach when you need the full month name or an abbreviated label:

=TEXT(date_serial,"mmmm")   ''Full month name
=TEXT(date_serial,"mmm")    ''Three-letter abbreviation

Because TEXT outputs a string, it is perfect for headings or chart labels where readability matters more than numerical sorting. However, MONTH remains the best starting point for calculations.

Parameters and Inputs

  • Valid Excel Date – A numeric serial representing a calendar day. This can be an input cell, the output of DATE or TODAY, or a value originating from external data imports.
  • Optional Time Data – If the cell also contains a time portion, MONTH ignores it, extracting only the calendar month.
  • Data Type – Source must resolve to a number; text that looks like a date will trigger #VALUE! unless wrapped in DATEVALUE.
  • Regional Variations – MONTH ignores locale; 02/03/2024 or 03/02/2024 both produce 2 or 3 depending on the underlying serial, not the visual layout.
  • Empty Cells – Passing a blank returns 0. Include ISNUMBER checks when blanks are possible.
  • Edge Cases – Dates outside the supported window (before 1 January 1900 on Windows or before 1 January 1904 on macOS) return errors. Imported data sometimes includes negative serials; validate with IF and ISERROR.
  • Volatile Inputs – TODAY() is volatile, meaning MONTH(TODAY()) recalculates every time the workbook opens. Cache the value if you prefer stability.

Step-by-Step Examples

Example 1: Basic Scenario

Suppose you have an order log with each order’s date in column A, starting at cell [A2]. You need a helper column to identify the month number.

  1. Start with the header “Month#” in cell [B1].
  2. In cell [B2], enter:
=MONTH(A2)
  1. Press Enter. Excel returns the integer 4 if [A2] holds 17-Apr-2024.
  2. Copy the formula down through all rows. Each row now contains the corresponding month (1-12).
  3. Optional formatting: apply Custom format “00” to pad single digits, useful for text concatenation later.

Why it works: The serial number underlying 17-Apr-2024 is 45382. MONTH isolates the 4 corresponding to April by internal division and modulo operations. The approach is fast even for tens of thousands of records because MONTH is a native, lightweight function.

Common variations:

  • If the source dates occasionally arrive as text like \"2024-04-17\", wrap with DATEVALUE: =MONTH(DATEVALUE(A2)).
  • To produce month names alongside, add column C with =TEXT(A2,"mmm").

Troubleshooting tips:

  • #VALUE! means the input is not a recognized date—check for leading apostrophes or import misalignment.
  • 0 results signal an empty or zero serial; test with ISBLANK(A2) or =A2=0.

Example 2: Real-World Application

Scenario: A finance team tracks expense transactions in [Expenses] sheet columns [A:D] (Date, Department, Category, Amount). Management requests a monthly expense summary to feed into a dashboard.

Step-by-step:

  1. Insert a new helper column E with header “Month” in [E1].
  2. In [E2] type:
=TEXT(A2,"mmmm")

and copy downward.
3. Select the entire data range [A1:E1000] and insert a PivotTable on a new sheet.
4. Drag “Month” to the Rows area, “Amount” to the Values area, and “Department” to Columns.
5. Excel automatically aggregates by month name, producing a matrix of departmental spend per month.
6. Optional: sort month names chronologically by adding a hidden Month# helper =MONTH(A2) and sorting on that column within PivotTable options.
7. Link the PivotTable to slicers for Year or Category to provide interactive filtering in the dashboard.

Integration points:

  • If the organization uses fiscal periods, replace step 2 with a CHOOSE-based mapping:

    =CHOOSE(MONTH(A2),7,8,9,10,11,12,1,2,3,4,5,6)
    

    which remaps calendar January–December to fiscal period 7-6.

  • Use GETPIVOTDATA in another sheet to pull monthly results into customized reports.

Performance considerations: MONTH and TEXT are non-volatile and calculate only when source data changes, ensuring smooth refreshes even with 100 000+ rows.

Example 3: Advanced Technique

Edge Case: Multi-year sales table requiring year-month concatenation for dynamic array reporting in Microsoft 365.

Setup: Sales dates in [A2:A20000], amounts in [B2:B20000]. Goal: spill a unique, sorted Year-Month list and compute totals.

  1. Unique Year-Month labels:
=SORT(UNIQUE(TEXT(A2:A20000,"yyyy-mm")))

This spills a vertical array like
2022-01, 2022-02, 2022-03…

  1. Adjacent totals using MAP (365):
=MAP(C2#,LAMBDA(ym,SUMIFS(B2:B20000, TEXT(A2:A20000,"yyyy-mm"), ym)))

Here, C2# references the spilled Year-Month list; MAP iterates each ym, SUMIFS adds matching sales.

  1. For charting, retrieve month names separately if desired:
=TEXT(DATE(LEFT(C2#,4),RIGHT(C2#,2),1),"mmm")
  1. Handling errors: wrap SUMIFS with IFERROR(…,0) if some ym values might lack sales.

Professional tips:

  • TEXT(A2:A20000,\"yyyy-mm\") is executed twice; cache it in a LET function to improve performance.
  • Use dynamic array formulas in Excel 2019 or older via Office Scripts or replicate with helper columns plus PivotTables.

When to use this approach: Dashboards that auto-extend when new dates are added, eliminating manual range adjustments.

Tips and Best Practices

  1. Always validate that the source data is a proper date serial; highlight non-dates with conditional formatting rules such as =NOT(ISNUMBER(A2)).
  2. When storing month numbers for lookup tables, format the column as Number with zero decimal places—avoids accidental text sort (1,10,11,2).
  3. For labels, favor TEXT(date,\"mmm\") rather than hard-coding month names; this keeps localization consistent if the workbook runs on machines with different language settings.
  4. Group by Months directly in PivotTables instead of helper columns when you need a quick summary—right-click any date, choose “Group”, and tick Months.
  5. In Power Query, add a “Month” column with Date.Month([Date]) before loading to the data model. This offloads calculations to the M engine and keeps Excel formulas lean.
  6. Document your helper columns in cell comments or Sheet Notes to aid future maintenance and onboarding of new analysts.

Common Mistakes to Avoid

  1. Treating text dates as real dates: If an imported CSV stores “2024-06-30” as text, MONTH returns #VALUE!. Use DATEVALUE or Power Query type transformation first.
  2. Using month names for arithmetic: “Apr” is text; subtracting “Mar” from “Apr” equals #VALUE!. Store month numbers for math, reserve names for display.
  3. Forgetting time zones in exports: Dates extracted from SQL in UTC but interpreted locally can roll back a day on older Excel versions, leading to wrong months. Adjust with TIME or TIMEVALUE before applying MONTH.
  4. Hard-coding fiscal mapping: `=IF(`MONTH(A2)≥7,MONTH(A2)-6,MONTH(A2)+6) works, but becomes error-prone when fiscal year shifts. Centralize the mapping table or use a CHOOSE wrapper for clarity.
  5. Sorting month names alphabetically: PivotTables will order April before February. Attach a numeric Month# field and sort by that column to preserve chronology.

Alternative Methods

Below is a comparison of methods to extract or represent months:

MethodOutput TypeProsConsBest ForVersion Support
MONTH(date)Integer 1-12Fast, simple, numeric sortingRequires formatting if you need namesCalculations, GROUP BY2007-365
TEXT(date,\"mmmm\")Full nameReadable, localizedText—can’t sort numericallyChart labels, headings2007-365
TEXT(date,\"mmm\")Abbrev. nameShort, compactTextCompact reports2007-365
Custom cell format \"mmm\"Visual onlyNo helper column neededUnderlying value unchanged; not usable in formulasQuick display2007-365
EOMONTH(date,0)Date serial (last day)Provides month end; combine with DAY for calcExtra step to extract numberFinancial month-end rollups2007-365
Power Query Date.MonthIntegerOffloads calc to query engineRequires query refreshData model pipelinesExcel 2010+ with PQ add-in
DAX MONTH()IntegerUsed in Power Pivot/Power BIIn-model onlyData models, dashboardsExcel 2010+ with PP

Choose MONTH when you need numbers, TEXT for display, Power Query for ETL pipelines, and DAX for model-level calculations.

FAQ

When should I use this approach?

Use MONTH when you need a numeric field that participates in math or sorting. Use TEXT when the month will appear in charts, slicers, or printed reports aimed at human readers.

Can this work across multiple sheets?

Absolutely. Reference the date cell with a fully qualified address: =MONTH(Sheet2!A2). For many sheets, store the formula in a central calculation sheet and use named ranges to keep references tidy.

What are the limitations?

  • MONTH cannot extract fiscal month without additional logic.
  • It requires valid date serials—text placeholders or blanks cause errors or zeros.
  • The function returns only the calendar month number; if you need the month index within a fiscal year, wrap MONTH inside a custom mapping expression.

How do I handle errors?

Wrap formulas in IFERROR: =IFERROR(MONTH(A2),"Invalid date"). For bulk datasets, use data validation to restrict non-date entries or conditional formatting to flag issues. In Power Query, use the “Detect Data Type” step and replace errors with nulls.

Does this work in older Excel versions?

MONTH and TEXT have existed since Excel 97, so compatibility is nearly universal. Custom number formats also work in legacy Excel. Dynamic array functions like UNIQUE, SORT, and MAP require Microsoft 365.

What about performance with large datasets?

MONTH is lightweight. A worksheet with 500 000 rows calculates in fractions of a second on modern hardware. For datasets above one million rows, import into Power Query or Power Pivot and use Date.Month (M) or MONTH (DAX) to leverage the columnar engine.

Conclusion

Being able to isolate the month component of a date is a deceptively small skill that delivers outsized benefits. It powers monthly reporting, forecasting, seasonality analysis, and endless dashboard visuals. Whether you adopt the simple MONTH function, leverage TEXT for friendly labels, or offload logic to Power Query, mastering this technique makes every other date-related task easier and more reliable. Practice the examples, integrate month fields into your next PivotTable, and you’ll find your time-based analytics becoming faster, cleaner, and more insightful. Keep exploring adjacent skills—quarter extraction, fiscal calendars, and dynamic date filters—to round out your Excel time-intelligence toolkit.

We use tracking cookies to understand how you use the product and help us improve it. Please accept cookies to help us improve.