<?xml version="1.0" encoding="UTF-8"?><edgarSubmission xmlns="http://www.sec.gov/edgar/ownership" xmlns:ns2="http://www.sec.gov/edgar/common">
    <headerData>
        <submissionType>144</submissionType>
        <filerInfo>
            <filer>
                <filerCredentials>
                    <cik>0001237784</cik>
                    <ccc>XXXXXXXX</ccc>
                </filerCredentials>
            </filer>
            <liveTestFlag>LIVE</liveTestFlag>



        </filerInfo>
    </headerData>
    <formData>
        <issuerInfo>
            <issuerCik>0001124941</issuerCik>
            <issuerName>BEACON ROOFING SUPPLY, INC.</issuerName>
            <secFileNumber>000-50924</secFileNumber>
            <issuerAddress>
                <ns2:street1>505 Huntmar Park Drive, Suite 300</ns2:street1>
                <ns2:city>Herndon</ns2:city>
                <ns2:stateOrCountry>VA</ns2:stateOrCountry>
                <ns2:zipCode>20170</ns2:zipCode>
            </issuerAddress>
            <issuerContactPhone>(571) 323-3939</issuerContactPhone>
            <nameOfPersonForWhoseAccountTheSecuritiesAreToBeSold>Robert M. McLaughlin</nameOfPersonForWhoseAccountTheSecuritiesAreToBeSold>
            <relationshipsToIssuer>
                <relationshipToIssuer>Director</relationshipToIssuer>
            </relationshipsToIssuer>
        </issuerInfo>
        <securitiesInformation>
            <securitiesClassTitle>Common</securitiesClassTitle>
            <brokerOrMarketmakerDetails>
                <name>Morgan Stanley Smith Barney LLC Executive Financial Services</name>
                <address>
                    <ns2:street1>1 New York Plaza</ns2:street1>
                    <ns2:street2>38th Floor</ns2:street2>
                    <ns2:city>New York</ns2:city>
                    <ns2:stateOrCountry>NY</ns2:stateOrCountry>
                    <ns2:zipCode>10004</ns2:zipCode>
                </address>
            </brokerOrMarketmakerDetails>
            <noOfUnitsSold>1500</noOfUnitsSold>
            <aggregateMarketValue>113788.65</aggregateMarketValue>
            <noOfUnitsOutstanding>63157642</noOfUnitsOutstanding>
            <approxSaleDate>11/10/2023</approxSaleDate>
            <securitiesExchangeName>NASDAQ</securitiesExchangeName>
        </securitiesInformation>
        <securitiesToBeSold>
            <securitiesClassTitle>Common</securitiesClassTitle>
            <acquiredDate>02/10/2018</acquiredDate>
            <natureOfAcquisitionTransaction>Restricted Stock</natureOfAcquisitionTransaction>
            <nameOfPersonfromWhomAcquired>Issuer</nameOfPersonfromWhomAcquired>
            <isGiftTransaction>N</isGiftTransaction>
            <amountOfSecuritiesAcquired>1500</amountOfSecuritiesAcquired>
            <paymentDate>02/10/2018</paymentDate>
            <natureOfPayment>Not Applicable</natureOfPayment>
        </securitiesToBeSold>
        <nothingToReportFlagOnSecuritiesSoldInPast3Months>Y</nothingToReportFlagOnSecuritiesSoldInPast3Months>
        <remarks>Sales that were executed on November 10, 2023 are being reported on this Form 144 filed on November 13, 2023 given the EDGAR system was not accepting filings on November 10 in observance of the federal holiday.
</remarks>
        <noticeSignature>
            <noticeDate>11/13/2023</noticeDate>
            <planAdoptionDates/>
            <signature>/s/ Robert Michael McLaughlin</signature>
        </noticeSignature>
    </formData>
</edgarSubmission>
[{"type": "144", "sequence": "1", "filename": "primary_doc.xml", "secsgml_size_bytes": 3488}]
144
0001237784
XXXXXXXX
LIVE
0001124941
BEACON ROOFING SUPPLY, INC.
000-50924
505 Huntmar Park Drive, Suite 300
Herndon
VA
20170
(571) 323-3939
Robert M. McLaughlin
Director
Common
Morgan Stanley Smith Barney LLC Executive Financial Services
1 New York Plaza
38th Floor
New York
NY
10004
1500
113788.65
63157642
11/10/2023
NASDAQ
Common
02/10/2018
Restricted Stock
Issuer
N
1500
02/10/2018
Not Applicable
Y
Sales that were executed on November 10, 2023 are being reported on this Form 144 filed on November 13, 2023 given the EDGAR system was not accepting filings on November 10 in observance of the federal holiday.
11/13/2023
/s/ Robert Michael McLaughlin