MMULT function

This article describes the formula syntax and usage of the MMULT  function in Microsoft Excel.


Returns the matrix product of two arrays. The result is an array with the same number of rows as array1 and the same number of columns as array2.

MMULT(array1, array2)

The MMULT function syntax has the following arguments:

  • Array1, Array2    Required. The arrays you want to multiply.

  • The number of columns in Array1 must be the same as the number of rows in Array2, and both arrays must contain only numbers.

  • Array1 and Array2 can be given as cell ranges, array constants, or references.

  • MMULT returns the #VALUE! error when:

    • Any cells are empty or contain text.

    • The number of columns in Array1 is different from the number of rows in Array2.

  • The matrix product array a of two arrays b and c is:


    where i is the row number, and j is the column number.

  • Formulas that return arrays must be entered as array formulas.

    Note:  In Excel Online you cannot create array formulas.

Example 1

MMULT function- Example 1

Example 2

MMULT function- Example 2

You must enter the above formulas as array formulas for it to work correctly. After you enter the formula, press Enter if you have a current Office 365 subscription; otherwise press Ctrl+Shift+Enter. If the formula is not entered as an array formula, a single result is returned.

Note: If you have a current version of Office 365, then you can simply enter the formula in the top-left-cell of the output range, then press ENTER to confirm the formula as a dynamic array formula. Otherwise, the formula must be entered as a legacy array formula by first selecting the output range, entering the formula in the top-left-cell of the output range, and then pressing CTRL+SHIFT+ENTER to confirm it. Excel inserts curly brackets at the beginning and end of the formula for you. For more information on array formulas, see Guidelines and examples of array formulas.

Expand your Office skills
Explore training
Get new features first
Join Office Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.