Number base converter

MA-04Math

Convert numbers between decimal, binary, octal and hexadecimal.

Octal (8)
377
Decimal (10)
255
Hexadecimal (16)
FF

Last updated: October 2026 · Report a calculation error

How to convert numbers between bases

In decimal each position is a power of 10, in binary a power of 2, in octal a power of 8 and in hexadecimal a power of 16 (digits 0–9 and letters A–F). For example 255 in decimal is 11111111 in binary, 377 in octal and FF in hex.

The converter works with integers of any size — it uses BigInt arithmetic, so no digits are lost on very long numbers.

Binary to decimal step by step

Replace every 1 with the value of its position (from the right: 1, 2, 4, 8, 16, 32…) and add them up: 1101₂ = 8 + 4 + 0 + 1 = 13. The other way, divide by 2 and write the remainders from last to first: 13 → 6 r1 → 3 r0 → 1 r1 → 0 r1, giving 1101.

DecimalBinaryHex
101010A
151111F
161000010
25511111111FF
2026111111010107EA

Where you’ll meet these bases

  • Hexadecimal — CSS colours (#FF8800), memory addresses, MAC addresses, checksums.
  • Binary — bits, subnet masks, flags and permissions in programming.
  • Octal — Linux file permissions (chmod 755).

Frequently asked questions

What is FF in decimal?

255 — F is 15, so FF = 15 × 16 + 15 = 255.

Does letter case matter in hex?

No — “ff” and “FF” are the same number. The converter accepts both and shows results in capitals.

See alsoWhole category

  1. MA-01Percentage calculatorFind X% of a number, what percent one number is of another and percentage change.
  2. MA-02Root and exponent calculatorCalculate the n-th root or any power of a number.
  3. MA-03Fraction calculatorAdd, subtract, multiply and divide fractions with automatic simplification.
  4. MA-05Average and grade calculatorCalculate the arithmetic or weighted average and the median.