The invention relates to the field of medical equipment, in particular to a breathing simulator for cardiopulmonary exercise function testing. Cardiopulmonary exercise function testing has gradually become popular in China. It is mainly used in the fields of rehabilitation medicine and sports medicine. It provides clinical guidance with quantifiable data for preoperative evaluation, postoperative rehabilitation, and competitive training, and provides quantifiable data references for clinicians. . Since the gas composition, gas concentration, and gas flow rate inhaled and exhaled by the human body are inconsistent under different conditions of time, environment, and state, and the initial conditions are difficult to reproduce, the cardiopulmonary indicators measured each time are always different. The measurement results The poor reproducibility and consistency of the results hindered further research on cardiopulmonary exercise testing. In order to overcome the deficiencies of the prior art, a breathing simulator for cardiopulmonary exercise function testing is provided, which can relatively stably simulate the gas composition, gas concentration, and gas flow rate inhaled and exhaled by a human body.