Skip to content
Zesona
Square Root CalculatorLocal

Square Root Calculator

Find a square root, reported exactly for a perfect square and to a stated precision otherwise.

  • Free
  • No sign-up
  • Runs in your browser

Input

Runs in your browser

A whole number, a decimal, or a fraction such as 3/4. Arithmetic is exact, so fractions stay exact.

How many digits to show when the answer is irrational. An exact answer ignores this.

Banker’s rounding; the IEEE default

Try an example

Ready

Everything happens on this device. No upload, no account, no network request.

How to use this tool

  1. 1

    Enter the number.

  2. 2

    The square root is reported exactly when the number is a perfect square, and to the precision you set otherwise.

Questions about Square Root Calculator

What about the square root of a negative number?

It is not a real number, so the tool refuses it and explains why rather than returning NaN. The square root of -4 is 2i, an imaginary number; this tool works in the reals.

Does every number have two square roots?

Every positive number has two, one positive and one negative: both 4 and -4 square to 16. The square root symbol conventionally means the positive one, which is what is reported. When solving an equation such as x^2 = 16 you need both.

How does it know whether the answer is exact?

It checks with integer arithmetic whether the number is a perfect power before approximating anything. A fraction has a rational root only when its numerator and denominator are both perfect powers, so sqrt(9/4) is reported as exactly 1.5 while sqrt(9/5) is not.

Why do I get a different answer from a spreadsheet?

Almost always because the spreadsheet is using 64-bit floating-point arithmetic and this is not. Those numbers cannot represent 0.1 exactly, so errors accumulate: summing 0.1 ten times gives 0.9999999999999999. The difference is usually in the last digit or two, and this tool is the one without the error.

Is my data sent anywhere?

No. This runs as JavaScript in your browser tab: there is no network request carrying your numbers, nothing reaches a server log, and it keeps working with your connection off. You can confirm it in the browser’s network panel.

Other tools you might reach for next.