{
  "id": "resistor-color-code",
  "version": "fb534847dfc1",
  "status": "published",
  "name": "Resistor Calculator",
  "question": "What is my resistor value?",
  "summary": "Reads a 4-, 5- or 6-band resistor colour code (IEC 60062): the resistance, the tolerance, the lowest and highest resistance, and the temperature coefficient.",
  "category": "physics",
  "subcategory": "electricity",
  "url": "https://www.acalculator.org/physics/resistor-color-code-calculator",
  "markdown": "https://www.acalculator.org/physics/resistor-color-code-calculator.md",
  "kind": "function",
  "method": "R = (significant digits) × 10^(multiplier power); lowest = R × (1 − tolerance); highest = R × (1 + tolerance).",
  "assumptions": [
    "Read the bands from the end where they start; the tolerance band is usually set apart from the others.",
    "Colours follow IEC 60062:2016; older resistors may use other tolerance colours."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "bands": {
        "title": "Number of bands",
        "description": "4 bands: 2 digits; 5 bands: 3 digits; 6 bands: 3 digits and a temperature coefficient.",
        "type": "string",
        "enum": [
          "4",
          "5",
          "6"
        ]
      },
      "b1": {
        "title": "First band",
        "description": "The colour of the first band, a significant digit from black (0) to white (9).",
        "type": "string",
        "enum": [
          "black",
          "brown",
          "red",
          "orange",
          "yellow",
          "green",
          "blue",
          "violet",
          "grey",
          "white"
        ]
      },
      "b2": {
        "title": "Second band",
        "description": "The colour of the second band, a significant digit from black (0) to white (9).",
        "type": "string",
        "enum": [
          "black",
          "brown",
          "red",
          "orange",
          "yellow",
          "green",
          "blue",
          "violet",
          "grey",
          "white"
        ]
      },
      "b3": {
        "title": "Third band",
        "description": "The colour of the third band, a significant digit from black (0) to white (9).",
        "type": "string",
        "enum": [
          "black",
          "brown",
          "red",
          "orange",
          "yellow",
          "green",
          "blue",
          "violet",
          "grey",
          "white"
        ]
      },
      "mult": {
        "title": "Multiplier band",
        "description": "The colour of the multiplier band: the power of ten the digits are multiplied by.",
        "type": "string",
        "enum": [
          "pink",
          "silver",
          "gold",
          "black",
          "brown",
          "red",
          "orange",
          "yellow",
          "green",
          "blue",
          "violet",
          "grey",
          "white"
        ]
      },
      "tol": {
        "title": "Tolerance band",
        "description": "The colour of the tolerance band; no band means ±20%.",
        "type": "string",
        "enum": [
          "none",
          "silver",
          "gold",
          "brown",
          "red",
          "orange",
          "yellow",
          "green",
          "blue",
          "violet",
          "grey"
        ]
      },
      "tc": {
        "title": "Temperature coefficient band",
        "description": "The colour of the sixth band: how much the resistance changes per kelvin, in ppm/K.",
        "type": "string",
        "enum": [
          "black",
          "brown",
          "red",
          "orange",
          "yellow",
          "green",
          "blue",
          "violet",
          "grey"
        ]
      }
    }
  },
  "outputs": {
    "resistance": {
      "label": "Resistance",
      "description": "The digits times the multiplier, in Ω, kΩ, MΩ or GΩ.",
      "format": "text"
    },
    "ohms": {
      "label": "Resistance in ohms",
      "description": "The resistance in ohms.",
      "format": "number"
    },
    "tolerance": {
      "label": "Tolerance",
      "description": "How far the real resistance may be from the marked value, plus or minus.",
      "format": "percent"
    },
    "min": {
      "label": "Lowest resistance",
      "description": "The resistance × (1 − tolerance).",
      "format": "text"
    },
    "max": {
      "label": "Highest resistance",
      "description": "The resistance × (1 + tolerance).",
      "format": "text"
    },
    "tempco": {
      "label": "Temperature coefficient",
      "description": "On 6-band resistors: the change in resistance per kelvin, in parts per million.",
      "format": "number"
    },
    "digits": {
      "label": "Colour code",
      "description": "The bands as digits and multiplier: digits × 10^power.",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "bands": "4",
      "b1": "yellow",
      "b2": "violet",
      "b3": "black",
      "mult": "red",
      "tol": "gold",
      "tc": "brown"
    },
    "outputs": {
      "resistance": "4.7 kΩ",
      "ohms": 4700,
      "tolerance": 5,
      "min": "4.465 kΩ",
      "max": "4.935 kΩ",
      "digits": "47 × 10^2"
    },
    "text": "The bands mean 4.7 kΩ ± 5%: from 4.465 kΩ to 4.935 kΩ."
  },
  "examples": [
    {
      "given": {
        "bands": "4",
        "b1": "yellow",
        "b2": "violet",
        "mult": "red",
        "tol": "gold"
      },
      "expect": {
        "resistance": "4.7 kΩ",
        "ohms": 4700,
        "tolerance": 5,
        "min": "4.465 kΩ",
        "max": "4.935 kΩ"
      },
      "source": "hand calculation in content.mdx: 47 × 10² = 4,700 Ω, ±5% = ±235 Ω; IEC 60062:2016 Marking codes for resistors and capacitors, colour code table as given in “Electronic color code” (https://en.wikipedia.org/wiki/Electronic_color_code, retrieved 2026-10-02)"
    },
    {
      "given": {
        "bands": "5",
        "b1": "brown",
        "b2": "black",
        "b3": "black",
        "mult": "brown",
        "tol": "brown"
      },
      "expect": {
        "resistance": "1 kΩ",
        "ohms": 1000,
        "tolerance": 1,
        "min": "990 Ω",
        "max": "1.01 kΩ"
      },
      "source": "hand calculation in content.mdx: 100 × 10¹ = 1,000 Ω ±1%; IEC 60062:2016 Marking codes for resistors and capacitors, colour code table as given in “Electronic color code” (https://en.wikipedia.org/wiki/Electronic_color_code, retrieved 2026-10-02)"
    },
    {
      "given": {
        "bands": "6",
        "b1": "red",
        "b2": "red",
        "b3": "black",
        "mult": "gold",
        "tol": "blue",
        "tc": "brown"
      },
      "expect": {
        "resistance": "22 Ω",
        "tolerance": 0.25,
        "min": "21.945 Ω",
        "max": "22.055 Ω",
        "tempco": 100
      },
      "source": "hand calculation in content.mdx: 220 × 10⁻¹ = 22 Ω ±0.25%, 100 ppm/K; IEC 60062:2016 Marking codes for resistors and capacitors, colour code table as given in “Electronic color code” (https://en.wikipedia.org/wiki/Electronic_color_code, retrieved 2026-10-02)"
    },
    {
      "given": {
        "bands": "4",
        "b1": "green",
        "b2": "blue",
        "mult": "green",
        "tol": "none"
      },
      "expect": {
        "resistance": "5.6 MΩ",
        "min": "4.48 MΩ",
        "max": "6.72 MΩ"
      },
      "source": "hand calculation in content.mdx: 56 × 10⁵ = 5,600,000 Ω, no band = ±20%; IEC 60062:2016 Marking codes for resistors and capacitors, colour code table as given in “Electronic color code” (https://en.wikipedia.org/wiki/Electronic_color_code, retrieved 2026-10-02)"
    }
  ],
  "sources": [
    "IEC 60062:2016, Marking codes for resistors and capacitors (the colour code), as tabulated in “Electronic color code” (significant figures, multipliers pink ×10⁻³ to white ×10⁹, tolerances, temperature coefficients), retrieved 2026-10-02. https://en.wikipedia.org/wiki/Electronic_color_code",
    "IEC webstore, IEC 60062:2016 Marking codes for resistors and capacitors (the standard itself; the 2016 edition added pink for ×10⁻³), retrieved 2026-10-02. https://webstore.iec.ch/en/publication/25395"
  ],
  "related": [
    "ohms-law",
    "parallel-resistor",
    "voltage-drop",
    "power"
  ],
  "changelog": []
}
