ForHosting KIT · Engineering & construction

Resistor color code calculator

Enter the color bands from left to right and get the value: brown, black, red, gold is 1000 ohms with a 5 % tolerance. Works for four- and five-band resistors, no chart needed. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Color bands
brown, black, red, gold
You get
Number of bands
4
Significant digits
10
Multiplier exponent
2
Resistance (Ω)
1000

Enter the color bands of a resistor and get exact ohms plus tolerance.

Four and five band decode only

This calculator reads the color bands of a through-hole resistor from left to right and returns the resistance in ohms plus the tolerance percent. Encode from ohms back to colors is out of scope. Gold and silver are never valid digit colors and fail with digit when placed in a digit position.

Results never call the network, never read the system clock and never depend on host locale settings of any kind.

Canonical color tables

Digit colors map black through white to zero through nine, with grey and gray both accepted. Multiplier uses the same digit colors for powers of ten from zero to nine, plus gold for ten to the minus one and silver for ten to the minus two. Tolerance maps brown one percent, red two, green zero point five, blue zero point twenty-five, violet zero point one, grey zero point zero five, gold five, silver ten and none twenty.

Empty tokens and unknown colors fail with color, digit, multiplier or tolerance as appropriate. Results never call the network, never read the system clock and never depend on host locale settings of any kind.

Exact powers of ten formatting

The significand is built from digit bands as an integer. The resistance string equals significand times ten to the multiplier exponent using only integer arithmetic. Positive exponents yield whole numbers; negative exponents insert a decimal point and strip trailing fractional zeros.

Outputs always include normalized lowercase bands with gray rewritten to grey, bands count, significand, multiplier exponent, resistance ohms and tolerance percent. Results never call the network, never read the system clock and never depend on host locale settings of any kind.

Bench work

Read a through-hole resistor without a chart.

Homework

Check textbook 4-band and 5-band examples.

Inventory

Normalize band lists in a parts database.

Is gray allowed?

Yes. gray and grey are accepted; echo uses grey.

Can gold or silver be a digit band?

No. Gold and silver are never digits; they only work as a multiplier or as the tolerance. As a multiplier, gold divides the value by ten and silver by a hundred, and in a digit position they are rejected.

What tolerance does each color stand for?

Brown stands for 1 %, red 2 %, green 0.5 %, gold 5 % and silver 10 %, and no tolerance band means 20 %. Blue, violet and grey mark even tighter tolerances, below 0.5 %.

Does it read six-band resistors?

No. It accepts exactly four or five bands, made up of two or three digit bands, one multiplier and one tolerance. Any other count is rejected with a message instead of producing a doubtful value.

Can it tell me the colors for a resistance I need?

No. The tool only reads colors and turns them into ohms and tolerance. Going the other way, from a value in ohms to its color bands, is outside what it does.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/dev/resistor-color-code

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/dev/resistor-color-code \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"bands":["brown","black","red","gold"]}'
{
  "bands": [
    "brown",
    "black",
    "red",
    "gold"
  ]
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "dev.resistor_color_code",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_bands5
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Four and five band decode only

Version one accepts exactly four or five bands: two or three digit colors, one multiplier color and one tolerance color.

Errors you can automate against

Missing bands or a non-array fails with bands. Results never call the network, never read the system clock and never depend on host locale settings of any kind. Lengths other than four or five fail with bands_count.

CI tests

Pin exact ohm strings in golden files.

Is encode supported?

Not in v1. Decode only.

How many bands?

Exactly four or five.

What about gold as a digit?

Invalid. That returns digit.

Free in the browser?

Yes. API uses $0.002.

Six-band tempco?

Out of scope for v1.

Read the full KIT documentation →