Hex to Decimal Converter Formula
Understand the math behind the hex to decimal converter. Each variable explained with a worked example.
Formulas Used
Decimal Value
decimal = h3 * 4096 + h2 * 256 + h1 * 16 + h0Variables
| Variable | Description | Default |
|---|---|---|
h3 | Hex Digit 3 (4096s) | 0 |
h2 | Hex Digit 2 (256s) | 0 |
h1 | Hex Digit 1 (16s) | 15 |
h0 | Hex Digit 0 (1s) | 15 |
How It Works
Hex to Decimal Converter
How It Works
Hexadecimal (base-16) uses digits 0-9 and A-F (where A=10, B=11, C=12, D=13, E=14, F=15). Enter the numeric value of each hex digit (0-15).
Each position represents a power of 16:
Worked Example
Convert hex 00FF (0, 0, 15, 15) to decimal.
- 010×4096 + 0×256 + 15×16 + 15×1
- 02= 0 + 0 + 240 + 15
- 03= 255 in decimal
Frequently Asked Questions
What are the hex digits?
Hexadecimal uses 16 digits: 0-9 for values 0-9, and A-F for values 10-15. Enter the numeric value (0-15) for each position.
Why is hexadecimal used in computing?
Hexadecimal is compact and maps neatly to binary: each hex digit represents exactly 4 binary bits. It is commonly used for memory addresses, color codes, and byte values.
Learn More
Guide
Data Storage Units Guide: Bits, Bytes, Megabytes, Gigabytes, and Beyond
Understand data storage units from bits to yottabytes. Learn the difference between decimal and binary prefixes, how to convert between units, and practical storage guidance.
Ready to run the numbers?
Open Hex to Decimal Converter