NodeLoop

Crystal Load Capacitor Calculator

Calculate the perfect load capacitors for your crystal oscillator. Interactive tool for MCU clock circuits with frequency accuracy analysis and component recommendations.

Quick Calculator

Recommended Values

Calculated C1 = C2: --
Nearest E12 value: --
Nearest E6 value: --

Actual Load with Standard Values:

Tip: Always use NP0/C0G ceramic capacitors for crystal oscillators. X7R or Y5V will cause frequency drift with temperature.

Circuit Schematic

Crystal oscillator
Load capacitors
MCU pins & stray capacitance

Frequency Accuracy

Understanding Frequency Error & Pullability

⚠️ Important: The frequency error estimate above is simplified. Actual frequency deviation depends on the crystal's pullability (measured in ppm/pF), which varies significantly:

MHz AT-cut crystals

Pullability: ~5-15 ppm/pF

Relatively forgiving. A 0.5pF load error typically causes 2.5-7.5 ppm frequency shift.

32.768kHz tuning-fork crystals

Pullability: ~50-100 ppm/pF

⚠️ Very sensitive! A 0.5pF load error can cause 25-50 ppm shift. Precision is critical for RTC applications.

What is pullability? It's the crystal's frequency sensitivity to load capacitance changes, measured in ppm/pF.

Pullability depends on the ratio of Cm (motional capacitance) to C0 (shunt capacitance) — crystal-specific parameters from the datasheet. Larger Cm or smaller C0 increases pullability.

Frequency shift sign: Higher load capacitance → lower oscillation frequency (negative ppm). To correct a slow crystal, reduce load caps; to correct a fast crystal, increase them.

Best practice: When precision matters (USB, Ethernet, RTC), verify frequency with an oscilloscope or frequency counter and adjust load caps if needed. For 32.768kHz RTC, consider using ±20ppm or better crystals and measure Cstray carefully.

Common Issues

⚠️ Oscillator won't start
  • Check load capacitors are correct value and orientation
  • Verify crystal is not damaged (test with multimeter ~∞ ohms)
  • Keep PCB traces short (<10mm) and symmetric
  • Increase drive level if MCU allows (check registers)
  • Try adding or removing series resistor (Rs)
  • Check crystal orientation (some have pin 1 marking)
  • Verify power supply is stable and bypassed properly
⚠️ Frequency is off
  • Measure actual frequency with oscilloscope or frequency counter
  • Recalculate with actual Cstray (typically 3-7pF, higher than expected)
  • Verify load capacitors are correct values (not swapped with other parts)
  • Check crystal tolerance specification (±20ppm, ±50ppm?)
  • Check temperature coefficient of crystal (AT-cut typ. ±30ppm over temp)
⚠️ Frequency drifts with temperature
  • Use NP0/C0G capacitors only (not X7R or Y5V which vary ±15% with temp)
  • Check crystal temperature coefficient specification
  • Avoid airflow directly over crystal (can cause thermal shock)
  • Minimize thermal coupling between crystal and hot components (MCU, regulators)
  • Consider TCXO (Temperature Compensated Crystal Oscillator) for ±1ppm stability
Share & Export

Save Your Calculation

Export your crystal configuration for documentation or share with your team.

Understanding Crystal Load Capacitors

Why Load Capacitors Matter

Crystal load capacitors tune the oscillator circuit to resonate at exactly the crystal's specified frequency. The crystal manufacturer specifies a load capacitance (CL) – typically 6pF, 9pF, 12pF, 15pF, 18pF, or 20pF. You must provide this exact load to ensure accurate frequency.

The Formula

Cload = (C1 × C2)/(C1 + C2) + Cstray
For symmetric load (C1 = C2):
C1 = C2 = 2 × (Cload - Cstray)

Where Cstray is the parasitic capacitance from PCB traces, MCU pins, and routing (typically 2-7pF).

Common Mistakes to Avoid

  • ❌ Forgetting Cstray: Always account for 2-7pF of stray capacitance. Ignoring it results in wrong frequency.
  • ❌ Using wrong capacitor type: Must use NP0/C0G ceramic caps. X7R or Y5V will cause massive frequency drift with temperature.
  • ❌ Poor PCB layout: Keep traces <10mm and symmetric. Use copper keep-out zone under crystal and traces (ground pour underneath increases Cstray and injects noise). Add ground guard ring around the crystal area instead.
  • ❌ Wrong crystal load: Using an 18pF crystal with 12pF circuit won't work. Match the datasheet!

How to Choose Load Capacitors

Always start from the crystal's CL value (from datasheet) and estimate/measure Cstray. MCUs differ in pin capacitance (2-5pF typical). Some have adjustable internal load capacitors.

Typical Examples:

  • STM32: Often spec'd with CL=6-9pF crystals. Pin capacitance ~2-5pF. Check MCU app note + crystal datasheet. For CL=18pF + Cstray=5pF → use ~27pF caps.
  • AVR/Arduino: Typically CL=18pF crystals. Use calculator with Cstray=3-5pF → 22-27pF caps common.
  • ESP32: 40MHz crystal with CL≈10pF. Has internal adjustable caps (register tuning may be needed). Some boards add small external caps depending on design.
  • 32.768kHz RTC: Typically CL=6-12.5pF. Very sensitive (50-100 ppm/pF). Use low-drive mode. Calculate from actual CL specified.

⚠️ Important: These are guidelines only. Always verify with your specific MCU app note and crystal datasheet. Pin capacitance varies by MCU model.

Practical Tips for Success

✓ PCB Layout

  • • Keep traces <10mm and symmetric
  • • No ground plane below crystal
  • • Use guard ring tied to GND
  • • Route away from noisy signals

✓ Component Selection

  • • NP0/C0G caps only (not X7R)
  • • Match crystal CL to design
  • • Provision Rs footprint (0-47Ω)
  • • Use ±20ppm crystals for precision

✓ Verification

  • • Verify frequency on assembled board
  • • Use scope or frequency counter
  • • Check over temperature range
  • • Test with production components

📊 Tolerance Reference

  • USB Full-Speed: ±2500 ppm max
  • UART: ±2% typical
  • RTC: ±20 ppm for accuracy
  • Ethernet: ±50 ppm recommended

Frequently Asked Questions

What if I use slightly wrong capacitor values?

Small deviations (±2pF) usually work fine for most applications. The oscillator will still start, but frequency will be slightly off. For USB (48MHz), Ethernet, or precision timing, stay within ±1pF. For basic MCU clocks, ±3pF is often acceptable.

How do I measure stray capacitance?

Most practical approach: Start with 5pF as estimate, measure actual frequency, then back-calculate. Alternatively, use a VNA or capacitance meter on the unpopulated PCB. Typical values: 2-3pF for good layout, 5-7pF for average, 10pF+ for poor layout.

Can I use X7R capacitors instead of NP0/C0G?

No! X7R capacitors can vary ±15% with temperature (-55°C to +125°C). This causes huge frequency drift. NP0/C0G capacitors have ±30ppm/°C stability – essential for oscillators. The extra cost (~$0.05) is worth it.

Why does my crystal have 4 pads/pins?

Most 4-pad SMD crystals use 2 pads for the electrodes (signal) and 2 pads as mechanical NC (not connected). Do not connect NC pads to ground by default – this can increase Cstray unpredictably. Check the crystal datasheet for pinout. If a shield/case pad is specified, the datasheet will indicate whether to connect it to ground. Passive MCU crystals rarely use differential drive (4 active pins).

Should I add a series resistor (Rs)?

Optional; check your MCU app note and crystal's drive level spec. Typical values: 0-100 Ω (sometimes up to 1 kΩ for low-drive crystals).

When Rs is useful:

  • Drive level limiting: If MCU overdrive could damage the crystal (check crystal datasheet for max µW)
  • Harmonic suppression: Helps prevent oscillation at overtones (3rd, 5th harmonic)
  • Startup improvement: Can improve startup reliability in some marginal designs
  • 32.768kHz RTC crystals: Often benefits from Rs to reduce power consumption and ensure gentle drive

Many modern MCUs (STM32, ESP32, etc.) have built-in drive level control registers, making Rs optional. However, adding a small Rs (e.g., 0-47 Ω) as a placeholder can help during debugging if startup issues occur. Best practice: keep footprint provisioned, even if unpopulated.