Excel MMULT Function
Matrix multiplication inside Excel — multiplies two arrays row-by-column to produce a result matrix. Unlocks multi-dimensional weighted scoring, portfolio calculations, and bulk dot-product operations without helper columns.
MMULT stands for Matrix Multiplication. It takes two numeric arrays (matrices) and returns a new array where each element is the dot product of the corresponding row from the first array and column from the second array. It is categorised under Math & Trigonometry and is one of Excel's true array-returning functions.
In practical terms, MMULT enables you to multiply quantities by prices across multiple categories simultaneously, compute weighted scores for multiple candidates in one formula, or perform portfolio return calculations — all without helper columns or repeated SUMPRODUCT calls. The result is always an array whose dimensions are determined by the input matrix sizes.
Columns of Array1 must equal Rows of Array2. The result matrix dimensions are: Rows of Array1 × Columns of Array2
Ctrl + Shift + Enter. In Excel 365, dynamic arrays
handle this automatically — just press Enter in the top-left cell.
A retail business sells 3 products across 2 stores. Quantity data is in a 3×2 matrix (products × stores) and unit prices are in a 3×1 column. MMULT multiplies each product's quantity by its price and sums across all products — giving total revenue per store in one formula.
| Product | Store A | Store B |
|---|---|---|
| Laptop | 10 | 8 |
| Mobile | 25 | 30 |
| Tablet | 15 | 12 |
| Product | Price (₹) |
|---|---|
| Laptop | 55,000 |
| Mobile | 18,000 |
| Tablet | 32,000 |
(10 × 55,000) + (25 × 18,000) + (15 × 32,000)
= 5,50,000 + 4,50,000 + 4,80,000 = ₹ 14,80,000
Store B Revenue:
(8 × 55,000) + (30 × 18,000) + (12 × 32,000)
= 4,40,000 + 5,40,000 + 3,84,000 = ₹ 13,64,000
=MMULT(TRANSPOSE(B2:C4), E2:E4)
// TRANSPOSE flips qty matrix to (2×3) so cols match price rows (3×1) → result (2×1)
Or directly (3×2 qty × price as column):
=MMULT(TRANSPOSE(B2:C4), E2:E4) → ₹ 14,80,000 | ₹ 13,64,000
An HR department evaluates 4 employees across 3 KPIs. Each KPI has a different weightage (totalling 100%). Using MMULT, compute each employee's weighted total score in one formula — no helper columns, no repeated SUMPRODUCT per employee.
| Employee | Sales | Service | Compliance |
|---|---|---|---|
| Amit Sharma | 85 | 78 | 90 |
| Priya Mehta | 92 | 88 | 76 |
| Rohan Gupta | 70 | 95 | 88 |
| Sunita Nair | 88 | 82 | 94 |
| KPI | Weight |
|---|---|
| Sales | 0.50 |
| Service | 0.30 |
| Compliance | 0.20 |
Priya Mehta: (92×0.50) + (88×0.30) + (76×0.20) = 46.0 + 26.4 + 15.2 = 87.6
Rohan Gupta: (70×0.50) + (95×0.30) + (88×0.20) = 35.0 + 28.5 + 17.6 = 81.1
Sunita Nair: (88×0.50) + (82×0.30) + (94×0.20) = 44.0 + 24.6 + 18.8 = 87.4
=MMULT(B2:D5, G2:G4)
// Scores (4×3) × Weights (3×1) → Result (4×1) — one weighted score per employee
In Excel 365 (single cell, spills automatically):
=MMULT(B2:D5, G2:G4) → 83.9 | 87.6 | 81.1 | 87.4
=MMULT(B2:D25, G2:G4)
handles all of them. No extra columns, no formula changes. In contrast, SUMPRODUCT would require
one formula per employee. For large appraisal cycles, MMULT delivers weighted scores for
hundreds of employees in a single array formula.
- HR Bulk weighted appraisal scoring — multiply employee score matrices by KPI weight vectors to rank all employees simultaneously in one formula for annual performance reviews.
- Finance Portfolio return calculation — multiply asset weight matrix by return matrix to compute weighted returns across multiple portfolios or time periods in one MMULT call.
- Retail Multi-store, multi-product revenue — quantity matrix (products × stores) multiplied by price column returns total revenue per store without any helper columns.
- MIS Contribution margin analysis — multiply units sold matrix by contribution per unit vector to get total contribution across multiple regions simultaneously in MIS dashboards.
-
Analytics
Unique row count trick —
=MMULT((A2:A100=TRANSPOSE(A2:A100))*1, ROW(A2:A100)^0)counts how many times each value appears, enabling duplicate frequency analysis without COUNTIF. - Operations Resource allocation matrix — multiply task-hours matrix by hourly rate vector to compute total cost per project across multiple departments simultaneously.
- Audit Cross-tab verification — multiply a binary indicator matrix by values to compute conditional sums across multiple categories simultaneously — a powerful cross-checking tool for large data audits.
=MMULT(A2:C4, E2:G4) where Array1 has 3 columns but Array2 also has 3 rows — wait, that's valid.
The error occurs when Array1's column count does NOT equal Array2's row count. E.g., =MMULT(A2:C4, E2:F3) — Array1 is (3×3) but Array2 is (2×2): 3 cols ≠ 2 rows → #VALUE!
=COLUMNS(Array1) and =ROWS(Array2) to cross-check before building the formula.=IFERROR(array*1, 0) to coerce non-numeric values to zero before passing to MMULT.Ctrl + Shift + Enter. In Excel 365, just press Enter — dynamic arrays handle spilling automatically.=MMULT(scores, TRANSPOSE(weights)) —
adds unnecessary complexity. SUMPRODUCT is simpler, more readable, and doesn't require
managing dimensions for a single-employee, single-row calculation.
=SUMPRODUCT(B2:D2, weights). Use MMULT only when computing the same operation across multiple rows simultaneously.