Docly Developers
Function Updated 16 May 2026

Math.sqrt(value)

Calculates and returns the square root of a number.

See also Math.pow Math.PI

Parameters

valuenumberrequired

Number to calculate square root of.

Returns

A number, the square root of specified value.

Example

Normal JavaScript, running in the browser or on the Docly™ server.
write(Math.sqrt(64));
write("\n");
/* Expected output: 8 */

write(Math.sqrt(256));
write("\n");
/* Expected output: 16 */

write(Math.sqrt(1000));
/* Expected output: 31.622776601683793 */