HomeEngineering & 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

ParameterTypeUnitRequiredDescription
band1enum: black | brown | red | orange | yellow | green | blue | violet | grey | whitenoFirst significant digit colour (band nearest the end).
band2enum: black | brown | red | orange | yellow | green | blue | violet | grey | whitenoSecond significant digit colour.
band3enum: black | brown | red | orange | yellow | green | blue | violet | grey | whitenoThird significant digit colour for 5-band resistors; omit for 4-band.
multiplierenum: black | brown | red | orange | yellow | green | blue | violet | grey | white | gold | silvernoMultiplier 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.
toleranceenum: brown | red | green | blue | violet | grey | gold | silver | nonedefault goldTolerance colour: brown ±1 %, red ±2 %, green ±0.5 %, blue ±0.25 %, violet ±0.1 %, grey ±0.05 %, gold ±5 %, silver ±10 %, none ±20 %.
resistance_ohmnumberΩnoGive a resistance in ohms (e.g. 4700) to get its colour bands instead of decoding; band inputs are then ignored. Range: > 0, ≤ 100000000000

Outputs

OutputTypeUnitDescription
modestring'decode' (colours → value) or 'encode' (value → colours).
resistance_ohmnumberΩNominal resistance.
resistance_formattedstringNominal resistance with SI prefix, e.g. 4.7 kΩ.
tolerance_percentnumber%Tolerance from the tolerance band.
min_resistance_ohmnumberΩNominal × (1 − tolerance).
max_resistance_ohmnumberΩNominal × (1 + tolerance).
band_countinteger4 or 5.
band_colorsstring_listColours from the first digit band to the tolerance band.
color_codestringThe 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

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