Extensive simulations are performed to investigate effects of electron cyclotron instabilities on the gyrotron beam quality, using two-dimensional axisymmetric particle-in-cell (PIG) codes. Both electrostatic and electromagnetic models, as well as realistic geometries of the gyrotron, are considered. It is found that a large beam density can lead to an electrostatic-instability-induced energy spread which substantially degrades the gyrotron efficiency. (C) 1997 American institute of Physics.