sqrt

sqrt(x)

Try it yourself:

See also:

sqrt(): Square Root

sqrt() returns the principal square root. For nonnegative real x, sqrt(x) is the nonnegative value whose square is x. It is used in distance, standard deviation, and geometry.

Domain and checks

Negative real inputs have no real square root; use complex arithmetic only when appropriate. Verify a result with square(). Use hypot() for stable two-dimensional lengths and pow() for a general exponent.

Square roots preserve units only when those units have a meaningful square-root form. Near zero, avoid subtracting nearly equal squared quantities before calling sqrt.

Try Sqrt in Calcul.io

Start with one of the editable examples above, then replace its arguments with your own values. Keeping the function on a separate calculator line makes the input and result easy to compare. For a longer workflow, assign the result to a variable or reference that line in the next expression.

Check the shown signature before adding optional arguments, and use the related-function links to compare operations with similar purposes.

All functions