Phase & Gain Margin
Turn a Bode reading — gain at the phase-crossover, phase at the gain-crossover — into gain and phase margins with a stability verdict.
Your recent runs (stored only in your browser)
No calculations yet — results land here so you can compare runs.
The engineering
Gain and phase margin quantify how much slack a feedback loop has before it rings itself into oscillation. Read the open-loop Bode plot: the gain margin is how far below 0 dB the magnitude sits at the frequency where phase hits −180°, and the phase margin is how far above −180° the phase sits at the frequency where magnitude crosses 0 dB. Positive on both means the closed loop is stable.
Bench targets: aim for a phase margin around 45–60° and a gain margin of 6 dB or more. Below ~30° PM you get a peaky, ringing step response; a negative margin means the loop is unstable. Sign convention matters — enter phase as negative (lagging) and the −180° reference does the rest.
Where this math comes from
Hendrik Bode developed the log-magnitude and phase plots at Bell Labs in the 1930s while working on feedback amplifiers for long-distance telephone repeaters, where an amplifier that oscillated took down a whole trunk line. His 1945 book Network Analysis and Feedback Amplifier Design made the frequency-response view the standard engineering tool.
The margins themselves grew out of Harry Nyquist's 1932 stability criterion — margins are just the distance from the critical −1 point read off the easier-to-draw Bode axes. Katsuhiko Ogata's Modern Control Engineering cemented the phase-margin/gain-margin definitions used in every controls course and this card.
- 1932Harry NyquistPublishes the encirclement stability criterion around the −1 point.
- 1945Hendrik BodeFormalizes the magnitude/phase plots and gain- and phase-margin readings.
- 1970Katsuhiko OgataModern Control Engineering standardizes the margin definitions for teaching and practice.
See the full timeline of the math behind every calculator →
Runs entirely in your browser — nothing you enter leaves this page. Your recent runs are stored only on your device.