How to Average By Month in Excel

Learn multiple Excel methods to average by month with step-by-step examples, practical business scenarios, and advanced techniques.

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

How to Average By Month in Excel

Why This Task Matters in Excel

In almost every data-driven role—finance, sales, operations, marketing, HR—you inevitably receive raw, day-level data that needs to be summarized into monthly insight. Consider a retailer that registers thousands of transactions every day. Senior management rarely cares about the average daily sale; they want to see the average sale per month so they can compare seasonality and forecast demand. The same applies to a call-center supervisor analyzing average call handle time by month, or a manufacturing engineer monitoring average defect counts each month to spot process drift.

Monthly averages help smooth irregular daily spikes and expose genuine trends. Without that smoothing, short-term outliers (holiday sales rushes, inventory outages, one-off marketing campaigns) distort analysis and lead to wrong decisions—overstocking, under-staffing, or misallocating budget. Many corporate dashboards and external reporting packages ingest monthly aggregates, so learning how to produce those numbers quickly inside Excel becomes critical.

Excel is ideally suited for this job because it offers several built-in approaches—formulas (AVERAGEIFS, dynamic array FILTER, SUMPRODUCT), PivotTables, and Power Pivot measures. You can calculate monthly averages in a single cell or create refreshable reports tied to data connections. The flexibility to choose formula or non-formula solutions lets you adapt to varying data sizes, skills, and software editions (Excel 2010 through Microsoft 365). Failing to master at least one of these techniques leads to time-consuming manual work: copying data into new sheets, typing manual month names, or using error-prone subtotals. It also blocks you from more advanced analytics like rolling averages, year-over-year growth, and predictive modeling, all of which rely on clean monthly aggregates.

Finally, average-by-month is a gateway skill. Once you are comfortable grouping dates and applying conditional aggregation, you can seamlessly extend to “sum by quarter,” “count unique IDs by year,” or “average by weekday.” That foundational knowledge ties into lookup functions, dynamic named ranges, charting, and even Power Query transformations, enhancing your entire Excel workflow.


Best Excel Approach

The most universally compatible and robust method is a single-cell AVERAGEIFS formula that targets the numeric column and filters rows whose dates fall within the month you specify. This approach works in any modern Excel version starting with Excel 2007, updates automatically when you add rows, and supports additional conditions (region, product, salesperson, etc.).

Core logic:

  1. Derive the first calendar day of the target month.
  2. Derive the last calendar day of that same month.
  3. Use AVERAGEIFS to average the numbers where the date is greater than or equal to the first day and less than or equal to the last day.

Recommended syntax:

=AVERAGEIFS(
    [AmountColumn],                /* numbers to average */
    [DateColumn], ">=" & EDATE([TargetDate],0),   /* first day of month */
    [DateColumn], "<=" & EOMONTH([TargetDate],0)  /* last day of month */
)

Why it’s best:

  • Fast — Excel’s multi-threaded calculation optimizes AVERAGEIFS.
  • Transparent — No array entry or CSE needed; formula reads like plain English.
  • Flexible — Swap [TargetDate] with a cell containing any date in the target month, or reference a column header in a structured table to create dynamic dashboard visuals.
  • Extensible — Add extra range-criteria pairs (e.g., region, status) without rewriting from scratch.

Alternative mainstream options include:

=AVERAGE(FILTER([AmountColumn], (MONTH([DateColumn])=MONTH([TargetDate])) * 
                                 (YEAR([DateColumn])=YEAR([TargetDate])) ))

=SUMPRODUCT(--(TEXT([DateColumn],"yyyymm")=TEXT([TargetDate],"yyyymm")), [AmountColumn]) /
 SUMPRODUCT(--(TEXT([DateColumn],"yyyymm")=TEXT([TargetDate],"yyyymm")))

Choose FILTER when you have Microsoft 365, need spill ranges, and like dynamic arrays. Use SUMPRODUCT in pre-2007 files where AVERAGEIFS is unavailable.


