How to Convert Hexadecimal to Decimal

Computer monitor with code
Photo: “Programowanie ELWAT” by Unknown · Public domain · via Wikimedia Commons

Short answer

Hex uses base 16 (0–9 and A–F). Digits are weighted by powers of 16. Example: 2F = 2×16 + 15 = 47 decimal.

Programmers meet hex in colours, memory addresses and hashes. The place-value method mirrors binary conversion.

Place values

… 16³ | 16² | 16¹ | 16⁰. Letters: A=10 … F=15.

Worked example

1A3 = 1×256 + 10×16 + 3 = 256 + 160 + 3 = 419.

Tools

Use the binary, hex & decimal converter. For CSS colours, hex to RGB and the color converter help. Related: binary to decimal.

Hashes

SHA-256 outputs are hex strings — explore digests with the hash generator for learning.

See also: what is a uuid.

See also: a levels exam guide.

More worked numbers

Change one input at a time so you build intuition. Write the formula, substitute values, then confirm with the free number base converter. If the tool disagrees with your hand math, check units first (months vs years, percent vs decimal, inclusive ranges).

Common mistakes to avoid

How to practise

Invent three mini-problems from your own life — a bill, a grade, a trip, a loan quote — and solve them on paper before you open the calculator. Teaching the steps to someone else is one of the fastest ways to lock in the method.

After you finish this guide, explore the linked tools above and the related articles for neighbouring skills. Our calculators run privately in your browser with no sign-up, so you can check homework, budgets or work estimates without uploading data.

Quick reference card

Keep the short answer box at the top of this page as your cheat sheet. When a search result brought you here for a specific phrase, that box is designed to match the query with the formula first, then the examples below fill in the judgement calls.

Frequently asked questions

How do I convert hex to decimal?

Expand each digit by its power of 16 and add. Double-check units and confirm with the linked tool on this page before you rely on the figure for money or school decisions.

What number is F in hex?

15 in decimal. Double-check units and confirm with the linked tool on this page before you rely on the figure for money or school decisions.

Is 0x a required prefix?

In many languages yes; in pure maths you can omit it if the base is clear. Double-check units and confirm with the linked tool on this page before you rely on the figure for money or school decisions.

Can I convert hex colours?

Yes — each pair of hex digits is a 0–255 channel. Double-check units and confirm with the linked tool on this page before you rely on the figure for money or school decisions.