TOPAZ0 4.0: A new version of a computer program for evaluation of de-convoluted and realistic observables at LEP 1 and LEP 2. The program TOPAZ0 was developed for computing a variety of physical observables which are related to the e+e− annihilation into fermion pairs and to the large angle Bhabha scattering around the Z resonance. Among them the Z parameters or pseudo-observables, the deconvoluted cross sections and those dressed with QED radiation, and finally the forward—backward asymmetries. The calculations are performed both for a completely inclusive experimental setup and for a realistic one, i.e. a setup with cuts on the acollinearity angle, on the energy of the outgoing fermions or on their invariant mass and angular acceptance. The new version, 4.0, includes several innovative features. First of all, the most important new capabilities since previous versions are electroweak, QCD and QED correction factors that are relevant at the Z resonance in the light of the present experimental accuracy. Among them, the effect of the next-to-leading O(α2m2l) corrections, the radiative corrections to the hadronic decay of the Z, providing complete corrections of O(ααs) to Γ(Z → qq¯) with q = u, d, s, c, and b, and leading O(α3) QED corrections. Secondly, the program has been upgraded to cover two-fermion final states at LEP 2 energies, where some of the assumptions made for earlier versions are no longer valid. In particular, to this aim all the electroweak radiative corrections relevant far from the Z peak have been added for s-channel processes, e.g. purely weak boxes, next-to-leading O(α2) and leading O(α3) QED corrections.