Advances in MEMS/NEMS techniques have enabled high-Q whispering-gallery modes in integrated microcavities. Potential applications of optical microcavities include quantum informatics, novel micro/nano sources, dynamic filters, and micro/nanosensors. It is important to understand the intrinsic resonant modes of a cavity. In this report, we will analyze whispering-gallery modes in resonators of planar structure which is common in MEMS devices. The wave equation is solved by using the method of separation of variables with appropriate boundary conditions. Analytical formulations are established. The resonance frequencies as well as the electric field distributions in exemplary resonators are presented for a variety of whispering-gallery modes.