Research on cannabis oil has evolved to encompass the pharmaceutical industry for the therapeutic potential of the active compounds for pathologies such as Alzheimer, auto-immune disorders, and cancer. These debilitating diseases are best treated with cannabinoids such as tetrahydrocannabinol (∆9-THC), cannabigerol (CBG), and cannabinol (CBN), which relieve neuropathic pain and stimulate the immune system. We extracted cannabinoids from plants with supercritical CO2 and produced an extract with a total yield close to 26%. The three-level Box–Behnken experimental design considered four factors: Temperature, pressure, CO2 flow rate, and processing time, with predetermined parameters at low, medium, and high levels. The mathematical model was evaluated by regression analysis. The yield of ∆9-THC and CBG reached a maximum after 2 h and 15 g/min of CO2, 235 bar, 55 °C (64.3 g THC/100 g of raw material and 4.6 g CBG/100 g of raw material). After another 2 h of extraction time, the yield of CBN reached 2.4 g/100 g. The regression analysis identified pressure and time as the only significant factors for total yield while pressure was the only significant factor for ∆9-THC and CBG. Time, temperature, pressure, and flow rate were all significant factors for CBN.