We derive semiclassical quantization equations for graphene mono- and bilayer systems where the excitations are confined by the applied inhomogeneous magnetic field. The importance of a semiclassical phase, a consequence of the spinor nature of the excitations, is pointed out. The semiclassical eigenenergies show good agreement with the results of quantum mechanical calculations based on the Dirac equation of graphene and with numerical tight binding calculations.