Parameters and Inputs

  • Date column: A range or structured column containing valid Excel dates (serial numbers). The data type must be Date, not text that merely looks like a date.
  • Number column: The metric you want averaged—sales, quantity, hours, etc. It should be numeric; otherwise, AVERAGEIFS will ignore text and error strings.
  • Target month reference: Either a hard-typed date (for example, 01-Sep-2025) or a cell containing any date inside the desired month. The formula converts that date to first and last day, so the actual day value is irrelevant.
  • Optional criteria pairs: Additional range/criteria inputs you can append to AVERAGEIFS—for instance, [RegionColumn], \"North\"—to produce segmented monthly averages.

Data preparation guidelines:

  • Keep your data in an Excel Table so ranges auto-expand (Insert → Table). Table columns let you write succinct formulas like Sales[Amount] and Sales[Date].
  • Remove blank rows and ensure numeric columns do not contain #N/A or #DIV/0!. Those errors propagate into AVERAGEIFS as errors or exclusion.
  • Avoid mixed data types in the same column (numbers and text). Coerce text numbers to true numbers using VALUE or Paste Special → Multiply by 1.

Edge-case handling:

  • Leap years—EOMONTH correctly returns 29-Feb for 2024, so no extra work required.
  • Missing data—If a month has no rows, AVERAGEIFS returns #DIV/0!. Trap with IFERROR or display custom messages.
  • Time stamps—If your date column includes time (e.g., 2025-09-01 08:00), Excel still treats them as valid dates; comparisons using >= and <= work automatically.

Step-by-Step Examples

Example 1: Basic Scenario

Imagine a small spreadsheet tracking daily website visitors:

DateVisitors
1-Jan-20251,200
2-Jan-20251,450
31-Jan-2025980
1-Feb-20251,050

Step 1 — Convert data to a table named SiteData (Ctrl + T).
Step 2 — Type any January date into cell F2. Label E\2 = \"Select Month\".
Step 3 — In F3, enter the formula:

=AVERAGEIFS(
    SiteData[Visitors],
    SiteData[Date], ">=" & EDATE($F$2,0),
    SiteData[Date], "<=" & EOMONTH($F$2,0)
)

Expected result: Excel returns the mean of all visitor counts where the date occurs in January 2025, say 1,175.5.

Why it works: EDATE returns 1-Jan-2025 (first day of the month of F2). EOMONTH returns 31-Jan-2025. AVERAGEIFS then filters rows whose “Date” lies between those boundaries, inclusive. Because the visitors column is numeric, Excel averages just those values.

Common variations:

  • Place F2 inside a Data Validation list of months for quick toggling.
  • Add a second criterion, such as SiteData[Channel], \"Organic\", to calculate average organic visitors per month.

Troubleshooting tips:

  • If the result displays as #DIV/0!, verify there are rows in that month or wrap the formula in IFERROR.
  • If the formula shows a DATE serial number instead of the average, you accidentally referenced the Date column in the first argument. Swap it back to Visitors.

Example 2: Real-World Application

Scenario: A manufacturing plant logs every quality check with a defect count. Management wants the average daily defects per month by production line to track process improvements against Six Sigma targets.

Raw columns:

  • Date (includes time stamps)
  • LineID (A, B, C)
  • Defects

Tasks:

  1. Generate a dashboard with a slicer for LineID.
  2. Show the monthly average defects in a KPI card and in a trendline chart.

Walkthrough:

  1. Load the data into an Excel Table named QC.
  2. Insert a PivotTable. Drag Date into Rows, grouped by Months (right-click → Group → Months). Drag Defects to Values and set the summary to Average. Drag LineID to Filters or add a slicer.
  • Outcome: A ready-to-refresh table of average defects per line per month.
  1. Link a formatted card (cell with large font) to the PivotTable’s grand-total cell for the selected month.
  2. For a formula-based dashboard without PivotTables, add a header row with LineID and Month. In G2, reference a dropdown for LineID; in H2, reference a dropdown for Month (any date). Then use:
=AVERAGEIFS(
    QC[Defects],
    QC[Date], ">=" & EDATE($H$2,0),
    QC[Date], "<=" & EOMONTH($H$2,0),
    QC[LineID], $G$2
)

