According to the magnetizing principle of a steel cuboid (the magnetic charges distribute uniformly along all edges) and the magnetizing law of magnetic medium, the approximate analytical expressions for the linear magnetic charge density along all edges of both the steel cuboid and the cuboid with a rectangular slot magnetized longitudinally were given. It was concluded that the linear law between slot depth and the magnetic leakage field caused by the slot was approximate.