Tutorial
Monte Carlo and worst-case analysis
A Monte Carlo analysis repeats a circuit many times with every part value drawn at random inside its tolerance, then shows how much a result moves and how many builds meet the specification. A worst-case analysis sets every part to the low or high end of its range. In BetterSPICE both are the Tolerance analysis. This tutorial runs it on an RC low-pass filter.
28 Nov 2026 · Arwid Vasilev
Steps
- Open the example RC low-pass, 1.6 kHz (Examples, Filters): R1 = 1 kΩ, C1 = 100 nF. Its −3 dB frequency is 1 / (2πRC) = 1.591 kHz.
- Set the tolerances. Select a part and type Tolerance (percent) in the inspector. Here R1 is 1 % and C1 is 10 %. A resistor with none counts as 1 % and a capacitor as 10 % in this analysis.
- Press Shift+F9 to open the Tolerance tab. Set Analysis to repeat to AC sweep, Method to Monte Carlo, Runs to 200 and Seed to 1. Press Run tolerance.
- Read the spread of the −3 dB frequency: nominal 1.591 kHz, mean 1.59 kHz, sigma 53.62 Hz, minimum 1.471 kHz, maximum 1.734 kHz.
- Type the limits you can accept, for example 1.55k and 1.65k. The yield shows at once: 64.0 %, which is 128 of 200 runs.
- Look at Which parts matter. C1 takes 99 % of the spread and R1 takes 1 %, so a tighter capacitor is the fix.
- Switch Method to Worst case. The 4 corners give 1.432 kHz to 1.786 kHz. Read the minimum and maximum, not the mean. See chapter 29.

Questions people ask
What is the difference between Monte Carlo and worst case?
Monte Carlo draws every part at random and tells you how likely a pass is. Worst case sets every part to its low or high end and tells you the extremes. Up to 8 toleranced parts it runs every corner.
How many runs do I need, and can I repeat them?
The default is 200 runs and the range is 1 to 20000. The same seed gives the same runs, here and in the bspice command line.
Which distribution does a draw use?
Gauss by default, where the tolerance is the 3-sigma limit and a draw is cut at plus and minus 3 sigma. You can choose Uniform, where every value inside the tolerance is equally likely.
Try it yourself
The viewer and the full app run in your browser. The desktop app adds the vendor model library and ngspice.