The chart: Create a helper column listing the first day of each month in chronological order. Use the same AVERAGEIFS formula, pointing H2 to each helper cell, and fill downward. Finally, insert a line chart referencing the helper dates and the spill-down averages. Whenever the slicer or dropdown changes, the chart refreshes automatically.

Performance considerations: With 100,000+ records, AVERAGEIFS still calculates near-instantaneously, but ensure Calculation Options is set to Automatic. For data growing every minute, consider Power Pivot measures instead, because the VertiPaq engine compresses data and recalculates aggregates faster.


Example 3: Advanced Technique

Need: Financial analyst requires rolling 3-month average revenue to smooth volatility before forecasting. The twist: fiscal months close on different dates, so she must average by calendar month, then compute the rolling window.

Dataset: Table Revenue with [Date] and [Amount].

Step 1 — Calculate monthly average in a dynamic spill column: In D2 (outside the table), enter a list of the first day of each month using SEQUENCE:

=SEQUENCE(12,1,DATE(2025,1,1),30)

Step 2 — Compute monthly average adjacent to each month seed (E2):

=AVERAGEIFS(
    Revenue[Amount],
    Revenue[Date], ">=" & D2#,
    Revenue[Date], "<=" & EOMONTH(D2#,0)
)

Because D2# spills 12 months, E2 spills 12 averages at once—no copy-paste.

Step 3 — Rolling 3-month average in F2:

=AVERAGE(OFFSET(E2,ROW(E2:E13)-ROW(E2),0,3))

Or using dynamic arrays only (no OFFSET):

=MAP(E2#,LAMBDA(v, AVERAGE(TAKE(E2#,ROWS(E2#)-(SEQUENCE(ROWS(E2#))-1)<=2)))

Edge cases: The first two months have insufficient history; wrap in IF to display \"N/A\".

Professional tips:

  • Replace Revenue[Date] criteria with \">=\" & D2# and \"<\" & EDATE(D2#,1) for half-open intervals, which avoid double-counting when time stamps enter the picture.
  • Use LET to store intermediate calculations, reducing repeats and making the formula easier to audit.

Tips and Best Practices

  1. Use Excel Tables: Tables auto-extend formulas and keep references human-readable (Sales[Amount]) instead of sheet coordinates.
  2. Store Month Seeds Once: Instead of hard-typing month names, store a single date (e.g., 1-Jan-2025) and format as \"mmm-yyyy.\" That ensures comparisons rely on dates, not text.
  3. Prefer Inclusive Month Bounds: >= firstDay and <= lastDay guarantees no missing last-day data (31-Jan) that a less than first-of-next-month approach could miss if you accidentally store time stamps with 00:00.
  4. Wrap With IFERROR: Production dashboards should never expose #DIV/0!. Wrap in =IFERROR(formula,0) or a descriptive \"No data.\"
  5. Optimize for Many Criteria: If you must average by month and ten filters, consider SUMPRODUCT or Power Pivot; multiple AVERAGEIFS can become repetitive.
  6. Document Assumptions: Describe fiscal vs calendar months, the data refresh cadence, and error-handling policy in a hidden Notes sheet for future maintainers.

Common Mistakes to Avoid

  1. Comparing Text Dates: Using TEXT([Date],\"mmm\") as a criterion leads to February 2025 colliding with February 2024. Always test both month and year.
  2. Forgetting Time Stamps: If your data contains \"2025-03-31 14:00\" but your criterion uses <="2025-03-31", Excel matches it because the time adds only fractional days. Issues arise only when you use < EDATE(firstDay,1). Stick with EOMONTH to avoid leakage.
  3. Mixing Data Types: If numbers show as text, AVERAGEIFS ignores them silently, yielding misleadingly low averages. Convert text to numbers (Error Checking → Convert, or VALUE).
  4. Hard-coding Month Numbers: Typing MONTH(DateColumn)=1 in SUMPRODUCT creates year blindness and fails for multiple years. Use TEXT(Date,\"yyyymm\") or combined YEAR+MONTH tests.
  5. Neglecting Empty Months: Dashboards crash on months with no rows. Pre-seed months with NA() and handle with IFERROR or incorporate a calendar table to force zero rows.

Corrections: Check data types with Ctrl + Shift + 1 (number format), wrap comparisons with YEAR and MONTH, and set Lookup_value in charts to NA() so lines break instead of dropping to zero.


Alternative Methods

MethodExcel VersionProsConsBest Use Case
AVERAGEIFS with EOMONTH2007 +Simple, readable, fastRequires helper date for each queryDay-level sheets, ad-hoc formulas
Dynamic array FILTERMicrosoft 365Single spill range, supports further array mathNot available pre-365Modern dashboards needing spill arrays
SUMPRODUCT2003 +Works even in very old filesHarder to read, slower on huge dataLegacy workbooks, complex weighted logic
PivotTable2003 +No formulas, drag-drop, quick chartsManual refresh (pre-365 auto), limited custom calcStakeholder report packs, non-formula users
Power Pivot (Data Model)2010. Pro +Handles millions of rows, DAX measures, interactive slicersSteeper learning curveMassive fact tables, enterprise BI

Choosing strategy:

  • Stick to AVERAGEIFS when you need one-off cells or small sheets.
  • Switch to PivotTables when the audience prefers tables or you must subtotal many dimensions.
  • Adopt Power Pivot when row counts exceed 1 million or you need secure, governed models.

Migration tip: You can always convert an AVERAGEIFS workbook into a PivotTable later by loading the same table into the Data Model and creating a simple AVERAGEX measure.


FAQ

When should I use this approach?

Use AVERAGEIFS if you need a quick, transparent formula that colleagues can audit without Power Query or PivotTable knowledge. It’s perfect for KPI cards, dynamic dashboards, and scenarios where you already have date and metric columns side by side.

Can this work across multiple sheets?

Yes. Reference external sheets explicitly: =AVERAGEIFS(Sheet2!$B:$B, Sheet2!$A:$A, ">=" & firstDay, Sheet2!$A:$A, "<=" & lastDay). For many sheets, consolidate with Power Query or 3D-reference functions are available only for SUM; AVERAGEIFS does not support 3D references, so use a data consolidation step first.

What are the limitations?

  • AVERAGEIFS ignores text that looks like numbers.
  • It returns #DIV/0! if no rows meet criteria.
  • Maximum of 127 range/criteria pairs.
  • Cannot average logical TRUE/FALSE values; coerce them to 1/0 first.
    Workarounds: N() to convert booleans, IFERROR to trap divide errors, or switch to SUMPRODUCT.

How do I handle errors?

Wrap with IFERROR(formula,"No data"). For value errors caused by non-numeric entries, clean the data or embed --VALUE() coercions inside SUMPRODUCT. When dealing with data imports, set Workbook Calculation to Manual during cleanup to speed processing.

Does this work in older Excel versions?

  • Excel 2003: AVERAGEIFS not available; use SUMPRODUCT method shown earlier.
  • Excel 2007-2019: All functions except FILTER are available.
  • Microsoft 365: Full feature set including dynamic arrays and LET/LAMBDA for cleaner code.

What about performance with large datasets?

For up to roughly 100,000 rows, AVERAGEIFS recalculates nearly instantly. Beyond several hundred thousand rows, consider:

  1. Converting formulas to PivotTables or Power Pivot measures.
  2. Turning off automatic calculation while importing data (Formulas → Calculation Options).
  3. Minimizing volatile functions inside criteria (e.g., TODAY()). Use helper cells to store static bounds.

Conclusion

Mastering “average by month” unlocks quick trend analysis, executive-level reporting, and smoother forecasting workflows. Whether you adopt AVERAGEIFS, dynamic arrays, or PivotTables, you gain a reusable pattern for any time-based aggregation—sum, count, max, or min. Integrate this method with slicers, charts, and Power Query to build robust, refreshable analytics solutions. Now that you know the mechanics and pitfalls, try implementing it on your own datasets, experiment with additional criteria, and explore rolling averages to deepen your Excel proficiency.

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