What Is the Power of 2 Calculator?
The Power of 2 Calculator computes 2 raised to the power of n, written as \(2^{n}\). Powers of two appear everywhere in computing — memory sizes, binary numbers, data structures, and storage units (kilobytes, megabytes, gigabytes) are all built on them. This tool gives you the exact value for any exponent, including negative exponents and decimals.
How to Use It
Enter the exponent n in the input box and submit. The calculator returns \(2^{n}\). Use whole numbers like 10 or 16 for typical binary calculations, negative numbers like -3 for fractions (\(2^{-3} = 0.125\)), or decimals like 0.5 for roots (\(2^{0.5} \approx 1.414\), the square root of 2).
The Formula Explained
The formula is simply $$\text{result} = 2^{n}$$ Multiplying 2 by itself n times doubles the value with each step: \(2^{1}=2\), \(2^{2}=4\), \(2^{3}=8\), and so on. For negative exponents, \(2^{-n} = 1 \div 2^{n}\). For fractional exponents, \(2^{1/2}\) equals the square root of 2.
Worked Example
Suppose you want to know how many distinct values can be stored in 10 bits. That is \(2^{10}\). Calculating: $$2 \times 2 \times \dots \text{ (ten times)} = 1{,}024$$ So 10 bits can represent 1,024 different values — which is also why a kilobyte is often defined as 1,024 bytes.
Powers of 2 Reference Table (2^0 to 2^32)
Each step up in the exponent doubles the value: \(2^{n} = 2 \times 2^{n-1}\). The table lists exact integer values for \(n = 0\) to \(32\), plus \(n = 40, 50, 64\).
| n | 2^n | n | 2^n |
|---|---|---|---|
| 0 | 1 | 17 | 131,072 |
| 1 | 2 | 18 | 262,144 |
| 2 | 4 | 19 | 524,288 |
| 3 | 8 | 20 | 1,048,576 |
| 4 | 16 | 21 | 2,097,152 |
| 5 | 32 | 22 | 4,194,304 |
| 6 | 64 | 23 | 8,388,608 |
| 7 | 128 | 24 | 16,777,216 |
| 8 | 256 | 25 | 33,554,432 |
| 9 | 512 | 26 | 67,108,864 |
| 10 | 1,024 | 27 | 134,217,728 |
| 11 | 2,048 | 28 | 268,435,456 |
| 12 | 4,096 | 29 | 536,870,912 |
| 13 | 8,192 | 30 | 1,073,741,824 |
| 14 | 16,384 | 31 | 2,147,483,648 |
| 15 | 32,768 | 32 | 4,294,967,296 |
| 16 | 65,536 | 40 | 1,099,511,627,776 |
| 50 | 1,125,899,906,842,624 | ||
| 64 | 18,446,744,073,709,551,616 | ||
Common uses: \(n\) bits can represent \(2^{n}\) distinct values, so 8 bits (one byte) give 256 values and 16 bits give 65,536. An \(n\)-bit address space holds \(2^{n}\) addresses: 32-bit addressing covers 4,294,967,296 bytes (4 GiB), and 64-bit addressing covers about 1.84 × 1019 bytes. Memory sizes and buffer sizes are usually powers of 2 for the same reason.
Binary vs Decimal Storage Units
The IEC binary prefixes (KiB, MiB, GiB, …) are exact powers of 2, while the SI decimal prefixes (KB, MB, GB, …) are powers of 10. The relative difference is \(\frac{2^{10k}}{10^{3k}} - 1\) for level \(k\), and it grows with each level.
| Level | Binary unit | Bytes (binary) | Decimal unit | Bytes (decimal) | Binary is larger by |
|---|---|---|---|---|---|
| Kilo | 1 KiB = 2^10 | 1,024 | 1 KB = 10^3 | 1,000 | ≈ 2.4% |
| Mega | 1 MiB = 2^20 | 1,048,576 | 1 MB = 10^6 | 1,000,000 | ≈ 4.9% |
| Giga | 1 GiB = 2^30 | 1,073,741,824 | 1 GB = 10^9 | 1,000,000,000 | ≈ 7.4% |
| Tera | 1 TiB = 2^40 | 1,099,511,627,776 | 1 TB = 10^12 | 1,000,000,000,000 | ≈ 10.0% |
| Peta | 1 PiB = 2^50 | 1,125,899,906,842,624 | 1 PB = 10^15 | 1,000,000,000,000,000 | ≈ 12.6% |
This is why a drive sold as 1 TB (1012 bytes) appears as roughly 0.91 TiB in software that reports in binary units.
Common Exponent Scenarios
Negative exponents give reciprocals (\(2^{-n} = \frac{1}{2^{n}}\)), and fractional exponents give roots (\(2^{0.5} = \sqrt{2}\)).
| Exponent n | Result 2^n | Typical meaning |
|---|---|---|
| -3 | 0.125 | \(\frac{1}{8}\); three successive halvings (e.g. 1/8 note or 1/8 scale) |
| -1 | 0.5 | One half |
| 0 | 1 | Any non-zero number to the power 0 is 1 |
| 0.5 | ≈ 1.41421 | \(\sqrt{2}\); the diagonal of a unit square |
| 8 | 256 | Distinct values in one byte (0–255) |
| 10 | 1,024 | Binary "kilo" (1 KiB in bytes) |
| 16 | 65,536 | Number of TCP/UDP port numbers (0–65535); values in an unsigned 16-bit integer |
| 32 | 4,294,967,296 (≈ 4.29 billion) | Size of the IPv4 address space; values in an unsigned 32-bit integer |
FAQ
What is 2 to the power of 0? Any nonzero number raised to the power 0 equals 1, so \(2^{0} = 1\).
Can I use negative exponents? Yes. \(2^{-2} = 1/4 = 0.25\).
Can I use decimal exponents? Yes. For example \(2^{0.5} \approx 1.41421\), the square root of 2.