The information in this preliminary pricing supplement is not complete and may be changed. This preliminary pricingsupplement is not an offer to sell nor does it seek an offer to buy these securities in any jurisdiction where the offer or saleis not permitted. Subject to Completion. Dated June 2, 2025.$ The Goldman Sachs Group, Inc. Callable Fixed Rate Notes due 2033 We will pay you interest on your notes at a rate of 5.10% per annum from and including the original issue date(expected to be June 13, 2025) to but excluding the stated maturity date (expected to be June 13, 2033). Interest willbe paid on each interest payment date (expected to be June 13 and December 13 of each year). The first suchpayment will be made on the first interest payment date (expected to be December 13, 2025). In addition, we may redeem the notes at our option, in whole but not in part, on each redemption date(expected to be each March 13, June 13, September 13 and December 13 on or after June 13, 2028), upon atleast five business days’ prior notice, at a redemption price equal to 100% of the outstanding principal amountplus accrued and unpaid interest to but excluding the redemption date. Initial price to public*Underwriting discount* The initial price to public will vary between% and 100% for certain investors; see “Supplemental Plan of Distribution” onpage PS-7. The initial price to public set forth above does not include accrued interest, if any. Interest on the notes will accrue fromthe original issue date and must be paid by the purchaser if the notes are delivered after the original issue date. Inaddition to offers and sales at the initial price to public, the underwriters may offer the notes from time to time for sale inone or more transactions at market prices prevailing at the time of sale, at prices related to market prices or at The return (whether positive or negative) on your investment in notes will depend in part on the issue price you pay forsuch notes. Neither the Securities and Exchange Commission nor any other regulatory body has approved or disapprovedof these securities or passed upon the accuracy or adequacy of this prospectus. Any representation to thecontrary is a criminal offense. The notes are not bank deposits and are not insured by the Federal Deposit Insurance Corporation or anyother governmental agency, nor are they obligations of, or guaranteed by, a bank. Goldman Sachs & Co. LLC Pricing Supplement No.dated June, 2025. About Your Prospectus The notes are part of the Medium-Term Notes, Series N program of The Goldman Sachs Group, Inc. This prospectusincludes this pricing supplement and the accompanying documents listed below. This pricing supplement constitutes asupplement to the documents listed below and should be read in conjunction with such documents: •Prospectus supplement dated February 14, 2025•Prospectus dated February 14, 2025 SPECIFIC TERMS OF THE NOTES Please note that in this section entitled “Specific Terms of the Notes”, references to “The Goldman Sachs Group,Inc.”, “we”, “our” and “us” mean only The Goldman Sachs Group, Inc. and do not include any of its subsidiaries oraffiliates. Also, in this section, references to “holders” mean The Depository Trust Company (DTC) or its nomineeand not indirect owners who own beneficial interests in notes through participants in DTC. Please review the special This pricing supplement no.dated June, 2025 (pricing supplement) and the accompanying prospectus datedFebruary 14, 2025 (accompanying prospectus), relating to the notes, should be read together. Because the notes arepart of a series of our debt securities called Medium-Term Notes, Series N, this pricing supplement and theaccompanying prospectus should also be read with the accompanying prospectus supplement, dated February 14, The notes are part of a separate series of our debt securities under our Medium-Term Notes, Series N programgoverned by our Senior Debt Indenture, dated as of July 16, 2008, as amended, between us and The Bank of NewYork Mellon, as trustee. This pricing supplement summarizes specific terms that will apply to your notes. The terms ofthe notes described here supplement those described in the accompanying prospectus supplement and accompanying Issuer:The Goldman Sachs Group, Inc. Principal amount:$ Specified currency:U.S. dollars ($) Type of Notes:Fixed rate notes (notes) Denominations:$1,000 and integral multiples of$1,000 in excess thereof Trade date:expected to be June 11, 2025 Day count convention:30/360 (ISDA), as furtherdiscussed under “Additional Information About theNotes — Day Count Convention” on page PS-5of this Original issue date (set on the trade date):expectedto beJune 13, 2025 Stated maturity date (set on the tradedate):expected to be June 13, 2033 Supplemental discussion of U.S. federal income taxconsequences:It is the opinion of Sidley Austin that interest on a note will be taxable to a U.S.holder as ordinary interest income a