Pierce Crystal Oscillator Calculator

Design the load capacitors C1 and C2 for a Pierce crystal oscillator (the universal MCU crystal topology). Matches the crystal's specified load capacitance CL.

Calculator Electronics Updated Oct 16, 2026
How to Use
  1. Enter the crystal load capacitance CL from its datasheet, for example 18 pF or 12.5 pF.
  2. Enter the stray capacitance Cs seen across the crystal from the board traces, pads and chip pins, often estimated at 2 to 5 pF.
  3. Enter the crystal frequency, for example 8MHz or 32.768kHz.
  4. Read C1 = C2, the check that they give back CL, a starting value for the series drive resistor and the period.
Input
pF (datasheet)
pF across crystal
Hz (MHz OK)
Presets
Pierce Topology
C1 = C2
—pF
CL verify
—pF
Typical R_d
—Ω
Period
—

Worked Example

An 8 MHz crystal with CL = 18 pF on a board with about 5 pF of stray capacitance. C1 = C2 = 2 × (18 − 5) = 26 pF. Check: 26 × 26 ÷ (26 + 26) = 13 pF, plus 5 pF stray, is 18 pF. A starting series resistor is the reactance of C2: 1 ÷ (2π × 8 MHz × 26 pF) = 765 Ω.

A 32.768 kHz watch crystal with CL = 12.5 pF and 3 pF of stray: C1 = C2 = 2 × (12.5 − 3) = 19 pF.

The common mistake: making C1 and C2 equal to CL. Two 18 pF capacitors in series are only 9 pF; with the stray the crystal sees 14 pF instead of 18 pF and runs fast.

Show Work

Enter values.

Formulas

Load Capacitance
CL = (C1·C2)/(C1+C2) + Cs
Must match crystal spec.
Equal Caps
C1 = C2 = 2·(CL − Cs)
With equal caps.
Drive R (start value)
R_d ≈ X_C2 = 1/(2π·f·C2)
Then check the crystal drive level.
Topology
Inverter, crystal, C1, C2, R_f
MCU internal + 4 passives.
32.768 kHz
CL 6-12.5 pF
Watch crystal.
MHz crystal
CL 8-20 pF
Standard MCU range.

History

George Washington Pierce, a Harvard physicist, described his quartz crystal oscillators in 1923 and filed the patent in 1924 (US 1,789,496, granted in 1931). His circuit used a vacuum tube with the crystal itself as the frequency-setting element in place of a tuned coil-and-capacitor tank, which made it far more stable.

With CMOS logic the same circuit became an inverter biased by a feedback resistor, with the crystal from output to input and a capacitor from each end to ground. Unbuffered inverters such as the 74HCU04 were long used this way, and the same circuit sits behind the crystal pins of almost every microcontroller.

Inside a microcontroller the inverter and feedback resistor are built in, so the designer adds only the crystal and two capacitors. Those capacitors, together with the stray capacitance of the pins and board, set the load the crystal sees, which is why the stray term must be subtracted rather than ignored.

About This Calculator

Enter the crystal CL from its datasheet, the stray capacitance across the crystal and the frequency. The tool solves C1 = C2 = 2·(CL − Cs) for equal capacitors and suggests a starting series resistor equal to the reactance of C2.

Round to the nearest standard capacitor value, and fine-tune after measuring the real frequency, or fit a trimmer capacitor on one side. Keep the crystal traces short and away from noisy signals. Everything runs in your browser.

Frequently Asked Questions

Why must the load capacitance match?

A crystal is cut to oscillate at its marked frequency when it sees exactly CL. With less load it runs fast and with more it runs slow, typically by a few ppm or more per picofarad of error, which matters for clocks, radios and serial links.

Why is C1 = C2 = 2·(CL − Cs)?

The crystal sees C1 and C2 in series, which is half their value when they are equal, plus the stray capacitance: CL = C1·C2 ÷ (C1 + C2) + Cs. Solving for equal capacitors gives 2·(CL − Cs). For CL = 18 pF and Cs = 5 pF that is 26 pF.

How do I estimate the stray capacitance?

Add the oscillator pin capacitance from the chip datasheet and a little for the traces and pads; 2 to 5 pF is a common estimate for a compact layout. If the measured frequency is high, the load is too small: increase both capacitors slightly.

What is the series resistor for?

It limits the power driven into the crystal. A common starting value is the reactance of C2, 765 Ω for an 8 MHz crystal with 26 pF capacitors. Many microcontroller designs leave it out; check the drive level against the crystal rating, especially for 32.768 kHz watch crystals, which tolerate only about a microwatt.

How do I measure the frequency without disturbing it?

A scope probe on the crystal pins adds several picofarads and pulls the frequency, and it can stop a weak oscillator. Measure a buffered clock output, such as a microcontroller clock-out pin, with a frequency counter instead.

How do I use the Pierce Crystal Oscillator Calculator?

Simply type your numbers and read the result, which refreshes the instant you change something. There is nothing to submit and nothing to wait for.

Do I need to install or sign up for anything?

Not at all — it runs in the browser with nothing to install and no account. After it loads once, it even works without an internet connection.

Is my information private?

Yes. Everything happens in your browser. Nothing you type is sent to a server or saved anywhere.

Common Use Cases

Microcontroller Clocks

An 8 MHz crystal with CL = 18 pF and 5 pF of stray needs 26 pF capacitors; 27 pF is the nearest standard value.

Real-Time Clocks

A 32.768 kHz watch crystal with CL = 12.5 pF and 3 pF of stray needs 19 pF capacitors.

Low-Power Designs

A 6 pF watch crystal with 2 pF of stray needs only 8 pF capacitors, and the lower load lets the oscillator run on less current.

USB Clocks

A 12 MHz crystal with CL = 20 pF and 5 pF of stray needs 30 pF capacitors and a series resistor of about 442 Ω to start with.

Last updated: