The mathematical model of a semi-batch supercritical fluid extraction process has been derived; its implementation is divided into two distinct stages. Firstly, the differential equations that represent the dynamic behavior of the process are derived. Secondly, a thermodynamic model suitable for representation of phase behavior is selected and the algebraic equations and the parameters which describe the process are identified. The proposed algorithm is used to simulate the fractionation of ethanol from a water mixture using carbon dioxide, and the supercritical extraction of citral from lemon oil with carbon dioxide. The program is applicable to the simulation of extraction from liquids and, with some modifications, from solids.