We propose an analytical computation of the magnetic field distribution in a magnetic gear. The analytical method is based on the resolution of Laplace's and Poisson's equations (by the separation of variables technique) for each subdomain, i.e., magnets, air gap, and slots. The global solution is obtained using boundary and continuity conditions. Our analytical model can be used as a tool for design optimization of a magnetic gear. Here, we compare magnetic field distributions and electromagnetic torque computed by the analytical method with those obtained from finite-element analyses.