Cardiopulmonary exercise testing (CPET) assesses exercise capacity and causes of exercise limitation in patients with pulmonary hypertension (PH). At altitude, changes occur in the ventilatory pattern and a decrease in arterial oxygen pressure in healthy; these changes are increased in patients with cardiopulmonary disease. Our objective was to compare the response to exercise and gas exchange between patients with pulmonary arterial hypertension (PAH) and chronic thromboembolic pulmonary hypertension (CTEPH) residing at the altitude of Bogotá (2640 m). All patients performed an incremental CPET with measurement of oxygen consumption ( ), dead space (VD/VT), ventilatory equivalents (VE/ ), and alveolar-arterial oxygen gradient ( ). test and one-way analysis of variance were used for comparisons between PAH and CTEPH. We included 53 patients, 29 with PAH, 24 with CTEPH, and 102 controls as a reference of the normal response to exercise at altitude. CTEPH patients had a higher New York Health Association (NYHA) functional class than PAH (p = 0.037). There were no differences between patients with PAH and CTEPH in hemodynamics and % of predicted (67.8 18.7 vs. 66.0 19.8, p 0.05), but those with CTEPH had higher dyspnea, VD/VT (0.36 0.09 vs. 0.23 0.9, p 0.001), VE/ (45.8 7.1 vs. 39.3 5.6, p 0.001), and (19.9 7.6 vs. 13.5 7.6, p 0.001) than PAH patients. At altitude, patients with PH present severe alterations in gas exchange during exercise. There were no differences in exercise capacity between PAH and CTEPH, but patients with CTEPH had more dyspnea and greater alterations in gas exchange during exercise. CPET made it possible to identify alterations related to the pathophysiology of CTEPH that could explain the functional class and dyspnea in these patients.