Crystal Load Capacitance Calculator

Crystal Load Capacitance Calculator
Find or Verify External Capacitors for Crystal Oscillators
CL Crystal Load Capacitance (from data sheet)
pF
Cs Stray Capacitance (typically 2–5 pF)
pF
Crystal Load Capacitance
CL1
CL2
Calculated Cx
Exact value
Standard Value
Nearest
Actual CL
Target CL
Stray Capacitance

Crystal Oscillator Load Capacitance

The crystal’s data sheet specifies a load capacitance (CL) — the total external capacitance the crystal expects to see. Two external capacitors (CL1 and CL2) connect from each crystal pin to ground. Their series combination plus stray PCB capacitance must equal CL.

Inv Rf XI XO XTAL CL1 CL2 + Cstray (PCB traces) CL = (CL1 × CL2) / (CL1 + CL2) + Cstray
XTAL — Quartz crystal. Vibrates at a precise frequency when excited by the inverter. Its data sheet specifies the load capacitance (CL).
Inv — Inverting amplifier (built into the microcontroller or oscillator IC). Provides the gain that sustains oscillation.
Rf — Feedback resistor. Biases the inverter into its linear region so it can amplify. Typically 1–10 MΩ.
XI — Crystal input pin (connects to inverter input).
XO — Crystal output pin (connects to inverter output).
CL1 — Load capacitor on the input side, from XI to ground.
CL2 — Load capacitor on the output side, from XO to ground.
Cstray — Parasitic capacitance from PCB traces, pads, and IC pin capacitance. Typically 2–5 pF.

Crystal Load Capacitance Calculator

Every quartz crystal specifies a load capacitance (CL) on its data sheet — typically 12.5 pF, 18 pF, or 20 pF. This is the total capacitance the crystal expects to see across its pins to oscillate at its rated frequency. Wrong load capacitance shifts the frequency: too much pulls it lower, too little pushes it higher. This calculator finds the correct external capacitor values, rounds to the nearest standard part, and verifies the match.

The Formula

CL = (CL1 × CL2) / (CL1 + CL2) + Cstray — general formula

When CL1 = CL2 = Cx (symmetric, most common):
CL = Cx/2 + Cstray
Cx = 2 × (CL − Cstray) — the value you need for each capacitor

CL1 and CL2 connect from each crystal pin to ground. From the crystal’s perspective they are in series, and the stray PCB capacitance adds in parallel with that series combination.

Calculator Inputs

CL (Crystal Load Capacitance) — from the crystal data sheet, in pF. Common values: 8 pF (low-power 32.768 kHz), 12.5 pF (STM32, ESP32, modern MCUs), 18 pF (8–25 MHz MCU crystals), 20 pF (older or higher-frequency designs).

Cstray (Stray Capacitance) — parasitic capacitance from PCB traces, pads, vias, and IC pin capacitance. Estimates: 2–3 pF for a tight 4-layer layout, 3–5 pF for a standard 2-layer board, 5–7 pF for loose layouts with long traces. When in doubt, use 3 pF.

Worked Example — 18 pF Crystal, 3 pF Stray

The most common combination for 8–16 MHz microcontroller crystals.

Cx = 2 × (18 − 3) = 2 × 15 = 30 pF
Nearest standard (E12): 33 pF

Verify: CL(actual) = 33/2 + 3 = 16.5 + 3 = 19.5 pF
Error: (19.5 − 18) / 18 = 8.3% — yellow status, slight frequency pull

33 pF is the closest standard value but overshoots by 8.3%. For tighter accuracy, use 27 pF: CL = 27/2 + 3 = 16.5 pF, error = −8.3% (undershoots by the same amount but in the other direction). Neither is perfect — this is where the calculator’s verification mode helps you compare options.

Tip: For a 30 pF calculated value, two 27 pF capacitors slightly undershoot and two 33 pF slightly overshoot. In practice, the stray capacitance estimate has more uncertainty than this difference. Choose 27 pF if you want the frequency slightly high, 33 pF if you want it slightly low.

Worked Example — 12.5 pF Crystal, 3 pF Stray

Common for STM32, ESP32, and many modern microcontrollers.

Cx = 2 × (12.5 − 3) = 2 × 9.5 = 19 pF
Nearest standard: 18 pF

Verify: CL(actual) = 18/2 + 3 = 9 + 3 = 12.0 pF
Error: (12.0 − 12.5) / 12.5 = −4.0% — yellow, acceptable

Or use 20 pF: CL = 20/2 + 3 = 13.0 pF, error = +4.0%. Both are within the yellow zone. For USB applications requiring tighter frequency tolerance, 18 pF is the safer choice (running slightly fast is better than slightly slow for USB clock recovery). For more on how capacitance values relate to the 3-digit marking on the capacitor body, use the Capacitor Code Calculator.

Worked Example — 20 pF Crystal, 5 pF Stray

