Hall sensors are magnetic sensors that are always used in conjunction with magnets. As we know, the closer a magnet is to its poles, the stronger its magnetic field becomes. The magnetic field strength increases as the magnet moves away from its poles. Therefore, the technical term for this magnetic field condition is “magnetic field gradient.”
The types of motion between the active magnet and the Hall switch include: (a) linear translation; (b) lateral translation; (c) rotation; (d) occlusion.
To ensure the switch operates optimally, it is essential that the magnetic flux lines cross the active area perpendicularly and maintain the correct polarity as they do so. If the flux lines are not perpendicular, their perpendicular component must be calculated to determine the magnetic flux density of the measured magnetic field. For extremely small dimensions, magnetic field strength is measured at multiple points, and calculations are performed to determine the magnetic field distribution and the Hall output voltage.
The formula for calculating magnetic field strength is as follows, magnets are typically round in shape.

Common types of round magnets: Neodymium round magnets, Ferrite round magnets
Articles related to magnetic field strength;
How can the surface magnetic field of a 42H magnet be over 500 mT?
Why are some magnetic encoders not affected by strong magnetic fields?
China Neodymium And Ferrite Magnets Manufacturer & Supplier