keepcalculator

06 Numbers and Powers

Calculate a Power of 2

Card No. 06·0028 · Updated · Standard formula, shown below

2 to the power n 1,024
2 to the power −n
0.000977
Result
Digits in 2ⁿ (whole n ≥ 0)
4 digits
Result
Exponent n
10
You entered
You enter
Exponent n
You get
2 to the power n, 2 to the power −n, Digits in 2ⁿ (whole n ≥ 0)
Rounding
0 dp · 6 dp

This calculator raises 2 to a power n. Enter the exponent and you get 2ⁿ, its reciprocal 2⁻ⁿ and the number of decimal digits in 2ⁿ, which is handy for bits, bytes and doubling problems.

Formula

2ⁿ means 2 multiplied by itself n times. 2⁻ⁿ = 1 ÷ 2ⁿ. For a whole number n ≥ 0, the count of decimal digits of 2ⁿ is ⌊n × log₁₀ 2⌋ + 1, with log₁₀ 2 ≈ 0.30103.

  • n: the exponent (whole numbers for counting; decimals also work for 2ⁿ)

Worked Example

n = 10.

  1. 2¹⁰ = 2 × 2 × … × 2 (ten times) = 1,024
  2. 2⁻¹⁰ = 1 ÷ 1,024 = 0.000977 (exactly 0.0009765625)
  3. 10 × 0.30103 = 3.0103; ⌊3.0103⌋ + 1 = 4 digits

Limits and common mistakes

  • Powers of 2 grow fast: 2²⁰ = 1,048,576 and 2³² = 4,294,967,296.
  • A kibibyte is 2¹⁰ = 1,024 bytes; a kilobyte is 1,000 bytes.
  • Above about 2⁵³ the browser can no longer show every digit exactly.
Formula used
in n | Exponent n | - | 10 | -64 | 64
out p | 2 to the power n | - | 2^n | 0
out inv | 2 to the power −n | - | 2^(-n) | 6
out dig | Digits in 2ⁿ (whole n ≥ 0) | digits | floor(n * log10(2)) + 1 | 0

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Photo collage: a chessboard with grains of rice doubling on the squares, and stacked wooden cubes.
Save this card: a 1000 × 1500 image of Calculate a Power of 2.

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →