What Is a Perfect Square?
A perfect square is a whole number that can be written as the product of an integer with itself. For example, 49 is a perfect square because \(7 \times 7 = 49\), and 144 is a perfect square because \(12 \times 12 = 144\). Numbers like 50 or 2 are not perfect squares because no integer multiplied by itself produces them. This calculator instantly tells you whether any whole number you enter is a perfect square, and if so, which integer it is the square of.
How to Use the Calculator
Type any non-negative whole number into the input box and submit. The tool computes the square root, takes its floor (the largest integer not greater than the root), squares that integer, and compares it to your original number. If they match exactly, the number is a perfect square and the exact integer root is displayed. Otherwise it reports that the number is not a perfect square along with its approximate (irrational) square root.
The Formula Explained
The test relies on a simple identity: a non-negative integer n is a perfect square if and only if
$$\text{Perfect Square} \iff \left(\left\lfloor \sqrt{\text{Number}} \right\rfloor\right)^{2} = \text{Number}$$Here \(\left\lfloor \sqrt{n} \right\rfloor\) means we take the square root and round down to the nearest integer. Squaring that integer and checking against n avoids floating-point rounding problems that a direct equality check on the raw square root might cause.
Worked Example
Take \(n = 144\). Its square root is 12.0, the floor is 12, and
$$12^{2} = 144$$which equals n — so 144 is a perfect square. Now take \(n = 150\). Its square root is about 12.247, the floor is 12, and
$$12^{2} = 144 \neq 150$$so 150 is not a perfect square.
FAQ
Is 0 a perfect square? Yes. \(0 = 0 \times 0\), so zero is considered a perfect square.
Are negative numbers perfect squares? No. Squaring any real number gives a non-negative result, so negative inputs are never perfect squares.
What if I enter a decimal? The calculator rounds your input to the nearest whole number before testing, since perfect squares are defined for integers.