How this calculation works
When the input is itself a square, the two square bounds coincide. The same rule applies independently to cubes.
Use floor and ceiling of √n and ∛n, then square or cube themA worked example
30 lies between 25 and 36 for squares and between 27 and 64 for cubes.
Good to know
Use a nonnegative whole number.
Reference: OpenStax Prealgebra (opens in a new tab) ↗
Bracket the input using integer roots
For 30, the square root is approximately 5.477. Taking the floor and ceiling of that root gives 5 and 6. Squaring these integers gives 25 and 36, which bracket the original input. The cube root is approximately 3.107, so the corresponding cube bases are 3 and 4, producing 27 and 64.
The calculator returns the value on each side, including equality. It does not select just one closest candidate. From 30, the square below is 5 units away and the square above is 6 units away. The cube below is 3 units away and the cube above is 34 units away.
Recognize exact powers and changing gaps
An input that is already a perfect square has identical lower and upper square bounds. At 36 both square bounds are 36. Its cube bounds are still 27 and 64 because 36 is not a perfect cube. An input can satisfy both tests, as 64 = 8² = 4³ does.
The gaps between successive squares grow as (k + 1)² − k² = 2k + 1. Successive cube gaps grow as 3k² + 3k + 1. This explains why the cube interval containing 30 is substantially wider than its square interval. The Floor and ceiling of a number calculator shows the rounding step that converts a root into the two integer bases used here.
A few questions, answered
What are the bounds for zero?
Both lower and upper squares and cubes are zero because 0² = 0³ = 0.
Are the neighbouring powers necessarily equally far away?
No. They bound the input but usually have different distances from it. Subtract the lower value and upper value separately to compare the gaps.