Connect via MCP →

Enter Calculation

Enter any real number (positive, negative or zero).

Formula

Advertisement

Results

0
Principal (positive) square root of 25
5
± 5 (both real roots)
Principal (positive) square root 5
Negative square root -5
Is a perfect square? Yes

What this calculator does

This tool finds the square root of any real number x. For a positive number it returns the principal (positive) root and the negative root, since both squared give x. For a negative number it returns the imaginary result, and for any input it tells you whether x is a perfect square.

How to use it

Type your number into the x = box. It can be positive, negative or zero, and can include decimals. Press calculate to see the principal root, the negative root (or the imaginary root if x is negative), and a Yes/No perfect-square verdict.

The formula explained

The square root \(r\) of \(x\) satisfies \(r^2 = x\). When \(x > 0\) there are two real solutions, \(+\sqrt{x}\) and \(-\sqrt{x}\), written \(\pm\sqrt{x}\). When \(x = 0\) the only root is 0. When \(x < 0\) no real root exists, so we compute \(\sqrt{\left|x\right|}\) and report \(\pm\sqrt{\left|x\right|}\,i\), where \(i\) is the imaginary unit (\(i^2 = -1\)).

A number is a perfect square only when it is a nonnegative integer whose square root is also an integer. To avoid floating-point error we round the root and square it back: if \(\operatorname{round}(\sqrt{x})^2\) equals \(x\), it is perfect.

Advertisement
A perfect square arranged as a full square grid versus a number that cannot form a square grid
A perfect square can be arranged as a complete square grid of unit cells; other numbers cannot.
Number line showing positive and negative square roots of x at equal distance from zero
Every positive number has two real square roots: the principal root r and its negative -r.

Worked example

For \(x = 81\):

$$\sqrt{81} = 9,\quad \text{so the roots are } \pm 9.$$

Because 9 is an integer and \(9 \times 9 = 81\), 81 is a perfect square. For \(x = 10\):

$$\sqrt{10} \approx 3.162278,\quad \text{so the roots are } \pm 3.162278,$$

and 10 is not a perfect square. For \(x = -9\): the result is \(\pm 3i\).

FAQ

Why are there two square roots? Because squaring removes the sign: both \((+r)^2\) and \((-r)^2\) equal \(x\).

Is 2.25 a perfect square? Its root 1.5 is rational, but 2.25 is not an integer, so this calculator reports No.

What about negative numbers? They have no real square root; the answer is imaginary, shown as \(\pm\sqrt{\left|x\right|}\,i\).

Last updated: