Lelifi·tools

Base Calculator

Decimal 212 is 21212 in base 3, 1322 in base 5, 324 in base 8 and D4 in base 16 all at once. Each digit is worth 3, 5, 8 or 16 times the place to its right.

Convert one number between any two bases from 2 to 36, or add, subtract and multiply inside a single base. Everything runs in your browser.

All math runs in your browser. Nothing you type is uploaded.

212 in base 10 = 21212 in base 3
Decimal value: 212
21212 = 2 x 81 + 1 x 27 + 2 x 9 + 1 x 3 + 2 x 1
Base 2: 11010100 | Base 5: 1322 | Base 8: 324 | Base 16: D4

Convert between any two bases from 2 to 36, or run addition, subtraction and multiplication inside one base, with every carry shown.

By the Lelifi editors ·

Key takeaways

The same number, 212, in four basesbase 2: 11010100 (8 digits)base 3: 21212 (5 digits)base 5: 1322 (4 digits)base 12: 120A (4 digits)base 16: D4 (2 digits)The bigger the base, the fewer digits it takes to write the same amount.
A larger base packs the same value into fewer digits.
the same amount in four basesbase 2base 1021210→20261322→2123752→2026120→144
Every base spelling folds back to the same base 10 value.
On this page
  1. What a number base is
  2. Reading a number out of its base
  3. 2026 in six bases, side by side
  4. Doing arithmetic without converting to base 10
  5. Bases bigger than 10, and base 36
  6. Base 12, base 20 and the other systems people have used through history
  7. Mistakes that turn a right answer wrong

What a number base is

A base, sometimes called a radix, is the number of single symbols a counting system uses. Base 10 has the ten digits 0 through 9, and each place is worth ten times the place to its right. Base 3 uses only 0, 1 and 2, base 5 uses 0 through 4, and base 16 adds A through F so it can reach fifteen in one symbol. The NIST reference on number systems covers the prefixes that grew out of base 2 counting in computing.

The digit in a position tells you how many of that place value to count. In base 5, the number 342 reads as three 25s, four 5s and two 1s: 3 x 25 + 4 x 5 + 2 = 97 in base 10. Same idea as 97 in base 10 being nine 10s and seven 1s, just with different place values.

One rule never bends: a digit in base b is always smaller than b. There is no digit 5 in base 5, no digit 8 in base 8, and no digit 16 in base 16. When a column would need that digit, it carries instead, exactly the way 9 plus 1 becomes 10 in decimal.

Reading a number out of its base

To convert a number written in base b into base 10, multiply each digit by its place value and add. Work left to right and you can fold it into one pass: start at 0, and for each digit multiply your running total by b, then add the digit.

Take 21212 in base 3. Walk the digits: 0 x 3 + 2 = 2; 2 x 3 + 1 = 7; 7 x 3 + 2 = 23; 23 x 3 + 1 = 70; 70 x 3 + 2 = 212. Five digits, five steps, and the answer is the decimal number 212. The table shows the same trip place by place:

DigitPlace value (base 3)Contribution
281 (3 to the 4th)162
127 (3 to the 3rd)27
29 (3 to the 2nd)18
133
212
Sum212

The reverse trip, base 10 into base b, divides over and over. To write 212 in base 5: 212 / 5 is 42 remainder 2, 42 / 5 is 8 remainder 2, 8 / 5 is 1 remainder 3, 1 / 5 is 0 remainder 1. Read the remainders bottom to top and you get 1322 in base 5. Check it: 1 x 125 + 3 x 25 + 2 x 5 + 2 = 212.

2026 in six bases, side by side

One number, six spellings. This is the table to keep handy when a homework problem jumps between bases:

Base2026 written in that baseDigits usedWhere you meet it
21111110101011computers, logic
322100017balanced ternary puzzles, homework
5311015place value practice
837524older Unix file permissions
12120A4clocks, dozens
167EA3memory addresses, color codes

