Exhibit 23.1
CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM
We consent to incorporation by reference in the Registration Statement Form S-8 (No. 333-208647) of Canadian Pacific Kansas City Limited of our report dated June 23, 2023, appearing in this Annual Report on Form 11-K of CP 401(k) Savings Plan for the year ended December 31, 2022.
/s/ Armanino LLP
St. Louis, Missouri
June 23, 2023