Function · Math
Excel MMULT function
The Excel MMULT function returns the matrix product of two arrays. Two jobs at $45 an hour and $12 a unit cost $300 and $366.
Syntax =MMULT(array1, array2)
=MMULT(B2:C3,E2:E3)Arguments
| Name | Required | What to pass |
|---|---|---|
| array1 | Required | The left array. Its column count has to equal the row count of array2. A blank cell or a text cell makes the result #VALUE!. Numbers only. |
| array2 | Required | The right array. The product has array1's number of rows and array2's number of columns. In Microsoft 365, Excel 2024, Excel 2021, and Excel for the web that block spills. A blocked spill is #SPILL!. |
Examples
Two jobs priced from hours and units on 4/2/2026
=MMULT(B2:C3,E2:E3)Result 300 and 366
Two orders with a unit cost and a shipping cost
=MMULT(B2:C3,E2:F3)Result 38 and 6 over 30 and 5.25
The grocery line total as a row times a column
=MMULT(TRANSPOSE(C2:C4),B2:B4)Result 25.64
Four course grades posted on 3/20/2026
=MMULT(B2:D5,TRANSPOSE(F2:H2))Result 90.6, 75.5, 82, and 60
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Job | Hours | Units | Rate | |
| 2 | Austin | 4 | 10 | 45 | |
| 3 | Dallas | 6 | 8 | 12 | |
| 4 | |||||
| 5 | Cost | 300 | |||
| 6 | 366 |
MMULT returns the matrix product of two arrays. The result has as many rows as array1 and as many columns as array2, and the column count of array1 has to equal the row count of array2. Austin uses 4 hours and 10 units on 4/2/2026. Dallas uses 6 hours and 8 units. Labor is $45 an hour and materials are $12 a unit, written down a column. =MMULT(B2:C3,E2:E3) spills $300 and $366. Austin is 4 × 45 + 10 × 12 = 300. Dallas is 6 × 45 + 8 × 12 = 366. SUM of that spill is $666. The array constant =MMULT({4,10;6,8},{45;12}) returns the same two numbers. In a US workbook the comma separates columns and the semicolon starts the next row. Put those rates across a row and the product is #VALUE!, because two columns then meet one row.
Two orders that day use a 2×2. Order A is 3 widgets and 2 gadgets. Order B is 1 widget and 5 gadgets. Widgets are $10 with $1.50 shipping. Gadgets are $4 with $0.75 shipping. =MMULT(B2:C3,E2:F3) spills $38 and $6.00 over $30 and $5.25. Order A is $44.00. Order B is $35.25. A price column of $3.49, $4.29, and $4.79 times quantities 2, 1, and 3 is $25.64. SUMPRODUCT of those two columns is the same $25.64. MMULT of them needs TRANSPOSE on one range, because both started as columns. ROWS of the job result is 2 and COLUMNS is 1. INDEX of the spill at row 2 is $366.
Naomi Brooks posts Algebra 1 on 3/20/2026. The category averages are Ava 90, 87, and 93, Benito 75, 70, and 79, Chloe 95, 90, and 72, and Evan 60, 60, and 60. Homework is 20%, quizzes are 30%, and tests are 50%, stored as 0.2, 0.3, and 0.5. =MMULT(B2:D5,TRANSPOSE(F2:H2)) spills 90.6, 75.5, 82, and 60. ROUND to the hundredth is 90.60, 75.50, 82.00, and 60.00. Weights of 20, 30, and 50 return 9,060 for Ava, because MMULT does not divide by the sum of the weights. The weighted average LAMBDA does that division, so those whole-number weights still average to 90.6. A blank or text in either array is #VALUE!. Microsoft 365, Excel 2024, Excel 2021, and Excel for the web spill the block. Excel 2019 and earlier need the output cells selected and Ctrl+Shift+Enter. A blocked spill in current Excel is #SPILL!. The Teacher Gradebook computes these four course grades with SUMPRODUCT, so the file opens in Excel 2010. The Employee Shift Schedule totals Harbor Inn labor for the week of 3/16/2026 with SUMPRODUCT of hours and rates, $2,844.00. That product is what MMULT returns after one of those columns is transposed. The gradebook is a class record she typed, not a transcript. The shift file is not wage advice.