EXHIBIT 24 POWER OF ATTORNEY Know all by these presents, that the undersigned hereby constitutes and appoints each of Nancy L. Berardinelli-Krantz, Ronald J. Edwards, and Dean Brazier, signing singly, the undersigned's true and lawful attorney-in-fact to: (1) execute for and on behalf of the undersigned a Form ID (including amendments thereto), or any other forms prescribed by the Securities and Exchange Commission, that may be necessary to obtain codes and passwords enabling the undersigned to make electronic filings with the Securities and Exchange Commission of the forms referenced in clause (2) below; (2) execute for and on behalf of the undersigned Forms 3, 4, 5, and 144 relating to equity securities of W.W. Grainger, Inc. (the Company) in accordance with Section 16(a) of the Securities Exchange Act of 1934 and the rules thereunder and Rule 144 under the Securities Act of 1933; (3) do and perform any and all acts for and on behalf of the undersigned which may be necessary or desirable to complete any such Form 3, 4, 5, or 144 and timely file the same with the United States Securities and Exchange Commission and any stock exchange or similar authority; and (4) take any other action of any type whatsoever in connection with the foregoing which, in the opinion of the attorney-in-fact, may be of benefit to, in the best interest of, or legally required by, the undersigned, it being understood that the documents executed by the attorney-in-fact on behalf of the undersigned pursuant to this Power of Attorney shall be in such form and shall contain such terms and conditions as the attorney-in-fact may approve in his or her discretion. The undersigned hereby grants to each attorney-in-fact full power and authority to do and perform any and every act and thing whatsoever requisite, necessary or proper to be done in the exercise of any of the rights and powers herein granted, as fully to all intents and purposes as the attorney-in-fact might or could do if personally present, with full power of substitution or revocation, hereby ratifying and confirming all that the attorney-in-fact, or his or her substitute or substitutes, shall lawfully do or cause to be done by virtue of this Power of Attorney and the rights and powers herein granted. The undersigned acknowledges that the attorneys-in-fact, in serving in such capacity at the request of the undersigned, are not assuming, nor is the Company assuming, any of the undersigned's responsibilities to comply with Section 16 of the Securities Exchange Act of 1934 or Rule 144 under the Securities Act of 1933. This Power of Attorney shall remain in full force and effect until the undersigned is no longer required to file Forms 3, 4, 5, and 144 with respect to the undersigned's holdings of and transactions in equity securities of the Company, unless earlier revoked by the undersigned in a signed writing delivered to the attorneys-in-fact. IN WITNESS WHEREOF, the undersigned has caused this Power of Attorney to be executed as of July 31, 2024 and revokes any previously adopted power of attorney with respect to the rights and powers herein granted. /s/Stuart L. Levenick Stuart L. Levenick