Skip to main content
Glama

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

NameRequiredDescriptionDefault
geometryYes
copper_ozNo
width_milsYes
spacing_milsNo
dielectric_constantNo
dielectric_height_milsYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full behavioral burden and does so well: it states this is pure math with no Altium side effects, discloses ±10% accuracy, explains formula sources, and warns that fab houses should refine controlled-impedance stackups. This is unusually transparent for a calculation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well structured and front-loads purpose, usage, and chaining guidance before details. It is somewhat long and includes formula blocks plus a Returns section that is redundant with the output schema, but most of the length is justified by the tool's technical complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the high technical complexity, zero schema descriptions, no annotations, and the presence of an output schema, the description is complete: it covers when to use the tool, prerequisite stackup data, supported geometries, parameter meanings, accuracy limitations, and expected outputs.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description fully compensates by documenting all six parameters, including geometry values, the meaning of width for differential pairs, the differing meaning of dielectric height for microstrip vs. stripline, common εr values, copper-oz conversion, and that spacing is ignored for single-ended geometries.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific verb/resource: calculating characteristic impedance of a PCB trace using IPC-2141/Wadell approximations. It distinguishes itself from Altium-modifying tools by saying 'Pure math, no Altium hit,' but does not differentiate itself from the closely related sibling pcb_calc_trace_width_for_impedance.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear usage context: use before routing high-speed signals, with examples such as USB 90 Ω diff and HDMI 100 Ω diff. It also names the prerequisite chaining step pcb_get_layer_stackup, though it does not explicitly route the agent to or away from the sibling pcb_calc_trace_width_for_impedance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools