$Autocallable Index-Linked Notes due 2027 The Goldman Sachs Group, Inc.Payment at Maturity:The amount that you will be paid on your notes at maturity, if they have not been automatically called, is based on the performance of the underlier with the lowest underlier return.You could lose your entire investment in the notes.Automatic Call:The notes will be automatically called on the call payment date if the closing level of each underlier isgreater than orequal toits initial underlier level on the call observation date. The terms included in the “Key Terms” table below are expected to be as indicated, but such terms will be set on the trade date.Youshould read the disclosure herein to better understand the terms and risks of your investment, including the credit risk of GS Finance Corp. and The Goldman Sachs Group, Inc. See page PS-8.Key Terms Company (Issuer) / Guarantor:GS Finance Corp. / The Goldman Sachs Group, Inc.Aggregate face amount:$Automatic call feature:The notes will be automatically called if the closing level of each underlier is greater than or equal to its initial underlier level on the call observation date. In that case, the company will pay, for each$1,000 of the outstanding face amount, an amount in cash on the call payment date equal to atleast $1,120. ($1,000 × the upside participation rate × the lesser performing underlier return); •if the final underlier level of each underlier is greater than or equal to its trigger buffer level butthe final underlier level of any underlier is equal to or less than its initial underlier level: $1,000;or•if the final underlier level of any underlier is less than its trigger buffer level:$1,000 + ($1,000 × the lesser performing underlier return)Underliers:the Nasdaq-100 Index(current Bloomberg symbol: “NDX Index”) and the S&P 500 Index (current®® Bloomberg symbol: “SPX Index”)Upside participation rate:200%Trigger buffer level:for each underlier, 80% of its initial underlier levelInitial underlier level:with respect to an underlier, an intra-day level or the closing level of such underlier on the tradedateFinal underlier level:with respect to an underlier, the closing level of such underlier on the determination date* Underlier return:with respect to an underlier: (its final underlier level - its initial underlier level) ÷ its initial underlierlevelLesser performing underlierthe underlier return of the lesser performing underlier (the underlier with the lowest underlier return) PS-2Stated maturity date:September 7, 2027*Call observation date:August 31, 2026*Call payment date:September 8, 2026** subject to adjustment as described in the accompanying general terms supplement investment in notes will depend in part on the issue price you pay for such notes.GS Finance Corp. may use this prospectus in the initial sale of the notes. In addition, Goldman Sachs & Co. LLC orany other affiliate of GS Finance Corp. may use this prospectus in a market-making transaction in a note after its initial The notes are part of the Medium-Term Notes, Series F program of GS Finance Corp. and are fully andunconditionally guaranteed by The Goldman Sachs Group, Inc. This prospectus includes this pricing supplement and below, does not set forth all of the terms of your notes and therefore should be read in conjunction with suchdocuments: •Underlier supplement no. 45 dated June 23, 2025•Prospectus supplement dated February 14, 2025•Prospectus dated February 14, 2025 responsibility for, and can provide no assurance as to the reliability of, any other information that others may provide.This pricing supplement and the accompanying documents listed above are an offer to sell only the notes offeredhereby, but only under circumstances and in jurisdictions where it is lawful to do so. The information contained in thispricing supplement and the accompanying documents listed above is current only as of the respective dates of suchdocuments.We refer to the notes we are offering by this pricing supplement as the “offered notes” or the “notes”. Each of theoffered notes has the terms described below. Please note that in this pricing supplement, references to “GS FinanceCorp.”, “we”, “our” and “us” mean only GS Finance Corp. and do not include its subsidiaries or affiliates, references to“The Goldman Sachs Group, Inc.”, our parent company, mean only The Goldman Sachs Group, Inc. and do not 20, 2015, each among us, as issuer, The Goldman Sachs Group, Inc., as guarantor, and The Bank of New YorkMellon, as trustee. This indenture, as so supplemented and as further supplemented thereafter, is referred to as the The notes will be issued in book-entry form and represented by master note no. 3, dated March 22, 2021. hypothetical closing levels of the underliers on the call observation date could have on the amount payable, if any, onthe call payment date and (ii) the impact that the various hypothetical closing levels of the lesser performing underlier The information in the fol