The cubic phase mask is an approximate theoretical solution for extension of depth-of-field (DOF) in the computational opto-electronic imaging system. In the practice, it does not provide an infinite depth of field. Especially the cubic coefficient needs to be determined for a given optical system and a requested extension of the DOF. Many other approaches using a variety of masks have been proposed. In this paper we propose a polynomial phase mask, which is still separable in the Cartesian coordinate system, as the cubic mask. The phase contains 16 terms of odd powers and was optimized by the simulated annealing. The cost function was designed for invariance of the MTF curves with a full range of depth-of-field of ±200 μm in a biomedical microscope. This number of polynomial coefficients provides the optimization with a necessary number degree of freedom. We introduced a target MTF to assist the simulated annealing, which was defined iteratively from the ideal MTF to a more practical and achievable target MTF. Our result is compared with that of the recently published approaches. The experimental results with digital restoration of images using the invariant MTF are also shown.© (2007) COPYRIGHT SPIE--The International Society for Optical Engineering. Downloading of the abstract is permitted for personal use only.