1. An image forming apparatus for forming an image which has a predetermined target density, comprising: a photosensitive member; electrifying means which electrifies a surface of said photosensitive member; exposing means which forms an electrostatic latent image on the electrified surface of said photosensitive member; developing means which visualizes said electrostatic latent image with a toner to form a toner image; transferring means which transfers the toner image from said photosensitive member to a transfer medium; density detecting means which detects an image density of the toner image on said photosensitive member or on said transfer medium as a patch image; and control means which controls an electrifying bias to be supplied to said electrifying means and a development bias to be supplied to said developing means based on a result of the detection obtained by said density detecting means so as to adjust an image density of the toner image to the target density, wherein said control means performs a development bias calculation and an electrifying bias calculation in this order, said development bias calculation in which after sequentially forming a plurality of toner images as first patch images while changing said development bias, densities of said first patch images are detected, and an optimal development bias, which is necessary to obtain the target density, is determined based on the densities of said first patch images, said electrifying bias calculation in which after sequentially forming a plurality of toner images as second patch images while changing said electrifying bias with said development bias fixed to said optimal development bias, densities of said second patch images are detected, and an optimal electrifying bias, which is necessary to obtain the target density, is determined based on the densities of said second patch images.