{
  "id": "ohms-law",
  "version": "34c4867b22a1",
  "status": "published",
  "name": "Ohm's Law Calculator",
  "question": "How do I use Ohm’s law?",
  "summary": "Computes voltage, current, resistance and power from any two of them, with Ohm's law (V = I × R) and electric power (P = V × I).",
  "category": "physics",
  "subcategory": "electricity",
  "url": "https://www.acalculator.org/physics/ohms-law-calculator",
  "markdown": "https://www.acalculator.org/physics/ohms-law-calculator.md",
  "kind": "formulas",
  "method": "V = I × R (Ohm’s law) and P = V × I, so also P = I² × R = V² ÷ R.",
  "assumptions": [
    "The resistance is ohmic: it stays the same whatever the voltage or current.",
    "Values are for direct current, or root-mean-square (RMS) values in a purely resistive AC circuit.",
    "All values are positive."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "v": {
        "title": "Voltage",
        "description": "The voltage across the resistor, in volts.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "voltage",
        "exclusiveMinimum": 0
      },
      "i": {
        "title": "Current",
        "description": "The current through the resistor, in amperes.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "current",
        "exclusiveMinimum": 0
      },
      "r": {
        "title": "Resistance",
        "description": "The resistance, in ohms.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "resistance",
        "exclusiveMinimum": 0
      },
      "p": {
        "title": "Power",
        "description": "The power the resistor turns into heat, in watts.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "power",
        "exclusiveMinimum": 0
      }
    }
  },
  "solve": {
    "fillAny": 2,
    "variables": [
      "v",
      "i",
      "r",
      "p"
    ],
    "inputsOnly": []
  },
  "outputs": {
    "V": {
      "label": "Voltage",
      "description": "The voltage across the resistor, in volts.",
      "format": "quantity"
    },
    "I": {
      "label": "Current",
      "description": "The current through the resistor, in amperes.",
      "format": "quantity"
    },
    "R": {
      "label": "Resistance",
      "description": "The resistance, in ohms.",
      "format": "quantity"
    },
    "P": {
      "label": "Power",
      "description": "The power the resistor turns into heat, in watts.",
      "format": "quantity"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "v": 12,
      "r": 4
    },
    "outputs": {
      "I": 3,
      "P": 36
    },
    "text": "At 12 V across 4 Ω, the current is 3 A and the power is 36 W."
  },
  "examples": [
    {
      "given": {
        "v": 12,
        "r": 4
      },
      "expect": {
        "i": 3,
        "p": 36
      },
      "source": "hand calculation in content.mdx: I = 12 V ÷ 4 Ω = 3 A; P = 12 V × 3 A = 36 W"
    },
    {
      "given": {
        "p": 60,
        "v": 120
      },
      "expect": {
        "i": 0.5,
        "r": 240
      },
      "source": "hand calculation in content.mdx: I = 60 W ÷ 120 V = 0.5 A; R = 120 V ÷ 0.5 A = 240 Ω"
    },
    {
      "given": {
        "p": 0.25,
        "r": 1000
      },
      "expect": {
        "v": 15.811388300841896,
        "i": 0.015811388300841896
      },
      "source": "hand calculation in content.mdx: V = √(0.25 W × 1,000 Ω) = √250 = 15.81 V; I = 15.81 V ÷ 1,000 Ω = 15.81 mA"
    },
    {
      "given": {
        "i": 0.02,
        "r": 220
      },
      "expect": {
        "v": 4.4,
        "p": 0.088
      },
      "source": "hand calculation in content.mdx: V = 0.02 A × 220 Ω = 4.4 V; P = 4.4 V × 0.02 A = 0.088 W",
      "tolerance": 1e-12
    }
  ],
  "sources": [
    "BIPM, The International System of Units (SI Brochure), 9th edition (2019), Table 4: the volt is W/A and the ohm is V/A, so 1 W = 1 V × 1 A. https://www.bipm.org/en/publications/si-brochure",
    "NIST Special Publication 811 (2008), Guide for the Use of the International System of Units, Table 3 (SI derived units). https://www.nist.gov/pml/special-publication-811"
  ],
  "related": [
    "gear-ratio",
    "density"
  ],
  "changelog": []
}
