{
  "id": "impedance",
  "version": "b380a591d969",
  "status": "published",
  "name": "Impedance Calculator",
  "question": "What is the impedance?",
  "summary": "Works out the impedance of a resistor, inductor and capacitor in series or in parallel at a given frequency, with the phase angle, the reactances, and the resonant frequency.",
  "category": "physics",
  "subcategory": "electricity",
  "url": "https://www.acalculator.org/physics/impedance-calculator",
  "markdown": "https://www.acalculator.org/physics/impedance-calculator.md",
  "kind": "function",
  "method": "X_L = 2πfL, X_C = 1 ÷ (2πfC). Series: Z = R + j(X_L − X_C), |Z| = √(R² + (X_L − X_C)²). Parallel: Y = 1/R + j(2πfC − 1/(2πfL)), Z = 1 ÷ Y. φ = the angle of Z. f₀ = 1 ÷ (2π√(LC)).",
  "assumptions": [
    "Ideal parts: a pure resistor, inductor and capacitor, at one sine-wave frequency.",
    "A part left empty is not in the circuit: in series it is a plain wire, in parallel an open branch."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "conn": {
        "title": "Connection",
        "description": "Whether the parts are in series (one after another) or in parallel (side by side).",
        "type": "string",
        "enum": [
          "series",
          "parallel"
        ]
      },
      "R": {
        "title": "Resistance",
        "description": "The resistor. Leave empty if there is none.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "resistance",
        "minimum": 0.000001,
        "maximum": 1000000000
      },
      "L": {
        "title": "Inductance (mH)",
        "description": "The inductor, in millihenries (1 H = 1,000 mH). Leave empty if there is none.",
        "type": "number",
        "minimum": 0.000001,
        "maximum": 1000000
      },
      "C": {
        "title": "Capacitance (µF)",
        "description": "The capacitor, in microfarads (1 µF = 1,000 nF). Leave empty if there is none.",
        "type": "number",
        "minimum": 0.000001,
        "maximum": 1000000
      },
      "f": {
        "title": "Frequency",
        "description": "The frequency of the AC supply or signal.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "frequency",
        "minimum": 0.001,
        "maximum": 1000000000
      }
    }
  },
  "outputs": {
    "z": {
      "label": "Impedance (Ω)",
      "description": "The size of the impedance, |Z|, in ohms.",
      "format": "number"
    },
    "angle": {
      "label": "Phase angle (°)",
      "description": "How far the voltage leads the current: positive for an inductive circuit, negative for a capacitive one.",
      "format": "number"
    },
    "resistive": {
      "label": "Resistive part (Ω)",
      "description": "The real part of Z: |Z| × cos φ.",
      "format": "number"
    },
    "reactive": {
      "label": "Reactive part (Ω)",
      "description": "The imaginary part of Z: |Z| × sin φ.",
      "format": "number"
    },
    "xl": {
      "label": "Inductive reactance X_L (Ω)",
      "description": "2π × f × L.",
      "format": "number"
    },
    "xc": {
      "label": "Capacitive reactance X_C (Ω)",
      "description": "1 ÷ (2π × f × C).",
      "format": "number"
    },
    "f0": {
      "label": "Resonant frequency (Hz)",
      "description": "1 ÷ (2π × √(L × C)), when both L and C are given.",
      "format": "number"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "conn": "series",
      "R": "100 ohm",
      "L": 100,
      "C": 10,
      "f": "60 Hz"
    },
    "outputs": {
      "z": 248.56217757075126,
      "angle": -66.27709333961394,
      "resistive": 100,
      "reactive": -227.55912664341474,
      "xl": 37.69911184307752,
      "xc": 265.25823848649225,
      "f0": 159.15494309189532
    },
    "text": "The impedance is 248.562 Ω at a phase angle of −66.28°."
  },
  "examples": [
    {
      "given": {
        "conn": "series",
        "R": 100,
        "L": 100,
        "C": 10,
        "f": 60
      },
      "expect": {
        "z": 248.56217757075123,
        "angle": -66.27709333961394,
        "xl": 37.69911184307752,
        "xc": 265.25823848649225,
        "f0": 159.15494309189532
      },
      "source": "OpenStax, University Physics Volume 2, §15.3 RLC Series Circuits with AC (Z = √(R² + (X_L − X_C)²), φ = tan⁻¹((X_L − X_C) ÷ R)), https://openstax.org/books/university-physics-volume-2/pages/15-3-rlc-series-circuits-with-ac (retrieved 2026-10-05); OpenStax, University Physics Volume 2, §15.2 Simple AC Circuits (X_L = ωL, X_C = 1 ÷ ωC, ω = 2πf), https://openstax.org/books/university-physics-volume-2/pages/15-2-simple-ac-circuits (retrieved 2026-10-05); Python 3 cross-check in docs/progress/WP-114/xcheck.py",
      "tolerance": 1e-9
    },
    {
      "given": {
        "conn": "series",
        "R": 3,
        "L": 6.366197723675814,
        "f": 100
      },
      "expect": {
        "z": 5,
        "angle": 53.13010235415598
      },
      "source": "OpenStax, University Physics Volume 2, §15.3 RLC Series Circuits with AC (Z = √(R² + (X_L − X_C)²), φ = tan⁻¹((X_L − X_C) ÷ R)), https://openstax.org/books/university-physics-volume-2/pages/15-3-rlc-series-circuits-with-ac (retrieved 2026-10-05); hand calculation in content.mdx: √(3² + 4²) = 5 Ω; tan⁻¹(4 ÷ 3) = 53.13°",
      "tolerance": 1e-9
    },
    {
      "given": {
        "conn": "parallel",
        "R": 100,
        "L": 100,
        "C": 10,
        "f": 60
      },
      "expect": {
        "z": 40.23138233552681,
        "angle": 66.27709333961394
      },
      "source": "Wikipedia, \"RLC circuit\", Parallel circuit (admittance of R, L and C in parallel; resonance at 1 ÷ (2π√(LC))), https://en.wikipedia.org/wiki/RLC_circuit (retrieved 2026-10-05); Python 3 cross-check in docs/progress/WP-114/xcheck.py",
      "tolerance": 1e-9
    }
  ],
  "sources": [
    "OpenStax, University Physics Volume 2, §15.2 Simple AC Circuits: X_L = ωL, X_C = 1 ÷ ωC, ω = 2πf. https://openstax.org/books/university-physics-volume-2/pages/15-2-simple-ac-circuits (retrieved 2026-10-05)",
    "OpenStax, University Physics Volume 2, §15.3 RLC Series Circuits with AC: Z = √(R² + (X_L − X_C)²) and φ = tan⁻¹((X_L − X_C) ÷ R). https://openstax.org/books/university-physics-volume-2/pages/15-3-rlc-series-circuits-with-ac (retrieved 2026-10-05)",
    "Wikipedia, \"RLC circuit\": the parallel circuit’s admittance and the resonant frequency 1 ÷ (2π√(LC)). https://en.wikipedia.org/wiki/RLC_circuit (retrieved 2026-10-05)"
  ],
  "related": [
    "ohms-law",
    "frequency",
    "power-factor"
  ],
  "changelog": []
}
