What is a Perfect Square?
A perfect square is a whole number that is the product of an integer multiplied by itself. For example, 1, 4, 9, 16, 25 and 144 are perfect squares because they equal \(1^2\), \(2^2\), \(3^2\), \(4^2\), \(5^2\) and \(12^2\) respectively. This Perfect Square Calculator instantly tells you whether any whole number you enter is a perfect square, and shows its exact square root.
How to Use the Calculator
Type any non-negative whole number into the input box and submit. The tool computes the square root, takes the floor (the largest integer not greater than the root), squares it, and compares the result to your original number. If they match, the number is a perfect square; otherwise it is not.
The Formula Explained
The test is: \(n\) is a perfect square if and only if $$\left\lfloor \sqrt{n} \right\rfloor^{2} = n$$ where \(\lfloor x \rfloor\) denotes the floor function. We first take the square root of \(n\), round it down to the nearest whole number, then square that whole number. Because every perfect square has an exact integer root, this comparison is reliable for integers.
Worked Example
Consider \(n = 144\). The square root of 144 is exactly 12, so \(\left\lfloor \sqrt{144} \right\rfloor = 12\). Squaring gives $$12^2 = 144$$ which equals the original number — so 144 is a perfect square. Now try \(n = 150\): \(\sqrt{150} \approx 12.247\), \(\lfloor 12.247 \rfloor = 12\), and \(12^2 = 144 \neq 150\), so 150 is not a perfect square.
FAQ
Is 0 a perfect square? Yes. \(0 = 0^2\), so zero is considered a perfect square.
Can negative numbers be perfect squares? No. The square of any real integer is non-negative, so negative numbers are never perfect squares.
What about decimals? Perfect squares are defined for whole numbers. Decimal values are floored to the nearest integer before testing.