From ControlTheoryPro.com

Contents
1 Introduction to Phase Margin
Phase margin is a key measure of the robustness of the stability of a closed loop system. The smaller the phase margin to more the closed loop system will oscillate due to a step response. On a bode plot of the closed loop system the phase margin can be seen in the closed loop peaking  the smaller the phase margin, the larger the closed loop peaking.
2 How to find the Phase Margin
2.1 Phase Margin from the Bode Plot
The phase margin is easily determined from the open loop Bode plot. The open loop transfer function will cross the 0 dB line at some frequency, . This frequency is referred to as the open loop crossover frequency. At the open loop crossover frequency
Phase Margin (deg) 
where
 is the phase margin and
 is the phase (in degrees) at .
2.2 Phase Margin from the Nichols Plot
The Nichols plot is a plot of the open loop magnitude vs. phase. A stable system will have the plot line go to the right of the critical (180 deg) point. At the 0 dB line the difference between the open loop phase and the critical point is the phase margin. While the Nichols plot looks different the phase margin is determined the same way as it was on the Bode plot.
3 Phase Margin Design Guideline
Typically the closed loop system should have at least 40 degrees of phase margin. Often a lead filter can be added to the controller in order to improve the phase margin.