This paper demonstrates a method to calculate the magnetic field distribution in and around a 3D object when it is magnetized by a strong homogeneous magnetic field. The numerical technique is based on the explicit finite difference method. The calculation method is validated against analytical solutions for a sphere. As an application cylinders with different ratios of lengths and diameter are studied.