Verify the base 12 line: 2026 / 12 = 168 remainder 10; 168 / 12 = 14 remainder 0; 14 / 12 = 1 remainder 2; 1 / 12 = 0 remainder 1. Read the remainders bottom to top: 120A in base 12, where A stands for the digit ten. Check: 1 x 1728 + 2 x 144 + 0 x 12 + 10 = 2026. Writing ten as a two digit 10 inside a base 12 number is the classic slip: 12010 is not a valid base 12 spelling because its digits must stay below 12.

The lesson is the same for every base: always rebuild the number after converting, because a slip in one remainder changes every digit to its left.

Doing arithmetic without converting to base 10

You can add, subtract and multiply inside any base, and students are often asked to. The only change from decimal is what a full column means. In base 5, a column overflows at 5, not 10.

Add 2034 and 342, both in base 5. Right column: 4 + 2 = 6, which is 11 in base 5 (one 5 and one 1), so write 1 and carry 1. Next column: 3 + 4 + the carried 1 = 8, which is 13 in base 5, so write 3 and carry 1. Next: 0 + 3 + 1 = 4, write 4. Last: 2 + nothing = 2. The sum is 2431 in base 5. Check through base 10: 2034 is 269, 342 is 97, and 269 + 97 = 366, which written in base 5 is 2431.

Multiplication works the same way. 342 times 134 in base 5: through base 10 it is 97 x 44 = 4268, and 4268 written in base 5 is 114033. If you multiply inside base 5, each partial product carries when a column reaches 5, and the partial products add with the same rule as above.

Subtraction borrows b instead of 10. In base 5, subtracting 342 from 2034: the units column needs 4 minus 2, which is 2. The 5s column needs 3 minus 4, so borrow one 25 from the next place: 3 + 5 = 8, 8 minus 4 = 4, and the 25s column drops from 0 to 4 (it lent one of its 5s, and in base 5 that 25 was worth five 5s). The final answer is 1142 in base 5, which checks as 269 minus 97 = 172, and 172 in base 5 is 1142.

Bases bigger than 10, and base 36

Once a base passes 10, digits run out and letters take over: A is 10, B is 11, and so on up to Z as 35. Base 16 stops at F, base 32 stops at V, and base 36 uses every letter. The calculator accepts all of them.

D4 in base 16 is 13 x 16 + 4 = 212, the same 212 from the opening example. In base 12, 1A0 is 1 x 144 + 10 x 12 + 0 = 264. In base 36, ZZZ is 35 x 1296 + 35 x 36 + 35 = 45360 + 1260 + 35 = 46655.

Two bases past 10 matter outside homework. MathWorld covers the general theory, and in practice base 16 appears in memory addresses and color codes, while base 36 appears in URL shorteners, because packing more per character makes shorter links. The Purdue CS notes on number representation walk through why hardware favors base 2.

Base 12, base 20 and the other systems people have used through history

Base 10 won because of fingers, not because of any mathematical advantage. Other bases left deep marks:

SystemBaseWhat survives today
Babylonian6060 minutes and 60 seconds in an hour, 360 degrees
Mayan20Word roots in some Mesoamerican languages
Duodecimal1212 inches in a foot, 12 hours on a clock, a dozen eggs
Binary2Every computer ever built
Hexadecimal16Color codes, MAC addresses, memory dumps

Base 60 is the quiet champion: 60 divides by 1, 2, 3, 4, 5, 6, 10, 12, 15, 20 and 30, which is why fractions of an hour stay whole numbers so often. The origin of the 60 minute hour traces back to Sumerian counting, as described in the Duncan and trace histories of timekeeping.

Mistakes that turn a right answer wrong

Most wrong answers in base problems come from four habits:

