Math Calculators
Free binary tools for converting between number bases, hex and text, for seeing how computers store signed integers and floating-point numbers, and for binary and bitwise arithmetic โ with the working shown and exact answers. No sign-up required.
Last updated: ยท Reviewed by Shakeel Alvi, OtherCalculators
Start here
Which math calculator do you need?
Every tool runs on the same exact engine and can switch to the others from its tabs โ pick the one shaped like your question. The last row routes out of the category.
- I need a number in several bases at once, or in hex or octalBinary Converter โbinary, decimal, hex, octal and any base from 2 to 36, all editable
- I have a binary number and need it in decimal, with workingBinary to Decimal Converter โeach bit times its power of 2, laid out as a table and a sum
- I have a decimal number and need it in binary, with workingDecimal to Binary Converter โthe repeated division by 2, row by row, with the bit count
- I need binary as hex digits, or hex back to binaryBinary to Hex Converter โfour bits per hex digit, with a nibble-by-nibble table
- I have binary that should be text, or text I need in binaryBinary to Text Converter โUTF-8 or ASCII, each character's bytes listed, broken bytes named
- I need a negative number as bits, or to decode a signed patternTwo's Complement Calculator โtwo's complement at 8 to 64 bits, invert-and-add-one, overflow checks
- I need to see how a decimal is stored as a float or doubleIEEE 754 Floating-Point Converter โsign, exponent and mantissa, and the exact value the bits hold
- I need to add, subtract, multiply or divide binary numbersBinary Calculator โcarries, borrows and long division written out
- I need AND, OR, XOR, NOT or a bit shiftBitwise Calculator โ8 to 64-bit operands stacked bit over bit, signed and unsigned results
- I need trigonometry, logarithms or powers insteadScientific Calculator โa full scientific calculator for decimal arithmetic
Every math calculator in this category
Binary Converter
Convert between binary, decimal, hexadecimal, octal and any base from 2 to 36 as you type, exactly for numbers of any size, with step-by-step working.
Open calculator โBinary to Decimal Converter
Turn a binary number into decimal with every bit times its power of 2 worked out, plus hex and octal. Exact for 64-bit numbers and longer.
Open calculator โDecimal to Binary Converter
Turn a decimal number into binary with the repeated division by 2 shown row by row, plus hex, octal and the bits and bytes it needs.
Open calculator โBinary to Hex Converter
Convert binary to hexadecimal and back by grouping bits in fours, with each nibble's hex digit worked out. Exact for numbers of any length.
Open calculator โBinary to Text Converter
Decode binary bytes into text or encode text as binary, in UTF-8 or ASCII, with each character's code point and bytes listed.
Open calculator โTwo's Complement Calculator
Encode a signed number as an 8, 16, 32 or 64-bit two's complement pattern, or decode one, with invert-and-add-one steps and overflow checks.
Open calculator โIEEE 754 Floating-Point Converter
Convert a decimal to its 32-bit float or 64-bit double bits and back, with sign, exponent, mantissa and the exact value stored.
Open calculator โBinary Calculator
Add, subtract, multiply and divide binary numbers with the carries, borrows, partial products and long division shown.
Open calculator โBitwise Calculator
Work out AND, OR, XOR, NOT and bit shifts at 8, 16, 32 or 64 bits, from binary, hex or decimal, with every bit lined up.
Open calculator โ
The four common number bases
One value, 45, written in each base. The prefix column is how programming languages mark a number's base in code; every converter here accepts the prefixes as typed.
| Base name | Base | Digits | Code prefix | 45 written in it |
|---|---|---|---|---|
| Binary | 2 | 0, 1 | 0b | 101101 |
| Octal | 8 | 0โ7 | 0o | 55 |
| Decimal | 10 | 0โ9 | none | 45 |
| Hexadecimal | 16 | 0โ9, AโF | 0x | 2D |
Five jobs, nine tools
Binary and decimal
2 toolsThe two directions students are tested on, each with the method worked step by step.
Hex and text
2 toolsBits read as hex digits four at a time, or as characters in UTF-8 and ASCII.
How computers store numbers
2 toolsSigned integers in two's complement and fractions in IEEE 754 floating point, bit by bit.
Binary arithmetic
2 toolsAdding, subtracting, multiplying and dividing in binary, and the AND, OR, XOR and shift operations.
Any base
1 toolOne number shown in binary, decimal, hex, octal and a base you choose, all editable at once.
Common mistakes when converting number bases
- Reading repeated-division remainders top-down.The first remainder is the rightmost bit. Read the column from the last division upward, or the number comes out reversed.
- Grouping bits from the left when converting to hex.Hex and octal digits map onto groups of four and three bits counted from the right; pad the leftmost group with zeros.
- Trusting a spreadsheet past 15 or 16 digits.Floating-point tools round large whole numbers, so a 64-bit value can come back with the wrong last digits. Check big values with an exact converter.
- Treating a stored bit pattern as a plain number.In a computer, 11111011 in 8 bits is often โ5 in two's complement, not 251. Know the format before you convert.
Math calculator FAQs
Which converter should I use?
Use the binary converter when you need several bases at once, and the binary to decimal or decimal to binary converter when you need one direction with the working. For how a computer stores a value, use the two's complement calculator for signed integers and the IEEE 754 converter for floats; for characters, the binary to text converter. The binary and bitwise calculators do arithmetic and bit operations.
What is a number base?
A number base is how many different digits a system uses before it carries into the next place. Decimal is base 10, with digits 0 to 9. Binary is base 2, with only 0 and 1. Hexadecimal is base 16, using 0 to 9 and then A to F for ten to fifteen.
Why do computers use binary?
Digital circuits store and switch two states reliably โ on or off, high or low voltage โ and binary maps each bit onto one of those states. Hexadecimal and octal are not stored by the hardware; they are shorthand that people use to read binary more easily.
Are these converters exact for very large numbers?
Yes. They use arbitrary-precision integer arithmetic, so a 64-bit value such as 18,446,744,073,709,551,615 converts digit for digit. Tools built on ordinary JavaScript numbers are only exact up to 9,007,199,254,740,991 and round the last digits of bigger values.
Do these calculators handle fractions and negative numbers?
The base converters keep a minus sign as a sign. For the bit patterns a computer actually stores, the two's complement calculator encodes negative integers at 8 to 64 bits, and the IEEE 754 converter shows how a decimal fraction such as 0.1 is rounded into a 32-bit float or 64-bit double.
What this category covers
Everything here is about binary: writing numbers in different bases, reading bits as hex or text, the fixed-width patterns computers use for signed integers and floating-point numbers, and arithmetic and bit operations on them. Each tool shows its working, because in a classroom the method usually matters as much as the answer.
Not covered: half-precision and decimal floating-point formats, and text encodings other than UTF-8 and ASCII. For decimal arithmetic, trigonometry and logarithms, the scientific calculator is the right tool.
How these calculations work
Every number is held as an arbitrary-precision integer, parsed digit by digit and printed back in each base. Nothing passes through floating point, so a 64-bit value โ or a 4,000-bit one โ converts exactly, where ordinary JavaScript numbers lose digits past 2โตยณ.
The working uses the two textbook methods: positional expansion (each digit times its place value, summed) for converting to decimal, and repeated division by the base for converting from it. Conversion between binary, hexadecimal and decimal is listed in the DfE GCSE computer science content.
Related category
Where the scientific, rounding and proportion calculators live โ decimal arithmetic, rounding a converted value, and the everyday maths these number-system tools leave out.
Estimates & assumptions
- Base conversions keep a minus sign as a sign; the two's complement and bitwise calculators work on fixed-width patterns of 8 to 64 bits.
- Whole-number results are exact for inputs up to 4,096 characters, and the IEEE 754 converter prints the exact stored value. Step-by-step working is shown for numbers up to 64 bits.
- Every calculation runs in your browser; nothing you type is sent to a server.
These calculators are for education and general calculation. Check values used in production code or hardware against your platform's documentation.