The star formation history in I Zw 18 has been inferred from Hubble Space Telescope Wide Field Planetary Camera 2 archival data. This is done by comparing the derived V, B-V and V, V-I color-magnitude diagrams and luminosity functions with synthetic ones, based on various sets of stellar evolutionary tracks. At a distance of 10 Mpc, the stars resolved in the held of I Zw 18 allow for a look-back time up to 1 Gyr. We find that the main body is not experiencing its first episode of star formation. Instead, it has been forming stars over the last 0.5-1 Gyr, at a rate of similar to(1-2) x 10(-2) M(.) yr(-1) kpc(-2). A more intense activity of (6-16) x 10(-2) M(.) yr(-1) kpc(-2) has taken place between 15 and 20 Myr ago. For the secondary body, the look-back time is 0.2 Gyr at most and the uncertainty is much higher because of the shallower diagrams and the small. number of resolved stars. The derived range of star formation rate is (3-10) x 10(-3) M(.) yr(-1) kpc(-2). The IMF providing the best fit to the observed stellar populations in the main body has a slope 1.5, much flatter than in any similar galaxy analyzed with the same method. In the secondary body, it is peaked at alpha similar or equal to 2.2, closer to Salpeter's slope (alpha = 2.35).