Capacitive reactance online calculator & Python code

Use this online calculator to compute the reactance of a capacitor in Ω at a specific frequency given its capacitance.

Also see Inductive reactance online calculator & Python code

[to-calculator-info][/to-calculator-info]

[calculator]

[calculator-input name=“c” label=“capacitance” unit=“F”][/calculator-input]

[calculator-input name=“f” label=“frequency” unit=“Hz”][/calculator-input]

[calculator-expression name=“xc” formula=“1.0/(2*PI*f*c)” unit=“Ω”]

[calculator-output name=“reactance” unit=“Ω”] <%= format(c, “F”) %> has a reactance of <%= format(xc, “Ω”) %> at <%= format(f, “Hz”) %> [/calculator-output]

[/calculator]

Formula:

$$X_C = \frac{1}{2\pi fC}$$

Python code:

The preferred way is to use UliEngineering’s UliEngineering.Electronics.Reactance.capacitive_reactance:

from UliEngineering.Electronics.Reactance import *
# You can either pass strings like "150 pF" or values like 150e-12

capacitive_reactance("150 pF", "10 MHz") # returns 106.1032953945969

Or get a human-readable value:

from UliEngineering.Electronics.Reactance import *
from UliEngineering.EngineerIO import *

# Compute value as a string
xc = auto_format(capacitive_reactance, "150 pF", "10 MHz") # "106 Ω"

# ... or print directly
auto_print(capacitive_reactance, "150 pF", "10 MHz") # prints "106 Ω"

In case you can’t use UliEngineering and you want to do it manually, here’s a minimal example:

import math
def capacitive_reactance(f, c):
    """Compute the capacitive reactance"""
    return 1./(2*math.pi*f*c)