Home › Engineering & Automotive › Resistor Color Code Calculator
Resistor Color Code Calculator
Decodes the colour bands of a 4-band or 5-band resistor (IEC 60062) into its resistance, tolerance and min/max values, or encodes a resistance value into the 4-band (or 5-band) colour sequence.
When to use
You need to read a resistor's bands (band colours in, ohms out) or find the bands for a given resistance value.
Do not use when: The part is an SMD resistor with a printed numeric code, a 6-band resistor (temperature coefficient band is ignored), or you need the resistor value for a circuit (use led-resistor or voltage-divider).
Formula
4-band: R = (10·d1 + d2) × multiplier; 5-band: R = (100·d1 + 10·d2 + d3) × multiplier; digits black 0 … white 9; min/max = R × (1 ∓ tolerance/100)
Inputs
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
band1 | enum: black | brown | red | orange | yellow | green | blue | violet | grey | white | no | First significant digit colour (band nearest the end). | |
band2 | enum: black | brown | red | orange | yellow | green | blue | violet | grey | white | no | Second significant digit colour. | |
band3 | enum: black | brown | red | orange | yellow | green | blue | violet | grey | white | no | Third significant digit colour for 5-band resistors; omit for 4-band. | |
multiplier | enum: black | brown | red | orange | yellow | green | blue | violet | grey | white | gold | silver | no | Multiplier colour: black ×1, brown ×10, red ×100, orange ×1k, yellow ×10k, green ×100k, blue ×1M, violet ×10M, grey ×100M, white ×1G, gold ×0.1, silver ×0.01. | |
tolerance | enum: brown | red | green | blue | violet | grey | gold | silver | none | default gold | Tolerance colour: brown ±1 %, red ±2 %, green ±0.5 %, blue ±0.25 %, violet ±0.1 %, grey ±0.05 %, gold ±5 %, silver ±10 %, none ±20 %. | |
resistance_ohm | number | Ω | no | Give a resistance in ohms (e.g. 4700) to get its colour bands instead of decoding; band inputs are then ignored. Range: > 0, ≤ 100000000000 |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
mode | string | 'decode' (colours → value) or 'encode' (value → colours). | |
resistance_ohm | number | Ω | Nominal resistance. |
resistance_formatted | string | Nominal resistance with SI prefix, e.g. 4.7 kΩ. | |
tolerance_percent | number | % | Tolerance from the tolerance band. |
min_resistance_ohm | number | Ω | Nominal × (1 − tolerance). |
max_resistance_ohm | number | Ω | Nominal × (1 + tolerance). |
band_count | integer | 4 or 5. | |
band_colors | string_list | Colours from the first digit band to the tolerance band. | |
color_code | string | The bands as a hyphen-separated string, e.g. yellow-violet-red-gold. |
Example
5-band brown-black-black-red-brown: {"band1":"brown","band2":"black","band3":"black","multiplier":"red","tolerance":"brown"} → {"mode":"decode","resistance_ohm":10000,"resistance_formatted":"10 kΩ","tolerance_percent":1,"min_resistance_ohm":9900,"max_resistance_ohm":10100,"band_count":5,"color_code":"brown-black-black-red-brown"}
Encode 4.7 kΩ ±5 %: {"resistance_ohm":4700} → {"mode":"encode","band_count":4,"band_colors":["yellow","violet","red","gold"],"color_code":"yellow-violet-red-gold","min_resistance_ohm":4465,"max_resistance_ohm":4935}
GET https://tttkmbb.com/api/v1/calculate/resistor-color-code?band1=brown&band2=black&band3=black&multiplier=red&tolerance=brown
Machine access
- API:
GET https://tttkmbb.com/api/v1/calculate/resistor-color-code(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/resistor-color-code · Markdown: https://tttkmbb.com/engineering/resistor-color-code.md · JSON definition: https://tttkmbb.com/engineering/resistor-color-code.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="resistor-color-code" - OpenAPI operationId:
convert_resistor_color_code - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
FAQ
Which end do I read from?
The tolerance band (gold, silver or a band set apart by a wider gap) is last; read from the opposite end. Gold or silver can never be a first band.
Why can't a value be encoded?
Colour bands hold only 2 (4-band) or 3 (5-band) significant digits and a power-of-ten multiplier down to ×0.01. Values like 4735 Ω or 0.047 Ω have no exact code; round to a preferred (E-series) value.
Related calculators
- LED Resistor Calculator — Find the resistor value you need before reading its bands.
- Resistors in Series and Parallel Calculator — Combine several decoded resistors.
- Ohm's Law Calculator — Use the decoded value in V = I·R.