Modified second order perturbed Heisenberg Hamiltonian was employed to describe the magnetic properties of ferromagnetic films with three to twenty spin layers for the first time. Previously, the solution of second order perturbed Heisenberg Hamiltonian was found for ferromagnetic films with two to five layers under some assumptions by us. In this report, the exact solution is presented without any assumptions by calculating the pseudo inverse of matrix C. All eight magnetic parameters such as spin exchange interaction, second order magnetic anisotropy, fourth order magnetic anisotropy, stress induced magnetic anisotropy, demagnetization factor, in plane magnetic field, out of plane magnetic field and magnetic dipole interaction were taken into account. The easy and hard directions were found using 3-D and 2-D plots of total magnetic energy versus these magnetic parameters. Angle between easy and hard directions was nearly 107 degrees in many cases. The magnetic easy axis gradually rotates from out of plane to in plane direction by indicating a preferred in plane orientation of magnetic easy axis for films with higher number of spin layers. These theoretical results agree with some experimental research data of ferromagnetic thin films.