liminfo

Crystal Oscillator Calculator

Free web tool: Crystal Oscillator Calculator

Actual Oscillation Freq

16.000000 MHz

Frequency Pulling

625.00 ppm

0.01 Hz

Series C (C1||C2)

11.00 pF

Actual CL

16.00 pF

\u0394 -2.00 pF from spec

Oscillation Margin

5110871.3x

Good (>5x)

About Crystal Oscillator Calculator

The Crystal Oscillator Calculator helps electronics engineers and PCB designers verify the operating conditions of a crystal oscillator circuit. You enter the crystal's nominal frequency (in kHz, MHz, or GHz), the crystal's specified load capacitance (pF), the stray capacitance on the PCB (pF), the motional capacitance C1 (fF), and the two external load capacitors C1 and C2 (pF), plus the crystal's ESR (equivalent series resistance in ohms). The tool computes the series combination of C1 and C2, the actual load capacitance seen by the crystal, frequency pulling in ppm and Hz, the deviation from the specified load capacitance, and the oscillation startup margin (gain margin ratio).

Crystal oscillators are used in virtually every digital circuit that requires a precise clock signal — microcontrollers, FPGAs, GPS receivers, communication transceivers, USB hubs, real-time clock ICs, and audio codecs. The load capacitance presented to the crystal directly affects its oscillation frequency. If the actual load capacitance differs from the crystal's specified CL, the crystal will oscillate at a frequency that is shifted by a predictable amount (frequency pulling). This calculator quantifies that shift in ppm and Hz so designers can determine whether the deviation is within their system's frequency accuracy budget.

The oscillation startup margin (gain margin) indicates whether the oscillator circuit has enough loop gain to reliably start oscillating. A ratio above 5x is generally considered good; below 5x the oscillator may fail to start or oscillate intermittently. The gain margin calculation uses a typical transconductance of 1 mA/V as a reference. All computation is performed in your browser — no data is sent to any server. The results panel uses color coding to distinguish acceptable (green) from potentially problematic (yellow/red) conditions at a glance.

Key Features

  • Calculates series load capacitance from external C1 and C2 capacitor values
  • Computes actual crystal load capacitance including PCB stray capacitance
  • Calculates frequency pulling in ppm and in Hz from nominal frequency
  • Shows actual oscillation frequency with full Hz/kHz/MHz/GHz auto-formatting
  • Computes load capacitance deviation from specified CL with ppm offset
  • Calculates oscillation startup margin (gain margin ratio) with green/red status
  • Supports crystal frequencies from kHz through GHz with unit selector
  • 100% client-side processing — circuit parameters never leave your browser

Frequently Asked Questions

What is load capacitance in a crystal oscillator circuit?

Load capacitance (CL) is the total capacitance the crystal sees at its terminals when embedded in the oscillator circuit. In a Pierce oscillator (the most common type), two capacitors C1 and C2 are connected from each crystal terminal to ground. The effective load capacitance is the series combination of C1 and C2, plus any stray capacitance on the PCB traces. The crystal must be driven at its specified CL to oscillate at the frequency printed on its label.

What is frequency pulling?

Frequency pulling is the deviation of a crystal's actual oscillation frequency from its nominal frequency, caused by driving it at a load capacitance different from its specified CL. It is typically expressed in parts per million (ppm). The pulling formula is approximately: pulling (ppm) = (Cm / (2 × CL)) × 10⁶, where Cm is the crystal's motional capacitance. Even a few pF of deviation in CL can cause tens of ppm of frequency error.

What is motional capacitance (C1 in fF)?

Motional capacitance (often labeled Cm or C1 in the crystal's Butterworth-Van Dyke equivalent circuit model) is the capacitive element in the crystal's mechanical resonance model. It is extremely small — typically in the range of 0.005 to 0.05 fF for MHz crystals. It governs the width of the frequency range over which the crystal can be pulled (the "pullability"). A larger Cm means higher pullability and greater sensitivity to load capacitance changes.

What is oscillation startup margin (gain margin)?

The oscillation startup margin, or gain margin, is the ratio of the negative resistance generated by the inverter/amplifier stage to the crystal's ESR (equivalent series resistance). For reliable startup, this ratio should exceed 5x — ideally 10x or more. If the gain margin is too low, the oscillator may fail to start under worst-case conditions (low voltage, high temperature, aging). This calculator uses a typical inverter transconductance of 1 mA/V as a reference; actual margin depends on your specific IC.

Why does stray capacitance matter?

PCB trace capacitance, IC pin capacitance, and capacitance from nearby copper planes all add to the total load capacitance the crystal sees. This stray capacitance (Cstray) shifts the actual CL away from the designed value, causing frequency pulling. A typical Cstray for a well-designed PCB is 2–7 pF. If not accounted for, it can cause the crystal to oscillate tens of ppm off-frequency, which may violate timing specs for USB, UART baud rates, or wireless protocol tolerances.

How do I choose the right C1 and C2 values?

To match the crystal's specified CL: CL = (C1 × C2)/(C1 + C2) + Cstray. Solve for C1 = C2 (symmetric design) to get C1 = C2 = 2 × (CL − Cstray). For example, if CL = 18 pF and Cstray = 5 pF, you need C1 = C2 = 2 × (18 − 5) = 26 pF. Use this calculator to verify the resulting frequency pulling and oscillation margin for your chosen values.

What is ESR and why does it affect oscillation?

ESR (equivalent series resistance) is the parasitic resistance of the crystal's mechanical resonance, essentially its energy loss per cycle. A higher ESR means the crystal presents more resistance to the oscillator loop, requiring a higher negative resistance (more gain) to sustain oscillation. The crystal's ESR increases with frequency and with aging. Datasheets specify maximum ESR; exceeding this value in your drive circuit increases the risk of startup failure.

Can this calculator be used for TCXO or VCXO designs?

This calculator is designed for basic Pierce crystal oscillator analysis. Temperature-compensated oscillators (TCXO) and voltage-controlled oscillators (VCXO) involve additional components — NTC networks or varactor diodes — that shift the operating load capacitance as a function of temperature or control voltage. The core frequency pulling formula still applies, but full TCXO/VCXO design requires additional analysis beyond the scope of this tool.