An image forming apparatus includes a latent image forming unit that forms a latent image on an image bearing member, a developing unit that develops the latent image to obtain a developer image, and a transfer unit that transfers the developer image to a recording medium. A first supply unit supplies a voltage to a charging unit and the transfer unit, with the first supply unit including a transformer, and a second supply unit supplies a voltage to the transfer unit, with the second supply unit including a transformer and supplying a voltage supplied opposite in polarity to the voltage supplied from the first supply unit. In addition, a detection unit detects current flowing through the transfer unit, and a control unit is configured to control power supply. When a power is supplied from the first supply unit to the charging unit, the control unit sets a discharge start voltage in which discharging starts between the image bearing member and the charging unit is based on a current detected by the detection unit, and when power is supplied from the second supply unit to the transfer unit, the control unit sets one or more adjusted voltages by calculating one or more voltages to be supplied from the transfer unit so that a current detected by the detection unit is to be a predetermined value. The first supply unit supplies a voltage to the charging unit based on the discharge start voltage and the adjusted voltage set by the control unit.