Perfect Square Checker
Enter a number to check whether it is a perfect square.
Result
How it is calculated
For a whole number n, the tool takes the square root, rounds it to the nearest integer r, then corrects r up or down until r² ≤ n < (r + 1)², so floating-point rounding cannot cause a wrong answer on large values. n is a perfect square exactly when r × r = n. The first output is Yes or No. The second output is the square root to four decimals: a whole number such as 42.0000 for a perfect square, otherwise the decimal root. Numbers that are negative or have a fractional part always return No, even when the decimal is a square of another decimal: 2.25 gives No with root 1.5000. For a negative number the root is shown as 0.0000, since no real square root exists.
Worked example
Check n = 1764. The square root is about 42, so r = 42. Square it: 42 × 42 = 1,764, which equals n, and the bounds also hold since 1,764 < 43² = 1,849. Therefore 1764 is a perfect square. The tool shows Yes for the square test and 42.0000 for the root. Compare 1765: r is still 42 and 42² = 1,764 is not 1,765, so the answer is No and the root displays as the decimal 42.0119.
Common mistakes
- Reading the answer as a count. It is a yes/no answer: Yes means the number is a perfect square, No means it is not.
- Expecting 2.25 or 0.25 to be accepted because their roots are 1.5 and 0.5. Here only whole numbers can be perfect squares, so decimals return No.
- Typing a thousands separator. 1,764 gives no result at all, and 1.764 is read as the decimal 1.764, which returns No. Enter plain digits.
- Treating a root with decimals as an error. For a non-square the root shown (such as 42.0119) is the ordinary decimal square root, not an integer.
- Assuming a negative number gives a root of 0. The 0.0000 shown for negative input is a placeholder, and the number is simply not a perfect square.
About this calculator
The perfect square checker tests whether an integer n can be written as m² for some integer m, by computing the integer square root of n and checking whether squaring it returns n exactly. If it is a perfect square, the calculator returns m — its exact square root; if not, it reports that no integer square root exists.
Perfect squares (1, 4, 9, 16, 25, 36, …) show up throughout number theory and are a quick sanity check in Diophantine problems, Pythagorean-triple searches, and Fermat's factorization method, which works by testing whether a² − n is a perfect square for successive a. Students studying number theory, programmers writing math-heavy algorithms, and puzzle solvers use this checker to test candidates quickly instead of estimating square roots by hand.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
Before you reach for the tool, there is a fast elimination test. A perfect square can only end in 0, 1, 4, 5, 6 or 9, and it leaves a remainder of 0 or 1 when divided by 4. A number ending in 2, 3, 7 or 8 is out at once. Passing those tests proves nothing, which is where the exact check here comes in. Do you have a favourite shortcut for ruling out non-squares by hand?