Knowledge base / Excel

SQRT in Excel: zero, negative inputs and the meaning of the result

I will explain why zero is valid, why a negative input produces an error and when an apparent formula fix changes the question.

Kajo RudzińskiPublished Updated 5 min read

A square courtyard with one illuminated edge beside a plain measuring tool

When I know a square’s area and need its side length, I use SQRT. First, though, I check what the number represents. An area of 16 square meters gives a side of 4 meters. A value of -16 in that same column requires an explanation. Removing the minus sign just to make the error disappear can change the problem and conceal an issue in the source data.

What SQRT returns and where it is available

The English name is SQRT; Polish Excel calls it PIERWIASTEK. Microsoft’s documentation lists Microsoft 365, Excel 2024, 2021, 2019, 2016 and Excel for the web, among other supported products. The function does not require modern dynamic arrays. This article uses ordinary formulas referring to individual cells, without depending on spilled results or a particular array workflow.

SQRT returns the nonnegative square root. For 16, the result is 4. The equation “x squared equals 16” has two real solutions, 4 and -4, but the function does not return a list of both. For zero, the result is zero. Describing the required input as strictly positive would therefore exclude a valid case. Zero belongs in the domain too.

Syntax and small examples

=SQRT(A2)

In Polish Excel, use =PIERWIASTEK(A2). There is only one argument, so an argument separator does not appear here. English decimal examples use a dot and Polish examples a comma; your regional settings may differ.

The following values are synthetic. Their results follow from the square-root definition, and the 16 example also appears in the SQRT documentation. These are not measurements from a company or a claim that the workbook was executed.

Value in A2 Formula Result
0 =SQRT(A2) 0
16 =SQRT(A2) 4
25 =SQRT(A2) 5
0.25 =SQRT(A2) 0.5

You can follow the checks directly: 5 times 5 is 25, and 0.5 times 0.5 is 0.25. Do not assume every square root will be an integer or have a finite decimal expansion. The displayed decimal places and the value used in later calculations are separate issues. A shorter display does not necessarily mean that the underlying value has been rounded for subsequent operations.

A negative input needs a data decision

=SQRT(-16) produces #NUM!, called #LICZBA! in Polish Excel. Microsoft’s example explicitly shows this case. Ordinary SQRT does not calculate a complex square root. Working with complex numbers requires the appropriate function for that domain, which is a different task from recovering a physical side length from an area.

The documentation also shows SQRT combined with ABS. That formula first changes the input to its absolute value: -16 becomes 16, and the square root is then 4. The calculation is valid for the transformed input. It does not establish that the transformation is appropriate for your data. A sign representing direction or an adjustment may carry information that you would lose by applying ABS indiscriminately.

I would first ask why the value is negative. Can the measured quantity be negative? Is the column a difference between two values? Is a unit wrong, or was a subtraction reversed? The answer determines whether to correct the source, change the model or deliberately take the square root of an absolute value. An error message cannot choose the right interpretation for us.

Two perpendicular stone paths connected by a diagonal bridge

Handle errors without pretending to diagnose them

For a readable message, you can use:

=IFERROR(SQRT(A2),"Check the input")

The Polish equivalent is =JEŻELI.BŁĄD(PIERWIASTEK(A2);"Sprawdź dane wejściowe"). These show the usual English comma and Polish semicolon argument separators. IFERROR handles several error types. A message asserting “negative number” would be too specific unless you separately established that cause. An error already present in the input cell can also require investigation.

I would avoid replacing every error with zero. Zero has a specific meaning here: the valid square root of zero. Mixing it with invalid cases prevents later summaries from distinguishing a result from a data problem. A separate quality status can be useful in a report. The reader-facing message may remain simple, while the person maintaining the workbook still needs a way to locate the source of the issue.

SQRT, POWER and units

For nonnegative inputs, alternatives include =A2^(1/2) and =POWER(A2,1/2). The fraction avoids a decimal separator in the exponent. I prefer SQRT when I want the intention to be immediately visible. For a broader explanation of exponentiation, see the POWER entry, with syntax supported by Microsoft’s POWER reference.

For geometric data, state input and output units. Taking the square root of a square’s area in square meters gives its side in meters. Knowing only an arbitrary rectangle’s area does not let you recover its sides this way: different pairs of lengths can have the same product. The function performs an operation, while the shape assumption must come from the task definition.

For practice, use synthetic inputs 0, 9 and -9. Predict zero, three and a numeric error, then explain why the last case should not silently become zero. Next, describe a square with an area of 9 square units and a side of 3 units, justifying the result by multiplication. Finally, distinguish this calculation from finding both solutions of an equation. Those explanations cover the most important boundary of this simple function.

Key takeaways

Does SQRT accept zero?

Yes. SQRT(0) returns 0. The input must be nonnegative rather than strictly positive.

Why does a negative input produce an error?

SQRT works with nonnegative real inputs. A negative argument produces

Does IFERROR establish that the input was negative?

No. It catches several error types, so use a general message unless you have checked the cause separately.

AI was used in an automated way while working on this article. If you want to learn how to do it too, check out this project.

Kajo Rudziński

Newsletter KajoData

Let’s keep in touch.

I write about data analysis, learning and changing careers. My newsletter and the sign-up form are in Polish. If that works for you, I’d be glad to see you there.