MistakeExampleWhat to do instead
Reading a digit that cannot existWriting 5 in base 5The biggest digit in base b is b minus 1
Carrying at 10 out of habitBase 5: 4 + 2 = 6 written as 66 is 11 in base 5; carry when the column reaches 5
Reading remainders top to bottom212 to base 5 read as 2231Remainders come off bottom to top: 1322
Skipping the checkAny conversionRebuild the number with place values after every conversion

The last row is the cheap insurance. A conversion takes ten seconds to check by multiplying back out, and it catches the errors the other three rows cause. The calculator above does the check for you on every conversion, which is also why its answers come back with the place values listed.

Frequently asked questions

How do I convert a number to a different base?

To go into base 10, multiply each digit by its place value and add. To go out of base 10, divide by the new base repeatedly and read the remainders bottom to top. 212 to base 5: 212 / 5 = 42 r2, 42 / 5 = 8 r2, 8 / 5 = 1 r3, 1 / 5 = 0 r1, so 1322.

What is 212 in base 3?

21212. Check it: 2 x 81 + 1 x 27 + 2 x 9 + 1 x 3 + 2 = 162 + 27 + 18 + 3 + 2 = 212.

How do I add numbers in base 5?

Same column method as decimal, but carry when a column reaches 5. 2034 + 342 in base 5: the units give 4 + 2 = 6 = 11 base 5, write 1 carry 1, and the sum finishes as 2431. Through base 10 it is 269 + 97 = 366.

What is the largest digit in a base?

One less than the base. Base 3 tops out at 2, base 5 at 4, base 8 at 7, base 16 at F which is 15, and base 36 at Z which is 35.

Why does hexadecimal use letters?

Because base 16 needs sixteen symbols and we only have ten digits. A through F cover 10 through 15, so D4 in hex is 13 x 16 + 4 = 212. Above base 16 the alphabet keeps going up to Z for 35 in base 36.

What is base 12 arithmetic used for?

Clocks, inches in a foot, and dozens. Base 12 fans point out that 12 divides by 2, 3, 4 and 6 while 10 divides only by 2 and 5. The base 12 spelling of 2026 is 120A: 1 x 1728 + 2 x 144 + 0 x 12 + 10 = 2026, with A standing for ten.

Is base 1 a thing?

Not for ordinary place value. Base 1 is tally marks, where a number is just that many strokes, so 5 is five marks with no place values. Every real positional base starts at 2.

What does 2026 look like in base 2 and base 16?

11111101010 in base 2 and 7EA in base 16. They are the same number: 1024 + 512 + 256 + 128 + 64 + 32 + 8 + 2 = 2026, and 7 x 256 + 14 x 16 + 10 = 2026.

How do I check a base conversion?

Rebuild the number with place values after converting. If you converted 212 to base 5 as 1322, compute 1 x 125 + 3 x 25 + 2 x 5 + 2 = 212 and you have proof.

Why is 6 x 9 = 42 only in base 13?

Because 42 in base 13 is 4 x 13 + 2 = 54, and 6 x 9 is 54. The joke from The Hitchhiker's Guide works since 54 written in base 13 spells 42. The base has to be larger than the biggest digit, which is why base 13 is the smallest one where the trick works.

How do computers use number bases?

Everything in memory is base 2 at the hardware level, and programmers read it through base 16 because one hex digit is exactly four bits. The byte 11111101 reads as FD in hex, which is 253 in decimal.

What is a positional number system?

One where the position of a digit sets its worth. In 342 base 5, the 3 is worth 3 x 25 because it sits in the 25s place. Roman numerals are not positional, which is one reason arithmetic on them is painful.

Can this calculator handle negative or fractional numbers?

It handles whole numbers from 0 upward, in bases from 2 to 36. Fractional values in other bases work with negative place values (the first place after the point is worth 1/b), but that is a separate topic this page does not compute.

What is the difference between base and radix?

None. Radix is the Latin word for root, and base is the everyday English word for the same count of symbols. You will see radix in documentation and base in homework.

Spotted a wrong number or a broken result?

More Math tools

See all Math tools

Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.