Home · Everyday · Bases, Binary & Logic · Power Mod Calculator

Power Mod Calculator

Computes a^b mod m — the remainder when a power is divided by a modulus — the core operation behind checksums and cryptography.

Your figures

Example result — edit the figures to make it yours

445

a^b mod m

Computed from the inputs on this page with the formula below — change any figure and every result updates.

a^b before reduction67,108,864

What this calculator does

Computes a^b mod m — the remainder when a power is divided by a modulus — the core operation behind checksums and cryptography. Where a measure is involved, US and metric units are both accepted — flip the unit toggle and the figures convert with the same definitions the formula uses. Every result on this page is computed from the formula stated below, with no hidden rounding steps.

The formula and method

result = a^b mod m

Modular exponentiation asks for the remainder of a^b on division by m. This page evaluates it directly — it forms the full power a^b and then reduces it mod m — and also shows the unreduced power so you can see what was divided.

Direct evaluation is fine for the small values used here, but a^b grows explosively: large exponents overflow floating point (past about 1.8×10³⁰⁸) and lose the exact remainder. Production code instead uses binary exponentiation with a reduction after every multiplication, keeping intermediates below m²; cryptographic libraries never form the full power.

Worked example

With the example inputs this page opens with (base a 4, exponent b 13, modulus m 497), the result is 445 — a^b mod m. Computed from the inputs on this page with the formula below — change any figure and every result updates.

Quick reference

Quick reference — varying Exponent b
Exponent ba^b mod ma^b before reduction
144
21616
36464
5301024
842965536
1344567108864

Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.

Common questions

Why do real systems not just compute a^b and then take the remainder?

Because a^b becomes astronomically large — a 2048-bit exponent would need more digits than atoms in the universe. Reducing after each squaring and multiply keeps every intermediate small.

How does the Power Mod Calculator work?

Computes a^b mod m — the remainder when a power is divided by a modulus — the core operation behind checksums and cryptography. Base a · Exponent b · Modulus m → a^b mod m. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.

What inputs does the Power Mod Calculator need?

Base a · Exponent b · Modulus m → a^b mod m. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.

Is the Power Mod Calculator free to use?

Yes. It runs entirely in your browser with no sign-up, and the same calculator is available as an embeddable widget via the Embed button, so it can be placed on another site with its calculation intact.