Skip to content
Other

Power of 2 Calculator

Enter any exponent and this calculator returns 2 raised to that power, the reciprocal, the log base 2 confirmation, and a computing context label for landmark values such as 1 KiB, 1 MiB, and 1 GiB. Positive, negative, zero, and decimal exponents are all supported. The show-your-work panel walks through the repeated-multiplication interpretation step by step.

Your details

The power to raise 2 to. Accepts positive integers, negative integers, zero, and decimals.
Integer mode restricts input to whole numbers and shows the full repeated-multiplication expansion for small values.
2^n
1,024

2 raised to the power of your exponent

Reciprocal (1 / 2^n)9.765625e-4
Log base 2 of result10
Computing context1,024 = 1 KiB
Fraction form1/1,024
10 exp
  • 1 KiB
  • 1 MiB
  • 1 GiB
  • 1 TiB
016k33k51015
Exponent (n)
2^n
Exponent (n)2^n
532
664
7128
8256
9512
101k
112k
124k
138k
1416k
1533k

2^10 = 1,024

  • Each time the exponent increases by 1, the result doubles. 2^11 = 2,048.
  • This is a computing landmark: 2^10 = 1,024 = 1 KiB.
  • A 10-bit unsigned integer can hold 2^10 = 1,024 distinct values (0 through 1,023).

Next stepTry negative exponents (e.g. -3) to explore reciprocals, or decimal exponents (e.g. 0.5) to find square roots of powers of 2.

Formula

2n(result),12n(reciprocal),log⁡2(2n)=n2^n \quad\text{(result)},\qquad \frac{1}{2^n} \quad\text{(reciprocal)},\qquad \log_2(2^n) = n

Worked example

2^10 = 2 × 2 × 2 × 2 × 2 × 2 × 2 × 2 × 2 × 2 = 1,024. Its reciprocal is 1/1,024 ≈ 0.0009766. log2(1,024) = 10, confirming the exponent.

What is a power of 2?

A power of 2 is the result of multiplying the number 2 by itself a given number of times. When you write 2^n (read "2 to the n"), n is called the exponent and it tells you how many times 2 appears in the multiplication. For example, 2^5 = 2 × 2 × 2 × 2 × 2 = 32. Powers of 2 grow extremely fast: each step up the exponent ladder doubles the previous result, which is why they appear so often in computer science, information theory, and mathematics.

Negative and decimal exponents

A negative exponent means "take the reciprocal of the positive power." So 2^-3 = 1/(2^3) = 1/8 = 0.125. A zero exponent always gives 1 for any nonzero base, so 2^0 = 1. Decimal (non-integer) exponents are also valid: 2^0.5 is the square root of 2, roughly 1.4142. Combining these rules lets you compute any real-valued power of 2, not just whole-number ones.

Powers of 2 in computing

Computer memory and data sizes are almost always expressed as powers of 2. This is because computers store information in binary, where each bit holds one of two states. One byte holds 8 bits, giving 2^8 = 256 possible values. One kibibyte (KiB) is 2^10 = 1,024 bytes. One mebibyte (MiB) is 2^20 bytes, one gibibyte (GiB) is 2^30 bytes, and one tebibyte (TiB) is 2^40 bytes. The IEC standardized these binary prefixes (kibi-, mebi-, gibi-, tebi-) in 1998 to distinguish them from the decimal kilo-, mega-, giga-, and tera- prefixes used in SI units.

The log base 2 connection

The logarithm base 2 (written log2 or lb) is the inverse operation of raising 2 to a power. If 2^n = x, then log2(x) = n. This means you can use log2 to find how many times you need to double 1 to reach any number. For instance, log2(1,024) = 10, confirming that 2^10 = 1,024. Log base 2 also tells you the minimum number of bits needed to represent n distinct values: a 256-color palette needs log2(256) = 8 bits.

Common powers of 2 in computing

Exponent (n)2^nComputing meaning
01Off / on in a single bit
12Two states (binary digit)
416Hexadecimal digit range
7128Half of a signed byte range
8256One byte (0-255)
101,0241 kibibyte (KiB)
1665,53616-bit address space
201,048,5761 mebibyte (MiB)
2416,777,21624-bit color (16.7 M colors)
301,073,741,8241 gibibyte (GiB)
324,294,967,29632-bit address space
401,099,511,627,7761 tebibyte (TiB)
6418,446,744,073,709,551,61664-bit unsigned integer max + 1

Landmark values programmers and engineers encounter daily. 1 KiB = 1024 bytes, 1 MiB = 1048576 bytes, and so on (IEC binary prefixes).

Frequently asked questions

What is 2 to the power of 10?

2^10 = 1,024. This number is known as one kibibyte (KiB) in computing and is a foundational constant in memory addressing. It is often approximated as "roughly one thousand," which is why older documentation sometimes called it 1 kilobyte, even though the SI kilo prefix technically means exactly 1,000.

What is 2 to the power of 0?

2^0 = 1. Any nonzero number raised to the exponent 0 equals 1. This follows from the exponent rules: 2^n / 2^n = 2^(n-n) = 2^0, and any number divided by itself is 1.

What is 2 to the power of a negative number?

A negative exponent means take the reciprocal of the corresponding positive power. So 2^-1 = 1/2 = 0.5, 2^-2 = 1/4 = 0.25, and 2^-8 = 1/256 ≈ 0.00390625. This is useful in probability, signal attenuation, and any calculation involving halving.

How do I check whether a number is a power of 2?

Take the log base 2 of the number. If the result is a whole number (integer), the original number is a power of 2. For example, log2(512) = 9, so 512 = 2^9. In programming, the bitwise trick (n & (n - 1)) == 0 also works for positive integers.

What is the difference between KiB and KB?

KB (kilobyte) uses the SI prefix kilo, meaning exactly 1,000 bytes. KiB (kibibyte) uses the IEC binary prefix kibi, meaning 2^10 = 1,024 bytes. Hard drives and network speeds are measured in decimal (KB, MB, GB), while RAM and operating systems traditionally use binary (KiB, MiB, GiB), which is why a "256 GB" drive appears smaller in your OS than advertised.

Sources

Written by Grace Mbeki, MSc Data Scientist & Educator · Nairobi, Kenya

Turning everyday numbers into clear, actionable answers for the decisions that matter most.

Search 3,500+ calculators

Loading search…