Maths & numbers

Integer nth root remainder calculator for large integers

Large integer roots need an exact decision at the boundary of a perfect power.

Your numbers

At most 500 decimal digits; no scientific notation.
Integer 1–1,000.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Large integer roots need an exact decision at the boundary of a perfect power. Floating-point logarithms can place a value just below or above that boundary on the wrong side. This calculator searches with integer powers and returns the floor root, the exact remainder and two bounding powers. The certificate establishes the answer even when the radicand has hundreds of decimal digits.

THE FORMULAr=floor(n^(1/k)), remainder=n−r^k, with exact certificate r^k≤n<(r+1)^k.

A worked example

For n=100000 and k=5, the root is 10 because 10⁵=100000 and 11⁵=161051. The remainder is zero, so the input is a perfect fifth power. Changing n to 100001 keeps the floor root at 10 but makes the remainder one. Changing n to 99999 lowers the floor root to nine, whose fifth power is 59049.

Good to know

Radicands are nonnegative base-ten integers of at most 500 digits; orders are integers from 1 through 1,000. Negative radicands are outside this input family, including odd-order negative roots. The result is an integer bracket rather than a decimal approximation to an irrational root. The exact next bounding power can have more digits than the original input.

A remainder gives more information than a rounded decimal

The remainder is n−r^k, so it is always nonnegative. It vanishes exactly when the radicand is a kth power of a nonnegative integer. A small remainder does not directly measure a small relative error in the root, because the gap between successive kth powers depends on both r and k. The bracketing table gives the correct scale for that comparison.

The upper inequality is strict. If n=(r+1)^k, the proposed r is too small and must increase. This distinction matters most near exact powers, where a rounded decimal root may display an integer even for nearby nonpowers. Exact integer comparison avoids interpreting a formatting artifact as a mathematical equality.

Exact fifth powers bracket one hundred thousand10⁵ = 10000011⁵ = 161051r = 10; n − r⁵ = 0
The floor fifth root of 100000 is 10: 10⁵=100000, while 11⁵=161051 is strictly greater. The remainder is zero. The horizontal spacing is schematic, not a linear scale.

The Neighbouring perfect squares and cubes calculator locates nearby square and cube powers. This page returns a floor root and exact remainder for any supported integer order.

Bound the search without trusting a floating logarithm

The bit length of n supplies a safe power-of-two upper bound for the root. If n has b bits, choosing an upper root bound 2^ceil(b/k) guarantees its kth power exceeds n. Binary search then compares each candidate kth power directly with n, shrinking the interval until adjacent integer candidates remain.

Only the integer bit length and integer exponentiation decide the comparisons. The algorithm does not approximate log(n)/k and round the result back to an integer. That separation is valuable for very large inputs and for exponents whose true root lies extremely close to an integer. Intermediate powers remain bounded by the supported digit and exponent limits.

Handle zero, one and order one before the general search

The kth root of zero is zero for every supported positive order, with next power one. The kth root of one is one, with next power 2^k. For k=1, the floor root is the input itself and the remainder is always zero. These cases have exact answers without any iterative search and test the certificate conventions directly.

For n>1 and an order larger than the number’s binary logarithm, the floor root can still be one. That is not an underflow or a loss of decimal precision: the next integer candidate two already has kth power larger than n. The page deliberately rejects fractional orders and signed odd-root extensions so that its nonnegative integer certificate remains the single supported contract.

A few questions, answered

Is the root rounded to the nearest integer?

No. It is the floor root, the greatest nonnegative integer whose kth power does not exceed n.

Can I use this as a perfect-power test?

Yes for a chosen positive integer order k: remainder zero certifies an exact kth power. It does not automatically search every possible order.

Find your calculator

Start typing to explore the library.