Older designs or larger PCBs with more parasitic capacitance.

Cx = 2 × (20 − 5) = 2 × 15 = 30 pF
Nearest standard: 33 pF or 27 pF

With 33 pF: CL = 33/2 + 5 = 21.5 pF → +7.5% error
With 27 pF: CL = 27/2 + 5 = 18.5 pF → −7.5% error

Neither standard value gives a green match. Options: use asymmetric capacitors (e.g. CL1 = 27 pF, CL2 = 33 pF → series = 14.85 pF + 5 pF stray = 19.85 pF, error = −0.75%), or accept the yellow status if frequency accuracy is not critical for the application.

Verify Mode — Checking an Existing Design

Enter CL1, CL2, Cstray, and the crystal’s target CL. The calculator uses the full series formula for asymmetric values:

CL(actual) = (CL1 × CL2) / (CL1 + CL2) + Cstray

Example: CL1 = 22 pF, CL2 = 22 pF, Cstray = 3 pF, target = 12.5 pF
CL = (22 × 22) / (22 + 22) + 3 = 484/44 + 3 = 11 + 3 = 14.0 pF
Error: +12% — red status, frequency will be pulled noticeably low

This mode catches a common mistake: using 22 pF capacitors for a 12.5 pF crystal because “22 pF is close to 12.5 pF.” It is not — the series combination plus stray gives 14 pF, overshooting by 12%. The correct value is 18–20 pF.

Common Crystal Load Capacitance Values

Crystal CLTypical UseCx (at 3 pF stray)Nearest Standard
8 pF32.768 kHz RTC crystals10 pF10 pF
12.5 pFSTM32, ESP32, modern MCUs19 pF18 pF or 20 pF
18 pF8–16 MHz MCU crystals30 pF27 pF or 33 pF
20 pFOlder designs, high-freq34 pF33 pF

Estimating Stray Capacitance

Cstray is the sum of PCB trace capacitance, pad capacitance, via capacitance, and the MCU’s oscillator pin capacitance. It is the least precise input in the calculation.

2–3 pF — tight 4-layer PCB, short traces (<5 mm), crystal placed directly next to the MCU, guard ring around crystal pads.

3–5 pF — standard 2-layer board, moderate trace lengths (5–15 mm), typical hobby or production PCB. Use 3 pF as default.

5–7 pF — loose layout, long traces (>15 mm), ground plane close to the crystal traces, or breadboard prototyping.

If you can measure the actual stray capacitance (using an impedance analyser or by measuring the oscillator frequency offset and working backwards), the calculator gives a more accurate result. For most designs, the 3 pF estimate is close enough.

Match Status

Green — actual CL within 1% of target. Excellent frequency accuracy. No correction needed.

Yellow — 1–5% off. Oscillator works, frequency slightly shifted. Acceptable for UART, SPI, I2C. May be marginal for USB.

Red — more than 5% off. Noticeable frequency drift. Consider a different standard value, asymmetric capacitors, or verify your stray capacitance estimate.

Frequently Asked Questions

What happens if I use the wrong load capacitors?
The crystal oscillates at a slightly wrong frequency. Too much capacitance means frequency too low. Too little means frequency too high. For UART at 9600 baud, ±1% is fine. For USB (±0.25% required), getting CL right matters. For RTC accuracy (seconds per day), even small errors accumulate.
Do I always need two equal capacitors?
No. Asymmetric values (CL1 ≠ CL2) work — use the full series formula. This lets you hit targets that fall between standard values. It can also adjust the oscillator drive level: a larger capacitor on the output side reduces drive, which is sometimes needed for low-power 32.768 kHz crystals.
Can I skip the load capacitors entirely?
Some MCUs have internal programmable load capacitors (e.g. STM32, nRF52). If the internal capacitors match the crystal’s CL specification (accounting for stray), external capacitors are unnecessary. Check the MCU data sheet for the available internal capacitance range and step size.
How do I know my stray capacitance estimate is right?
Measure the oscillator frequency with a frequency counter. If it is higher than the crystal’s rated frequency, your total load capacitance is too low (stray estimate too high or capacitors too small). If it is lower, total load capacitance is too high. Adjust Cstray in the calculator until the calculated CL matches reality.
Why does the calculator round to standard values?
Capacitors come in preferred values (E12 series: 10, 12, 15, 18, 22, 27, 33 pF, etc.). You cannot buy a 19 pF capacitor. The calculator finds the nearest buyable value and shows you the resulting CL accuracy so you can decide whether it is close enough or if you need to try asymmetric values.
32.768 kHz crystals — any special considerations?
Yes. Low-frequency watch crystals are sensitive to drive level. Excessive drive current can damage the crystal or degrade accuracy over time. Use the MCU’s low-power oscillator mode, keep load capacitors small (6.8–15 pF typical), and check the crystal data sheet for maximum drive level.

Last updated: March 2026