An image forming apparatus, includes: an image carrier that carries a
developer image by a charge layer provided on a surface of the image
carrier; a charger that charges the image carrier; a feeder that feeds
the charger with a charge; a total charge amount detector that detects
the total amount of the charge output by the feeder; an unsupplied charge
amount calculator that calculates the amount of the charge output by the
feeder but not supplied to the charger; and a layer thickness calculator
that calculates the thickness of the charge layer based on the unsupplied
charge amount calculated by the unsupplied charge amount calculator and
the total charge amount detected by the total charge amount detector.