The influence of different temperatures, pressures, and flow rates on the supercritical fluid extraction (SFE) of oil from Pinus gerardiana was investigated. Extraction was designed using the Box‐Behnken design and artificial neural network. Furthermore, a mathematical model of broken and intact cells was applied to consider mass transfer kinetics of extracted natural materials. The experimental oil extraction was performed by Soxhlet and supercritical carbon dioxide methods and the yield and composition of the obtained oils was compared. Although the yield of the SFE process was lower than that of the Soxhlet extraction, the SFE presented the advantage of shorter extraction time and lower temperatures. Also, the chemical compositions of the obtained oils from Soxhlet and SFE processes were the same.