The formula for the lens is derived based on the information of instantaneous focal function. Focal function is an important tool in designing lenses with extended depth of focus (EDoF) because this allows EDoF lens designers to try out various mathematical curves using computers to optimize their design. Once an optimal focal function information is obtained, the corresponding physical EDoF lens can be fabricated using the lens equation formulated in this presentation.