An image forming apparatus includes: an image carrier that rotates and
carries a toner image by a surface layer disposed on a surface thereof; a
charging roll that charges the surface layer while the image carrier
completes one or more rotations; a power supply unit that supplies a
current to the charging roll; a detector that samples and detects the
current that the power supply unit outputs; a leak current detector that
detects a leak current included in the current that the detector has
detected; a layer thickness calculating unit that calculates a numerical
value relating to the thickness of the surface layer on the basis of the
current that the detector has detected; and a current leak state
determining unit that determines a current leak state on the basis of the
current that the detector has detected and the leak current that the leak
current detector has detected.