An experiment is described in which a small strong cylindrical magnet is levitated by a vertical non-uniform alternating magnetic field. Surprisingly, no superimposed constant field is necessary, but the levitation can be explained when the vertical motion of the magnet is taken into account. The theoretical mean levitation force is (0.26 ± 0.06) N, which is in good agreement with the levitated weight of (0.239 ± 0.001) N. This experiment is suitable for an undergraduate laboratory, particularly as a final year project. Students have found it interesting, and it sharpens up knowledge of basic magnetism.