SQRT function
The SQRT function in Excel returns the square root of a number. The square root of a number is the value such that .
Syntax
=SQRT(number)
Parameters
- number (required): The number for which you want to calculate the square root. This number must be greater than or equal to 0, as the square root of negative numbers is undefined in the real number system (it results in a complex number).
Key Points
- Positive Numbers: The square root of a positive number is a real number.
- Zero: The square root of 0 is 0.
- Negative Numbers: The
SQRTfunction cannot be used with negative numbers because it will return a#NUM!error. To calculate the square root of a negative number, you can use theIMAGINARYorCOMPLEXfunctions for complex numbers. - Non-Negative Input: The input must be a non-negative number (zero or positive). Negative inputs will return an error.
Examples
- Calculate the square root of 16:
=SQRT(16)Result:
4(since ) - Calculate the square root of 25:
=SQRT(25)Result:
5(since ) - Calculate the square root of 0:
=SQRT(0)Result:
0(since ) - Square root of a number in cell A1:
=SQRT(A1) - Attempt to calculate the square root of a negative number:
=SQRT(-4)Result:
#NUM!error, because the square root of a negative number is undefined in real numbers.
Notes
- Handling Errors: If you are dealing with negative numbers and want to handle them gracefully, you can use the
IFfunction to check if the number is negative before attempting the square root:=IF(A1<0, "Error", SQRT(A1)) - Complex Numbers: For the square root of a negative number, you can use the
IMAGINARYorCOMPLEXfunctions to handle complex numbers, which may be necessary in fields such as electrical engineering or physics.
Related Functions
POWER: You can usePOWER(number, 0.5)to calculate the square root of a number, as the square root is equivalent to raising the number to the power of 0.5.ABS: If you need the square root of the absolute value of a number (even for negative numbers), you can useSQRT(ABS(number)).PI: In calculations where you need to use the square root of π or other constants.
The SQRT function is commonly used in various fields, such as mathematics, physics, and finance, for calculations involving distances, geometries, and standard deviations.