What this calculator does
A perfect square is a number produced by multiplying a whole number by itself: 49 is a perfect square because it is 7 × 7, but 50 is not, because no whole number squared lands exactly on it. This calculator tests any number and, when it is not a perfect square, shows the two perfect squares it sits between.
The square root is the quickest way to check: if √x comes out as a whole number, x is a perfect square, and if it does not, x is not one. That single test is really all a perfect square is, but working out the nearest perfect squares either side takes an extra step most people do not bother with by hand, which is where this calculator saves the arithmetic.
The formula
The square root of the entered number is calculated first. If it is a whole number, the number is a perfect square and that root is exact. Otherwise, the root is rounded down and up to the nearest whole numbers, and each of those is squared again to find the perfect squares immediately below and above the original number.
| Term | Meaning |
|---|---|
| Perfect square | A number equal to some whole number multiplied by itself. |
| Square root (√x) | The value that, multiplied by itself, gives x; a whole number exactly when x is a perfect square. |
| Nearest perfect square | The closest perfect square below (or equal to) and above the number entered. |
The inputs explained
| Field | What to enter |
|---|---|
| Number | Enter any number of zero or more; negative numbers have no real square root, so are not accepted. |
When to use it
Simplifying a square root by hand
Spotting the largest perfect square that divides evenly into a number under a square root sign is the standard way to simplify it, and checking candidate factors against this calculator speeds that search up.
Checking a homework or exam answer
A claim that a particular number is or is not a perfect square is easy to verify here rather than working the square root out by long division.
Laying out objects in a square grid
Whether a given count of items can be arranged into an exact square grid, with no rows left short, comes down to exactly this perfect-square test.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
Is a number a perfect square, and what are the nearest ones either side?
The same check applied across a mix of perfect squares and non-squares.
| Number | Is it a perfect square? | Square root | Nearest perfect square below | Nearest perfect square above |
|---|---|---|---|---|
| 49 | Yes | 7 | 49 = 7² | 64 = 8² (the next one after 49) |
| 50 | No | 7.071 (not a whole number) | 49 = 7² | 64 = 8² |
| 99 | No | 9.950 (not a whole number) | 81 = 9² | 100 = 10² |
| 100 | Yes | 10 | 100 = 10² | 121 = 11² (the next one after 100) |
| 150 | No | 12.247 (not a whole number) | 144 = 12² | 169 = 13² |
| 225 | Yes | 15 | 225 = 15² | 256 = 16² (the next one after 225) |
Questions
Is 0 a perfect square?
Yes. 0 is 0 × 0, so it satisfies the definition, even though it is a boundary case people sometimes overlook. This calculator accepts 0 as a valid, if unusual, perfect square.
Can a negative number be a perfect square?
No, not among real numbers. Squaring any real number, positive or negative, always produces a result of zero or more, so no negative number can be the square of a real whole number.
How many perfect squares are there up to a given number?
It is the whole-number part of the square root of that number. For example, there are 12 perfect squares from 1 up to 150 (1² through 12², since 12² = 144 and 13² = 169 is past it), which this calculator's "nearest below" figure confirms directly.
Is every even number's square also even?
Yes, and the same pattern holds for odd numbers: an even number squared is always even, and an odd number squared is always odd, which is a quick sanity check before even calculating the exact root.
For the related test of whether a number is instead the sum of its own divisors, see the perfect number calculator. To find every triangular number that also happens to satisfy the perfect-square test on 8n+1, use the triangular numbers calculator.