To convert a number to base 5 (also called quinary), you repeatedly divide the decimal value by 5, record each remainder (which will always be one of 0, 1, 2, 3, or 4), and then read those remainders from bottom to top — that bottom-to-top string of digits is your answer in base 5. For instance, converting 137 in decimal to base 5 takes four division steps and produces 1022₅, because 1×125 + 0×25 + 2×5 + 2×1 = 137. The same idea works in reverse: to interpret a base 5 string like 304₅, you multiply each digit by its place value (powers of 5: 125, 25, 5, 1) and add the results. The base 5 system belongs to a wider family of positional numeral systems that includes binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16); only the number of distinct digits and the size of each place value change between them. Knowing the divide-and-remainder trick is enough to handle any conversion by hand, and that exact algorithm is what a converter tool runs internally when you ask it to show a value in base 5.

Where Base 5 (Quinary) Actually Shows Up
Quinary is one of the oldest numeral systems humans ever used, because counting on the fingers of one hand naturally gives you five. Several traditional counting systems — including the Mayan vigesimal (base 20, built as 4 fingers × 5 toes) and certain African and South American languages — group their tallies around five. Modern computing rarely stores data in base 5, because every chip is built around bits that flip between just two states, but base 5 still appears in:
- Number-theory puzzles and olympiad problems that ask for the base-5 representation of numbers like 137, 293, or 651.
- Exotic positional systems that researchers experiment with as alternatives to binary for fault-tolerant hardware.
- Classroom teaching, where base 5 is a clean example: it has more digits than binary but fewer than decimal, which makes the divide-and-remainder algorithm easy to follow without overflowing scratch paper.
- Genetic-code and codon tables that organise 64 three-letter codons (4×4×4) into chunks of 5 or 4 for compact display.
Learning base 5 is genuinely useful, then, not as a daily tool but as a stepping stone to base 2, base 8, base 16, or any other radix you meet later. The conversion method is identical for all of them — only the divisor and the place-value step change.
Converting a Decimal Number to Base 5 by Hand
The classic pencil-and-paper method for going from decimal to base 5 is the divide-and-remainder algorithm. You keep dividing your number by 5, write down the remainder, and use the quotient as the next dividend. Stop when the quotient reaches 0, then read the remainders from the bottom of your list to the top.
Worked example: convert 137 (decimal) to base 5. Start by dividing 137 ÷ 5 = 27 with remainder 2. Take that quotient and divide again: 27 ÷ 5 = 5 with remainder 2. Continue: 5 ÷ 5 = 1 with remainder 0. One more step: 1 ÷ 5 = 0 with remainder 1. The chain ends because the quotient just reached 0.
Reading the remainders bottom to top gives 1022₅. As a quick sanity check, expand the answer back: 1×125 + 0×25 + 2×5 + 2×1 = 125 + 0 + 10 + 2 = 137, which matches the original.
A few practical tips when you do this by hand:
- The remainder at each step must be in the range 0–4. If you ever get a remainder of 5 or higher, you've made an arithmetic slip — go back and re-divide.
- Don't drop the final remainder. The step where the quotient becomes 0 still produces a remainder, and that remainder is the leading (leftmost) digit of your base-5 answer.
- For very large decimal numbers, write the remainders in a column on the right and the quotients in a column on the left so the chain stays visible.
Reading a Base 5 Number Back as Decimal
Going the other direction uses positional expansion. Each position in a base 5 number is worth a power of 5: the rightmost digit is the 1s place (5⁰), the next is the 5s place (5¹), then 25 (5²), 125 (5³), 625 (5⁴), and so on. Multiply each digit by its place value and add everything up.
For example, 304₅ = 3×25 + 0×5 + 4×1 = 75 + 0 + 4 = 79 in decimal. A zero inside a base 5 number still counts as zero — it just holds its position open, the same way the 0 in 105 does in decimal. And a leading minus sign carries over unchanged: −304₅ is simply −79.
Doing It With the Number Base Converter
When the number is too large to divide by hand or you just want the answer instantly, the Number Base Converter handles the whole job in your browser. Here is the exact workflow:
- Type the whole number you want to convert into the value field — letters are case-insensitive and a leading minus sign is allowed. For a decimal-to-base-5 task, just type your decimal number (like 137); letters only appear when your from-base is above 10.
- Choose the 'from base' that your number is written in — set it to Decimal when starting from 137 — then pick the 'to base' you want the answer in (5 for quinary).
- Read the converted result instantly, along with the value shown in all four common bases — binary, octal, decimal, and hexadecimal — at once, so you can confirm your by-hand work against the same number in every standard system.
The tool uses arbitrary-precision arithmetic under the hood, so even numbers thousands of digits long convert exactly with no rounding. It runs entirely client-side, so whatever number you're working with never leaves your device.
Pitfalls in Base-5 Conversions
Most base-5 mistakes fall into one of three traps.
1. Using illegal digits. A base 5 number may only contain 0, 1, 2, 3, and 4. The moment a 5, 6, 7, 8, or 9 sneaks in, the value is no longer a valid base-5 string. A strict converter surfaces the offending character instead of silently giving you a wrong answer — the Number Base Converter validates every character strictly and reports exactly which digit was rejected.
2. Reading the remainders the wrong way. The divide-and-remainder method produces the digits in reverse order, so you read from bottom to top. If you read top to bottom you get the digits in the opposite order — for 137 you'd write 2201₅ instead of 1022₅, and 2201₅ is a completely different value (it equals 301 in decimal, not 137).
3. Forgetting that base-5 place values are powers of 5, not powers of 10. When expanding a base-5 string back into decimal, beginners sometimes use 1, 10, 100, 1000… instead of 1, 5, 25, 125… and end up with the wrong total. Always double-check that the place values you're multiplying by are 5⁰, 5¹, 5², 5³, … in that order from right to left.
Base 5 Compared With Other Common Bases
The table below shows how base 5 sits alongside the bases you'll meet most often. Notice that the procedure for converting to or from base 5 is structurally identical to the procedure for any other base — only the divisor (when going to a new base) or the place-value step (when coming back) changes.
| Base | Name | Digits used | Place values | Where you meet it |
|---|---|---|---|---|
| 2 | Binary | 0, 1 | 1, 2, 4, 8, 16, 32… | The native language of all digital hardware (bits, bytes, masks) |
| 5 | Quinary | 0, 1, 2, 3, 4 | 1, 5, 25, 125, 625… | Teaching example, historical counting systems, number-theory puzzles |
| 8 | Octal | 0–7 | 1, 8, 64, 512… | Unix file permissions (chmod 755), legacy computing |
| 10 | Decimal | 0–9 | 1, 10, 100, 1000… | Everyday arithmetic and human counting |
| 16 | Hexadecimal | 0–9, A–F | 1, 16, 256, 4096… | Memory addresses, byte values, CSS colour codes like #FF8800 |
If you'd like to see the same divide-and-remainder idea applied to a slightly smaller base, the walkthrough on converting a number to base 3 at How to Convert a Number to Base 3 (Ternary) uses almost identical steps. And the reverse direction — turning a base-5 string like 304₅ into a plain decimal value — is covered in detail at How to Change a Number to Base 10 in Seconds.