pcb_calc_impedance
Calculate characteristic impedance for microstrip and stripline traces (single-ended and differential) to select track widths matching target impedances before routing high-speed signals.
Instructions
Characteristic impedance of a PCB trace via IPC-2141 / Wadell closed-form approximations. Pure math, no Altium hit.
Use this BEFORE routing a high-speed signal to pick the track width that matches your transceiver's target impedance (USB 90 Ω diff, HDMI 100 Ω diff, single-ended PCIe 50 Ω, MIPI 100 Ω diff, etc). For controlled-impedance fab spec sheets, the accuracy of these closed-form formulas is ± ~10% -- good enough for picking widths but fab houses will refine the actual stackup. For real controlled-impedance boards, send the stackup to your fab and use their Polar Si9000 / similar report values.
Chaining with the layer stack: call pcb_get_layer_stackup
first to read the actual dielectric heights and εr values
from the project, then feed those into this calculator. This
is essential -- guessing FR-4 at εr=4.2 ignores the stackup
the user actually picked and can give a 15-20% off answer
if they're using Megtron 6 or Rogers.
Supported geometries:
"microstrip"-- single-ended outer-layer track with reference plane below. IPC-2141 microstrip formula."microstrip_diff"-- differential pair on outer layer. Adds Wadell's mutual-coupling correction."stripline"-- single-ended inner-layer track between two reference planes."stripline_diff"-- differential pair on an inner layer between two reference planes.
Formula sources:
IPC-2141 microstrip: Z₀ = (87 / √(εr + 1.41)) × ln(5.98 × h / (0.8 × w + t))
Symmetric stripline: Z₀ = (60 / √εr) × ln(4 × b / (0.67 × π × (0.8 × w + t)))
Differential variants apply the standard Wadell correction: Zdiff ≈ 2 × Z₀ × (1 - 0.48 × exp(-0.96 × s/h)) for microstrip, similarly with empirical coefficients for stripline.
Args:
geometry: One of "microstrip", "microstrip_diff",
"stripline", "stripline_diff".
width_mils: Track width in mils. For differential, this
is the width of EACH conductor (not the pair).
dielectric_height_mils: For microstrip, the dielectric
thickness BELOW the trace (track-to-reference-plane).
For stripline, this is the TOTAL dielectric thickness
between the two reference planes (b in IPC).
dielectric_constant: εr of the dielectric. Common: 4.2
(FR-4 at 1 GHz), 3.5 (Megtron 6), 3.0 (Rogers 4350B),
2.2 (PTFE). Default 4.2.
copper_oz: Copper weight in oz/ft² (used for t,
trace thickness). 1 oz = 1.378 mils. Default 1.0.
spacing_mils: Edge-to-edge gap between conductors of a
differential pair, in mils. Ignored for single-ended.
Returns:
Dict with:
- geometry, width_mils, dielectric_height_mils,
dielectric_constant, thickness_mils,
spacing_mils (when diff)
- z0_ohms: single-ended characteristic impedance
- zdiff_ohms (diff geometries only): differential
pair impedance
- propagation_delay_ps_per_inch: propagation delay,
derived from the effective εr (microstrip uses
εr_eff = (εr + 1)/2; stripline uses εr directly).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| geometry | Yes | ||
| copper_oz | No | ||
| width_mils | Yes | ||
| spacing_mils | No | ||
| dielectric_constant | No | ||
| dielectric_height_mils | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||