MDETERM in Excel: Calculate a Determinant and Check Matrix Structure
Find Excel matrix determinants with explicit small matrices, row and scale checks, documented input errors and numerical-singularity cautions.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: MDETERM returns one numeric determinant for a square numeric matrix. For rows 2,1 and 1,3, =MDETERM(A2:B3) has expected result 5, calculated independently as 2×3−1×1.
Availability and version history
- Introduced: first introduction version is not established by the official history reviewed; the current product list is not a launch record.
- Availability: official help lists Excel for Microsoft 365, Excel for Microsoft 365 for Mac, Excel 2024, Excel 2024 for Mac, Excel 2021, Excel 2021 for Mac, Excel 2019, Excel 2016.
- Checked: October 14, 2026; official MDETERM reference. Documentation and independently calculated examples; no native Excel execution or broader platform certification.
Syntax and square-input rule
=MDETERM(array)
The required array must have equal row and column counts and numeric cells. Microsoft documents #VALUE! if the shape is not square or any input cells are empty or contain text. Enter an actual numeric zero where zero is intended, rather than leaving a hole in the matrix.
Unlike an inverse or a matrix product, a determinant is a scalar. Reserve one output cell and keep headings outside the source range. The examples use cell ranges so their matrix shape is easy to inspect.
Example 1: calculate a two-by-two determinant
Enter this matrix in A2:B3:
| A | B |
|---|---|
| 2 | 1 |
| 1 | 3 |
=MDETERM(A2:B3)
=A2*B3-B2*A3
Both expected results are 5. Multiplying the main diagonal gives six; multiplying the other diagonal gives one; subtracting yields five.
The displayed column labels identify source positions and are not part of the numeric matrix. Including a text heading in A1:B3 would change both its shape and its numeric eligibility.
Example 2: a triangular three-by-three matrix
Enter D2:F4 with rows 2,1,5, 0,3,7, 0,0,4:
=MDETERM(D2:F4)
Expected result: 24. For this triangular matrix, the determinant equals the product of diagonal entries 2×3×4. The explicitly entered zeros below the diagonal are numeric inputs.
That shortcut applies because of the triangular structure. Multiplying only the diagonal of an arbitrary full matrix is not a general determinant calculation.
Advanced example: exchange two rows
In H2:I3 enter rows 1,3 and 2,1, the reverse of the original row order:
=MDETERM(H2:I3)
Expected result: -5. Exchanging two rows reverses the sign. A negative determinant is valid and does not automatically mean an error or an impossible matrix.
The magnitude and sign can have geometric interpretations for a linear transformation, but those interpretations depend on the surrounding model. MDETERM only evaluates the supplied numeric matrix.
Advanced example: distinguish row scaling from whole-matrix scaling
Double only the first row of the original matrix to obtain 4,2 and 1,3. Its expected determinant is 10, twice the original five.
Double every entry instead, obtaining 4,2 and 2,6. Its expected determinant is 20, four times the original, because two rows were each scaled by two.
For an n-by-n matrix, multiplying every entry by a scalar scales the determinant by that scalar to power n. These two small controls expose why “doubling the matrix doubles its determinant” is not generally correct.
Advanced example: identify an exact dependent-row model
Enter K2:L3 as rows 2,1 and 4,2:
=MDETERM(K2:L3)
The exact mathematical expectation is 0, since the second row is twice the first. Such a matrix has no ordinary inverse. MINVERSE documents its own singular-matrix error rule.
Microsoft warns that determinant calculations use approximately 16 digits and that a singular matrix can yield a tiny residual instead of exactly zero. Consequently, a rigid determinant=0 test is not a universal numerical certificate for measured or ill-conditioned data.
Near-singularity requires context
For rows 1,1 and 1,1.00000001, the exact decimal determinant is 0.00000001. Small changes in the entries can be large relative to that determinant. The example illustrates sensitivity; it does not claim those exact native final digits.
No single absolute tolerance is appropriate for all matrix scales. If solving a consequential system, assess conditioning and residuals with an appropriate numerical method rather than trusting a determinant threshold alone.
Input errors and scope
A non-square range or a blank/text cell violates the documented requirements and has expected #VALUE!. This is different from the valid numeric zero determinant of a singular matrix. The guide does not assign guessed codes to every malformed array, external reference or extreme-size case.
For matrix multiplication rather than a determinant, see MMULT. For a known identity matrix, see MUNIT.
References and verification
Inputs are fictional. Decimal answers are independent mathematical expectations rounded to nine places, not captured native results. Extreme magnitudes, complete coercion matrices and cross-version numerical accuracy remain untested.