For magnetic field calculations, cylindrical permanent magnets are often approximated as ideal, azimuthally symmetric solenoids. Despite the frequent usage of this approximation, research papers demonstrating the validity and limitations of this approach are scarcely available. In this paper, the experimentally derived magnetic field of a cylindrical permanent magnet is compared with the analytically calculated magnetic field of an ideal solenoid. An experimental setup for measuring the magnetic field distribution is demonstrated and employed for gathering the data. The proposed setup allows to measure the distributions of the axial and radial components of the magnetic field surrounding the magnet. The experimental data is in a very good agreement with the theoretical predictions, confirming the validity of using the model of an ideal solenoid for predicting a magnetic field distribution of a permanent magnet.