How to check an integer
- Enter one signed whole number. Up to 100 digits are accepted, so the test does not depend on floating-point precision.
- Choose Calculate or press Enter. The page checks the square and cube properties independently.
- A Yes result includes the exact integer root. For a No result, the context value is the integer root taken toward zero; square-root context stays nonnegative.
- Editing the number clears every result and copy state. Clear removes the input while keeping this page focused on the same two tests.
Perfect-square and perfect-cube rules
An integer n is a perfect square when some integer k satisfies k² = n. Integer squares are never negative, so a negative input cannot be a perfect square over the real integers.
An integer n is a perfect cube when some integer k satisfies k³ = n. Negative values may be perfect cubes because the cube of a negative integer is negative.
The checker finds roots by exact integer comparisons, not Math.sqrt or a rounded decimal approximation. Zero and one are both perfect squares and perfect cubes.
Examples
A number that is both: 64
64 = 8² and 64 = 4³, so both checks return Yes with exact roots 8 and 4.
A negative cube: −125
No real integer squared equals −125, but (−5)³ = −125. The square result is No and the cube result is Yes.
Neither: 20
Four squared is 16 and five squared is 25; two cubed is 8 and three cubed is 27. Therefore 20 is neither a perfect square nor a perfect cube.
Limits and interpretation
- Inputs are signed integers with at most 100 digits; decimals, fractions, and scientific notation are rejected.
- Negative integers are never marked as perfect squares, but they can be perfect cubes.
- The page performs only square and cube classification. It does not calculate arbitrary nth roots or simplify radicals.
- Displayed roots are exact when the answer is Yes. A floor root shown for No is context, not an approximate decimal root.
- The exact comparison avoids false positives caused by rounding very large floating-point values.
- Zero is included: 0² = 0 and 0³ = 0.
Frequently asked questions
Is 1 a perfect square and cube?
Yes. It equals 1² and 1³.
Can a negative number be a perfect square?
Not among real integers, because multiplying an integer by itself cannot produce a negative value.
Can a negative number be a perfect cube?
Yes. For example, −27 = (−3)³.
Why not use a decimal root?
A rounded decimal can misclassify a large value. Exact integer multiplication confirms the identity.
Is this a general root calculator?
No. It answers only the integer perfect-square and perfect-cube questions.