Base-N to Base-10 Converter
Convert a number in any base from 2 to 36 into decimal (base 10), including fractional digits, negative numbers and very long values, with each digit’s place value, Horner’s-method steps, the exact fraction, two’s-complement reading and the same number in binary, octal, hex or any other base.
How it works
value₁₀ = Σ dᵢ × base^placeᵢ (rightmost whole digit: place 0; digits after the point: places −1, −2, …) · Horner: v = (…((d₁ × base + d₂) × base + d₃)…) · two’s complement: v − 2ⁿ when the top bit is 1
Any positional number is a sum of its digits times powers of the base. In base 16 the number 1A3 means 1 × 16² + 10 × 16¹ + 3 × 16⁰, and converting to decimal just carries out that weighted sum. Digits above 9 use letters, so A = 10, F = 15 and Z = 35, which is why 36 is the largest base. Digits after a point have negative places, so in binary 0.1 is 2⁻¹ = 0.5. Horner’s method gives the same answer with less work: start with the first digit, then repeatedly multiply by the base and add the next digit. The converter uses exact whole-number arithmetic, so long values such as a 64-bit hex number come out with every digit correct. A fractional part is also given as an exact fraction, with repeating decimals marked in brackets. Under More options you can read the value as a signed two’s-complement number and convert it on to any other base, with a repeated-division table.
Worked example
Convert 1A3 from base 16: A represents 10. The value is 1 × 16² + 10 × 16¹ + 3 × 16⁰ = 256 + 160 + 3 = 419. By Horner’s method: 1 × 16 + 10 = 26, then 26 × 16 + 3 = 419. A binary number with a fractional part: 101.101₂ = 4 + 0 + 1 + 1/2 + 0 + 1/8 = 5.625 = 45/8. In base 3, 0.1₃ = 1/3 = 0.(3). Read as an 8-bit two’s-complement value, FF₁₆ = 255 is −1.
Sources: Positional notation — Wikipedia · Two’s complement — Wikipedia · Horner’s method — Wikipedia
Frequently asked questions
What do the letters A–Z mean in a number?
When a base is larger than 10, single digits above 9 are written as letters: A = 10, B = 11, up to Z = 35. Hexadecimal (base 16) uses A–F for 10–15; base 36 uses the full A–Z range, which is why 36 is the maximum base here. Upper and lower case are treated the same.
How does place value work in other bases?
Exactly like base 10, but with the base as the multiplier. The rightmost whole-number digit is worth base⁰ = 1, the next base¹, then base², and so on. Digits after the point are worth base⁻¹, base⁻², … You multiply each digit by its place value and add the results.
Why did I get an "invalid digit" error?
Every digit must be smaller than the base. In base 2 only 0 and 1 are allowed; in base 8 only 0–7. If you enter an 8 in a binary number, or a letter beyond the base’s range, the converter rejects it rather than producing a wrong answer.
Can it convert numbers with a fractional part?
Yes. Type a point between the whole and fractional digits, such as 11.01 in base 2 (= 3.25) or 0.8 in base 16 (= 0.5). Some fractions do not end in decimal — 0.1 in base 3 is 1/3 = 0.333… — so the exact fraction is shown too.
What is two’s complement?
It is how computers store negative whole numbers in a fixed number of bits. If the top bit is 1, the value is the plain number minus 2ⁿ, where n is the bit width. In 8 bits, FF (255) means −1 and 80 (128) means −128. Switch on “Read as signed” under More options to see this reading.
How large a number can I convert?
Up to 256 digits. The converter uses exact integer arithmetic, so FFFFFFFFFFFFFFFF in base 16 gives exactly 18,446,744,073,709,551,615 — ordinary calculators often round values that large.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.