<?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>0001256144</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>STUART RANDLE</nameOfPersonForWhoseAccountTheSecuritiesAreToBeSold>
            <relationshipsToIssuer>
                <relationshipToIssuer>Director</relationshipToIssuer>
            </relationshipsToIssuer>
        </issuerInfo>
        <securitiesInformation>
            <securitiesClassTitle>Common</securitiesClassTitle>
            <brokerOrMarketmakerDetails>
                <name>Morgan Stanley Smith Barney LLC</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>10299</noOfUnitsSold>
            <aggregateMarketValue>745994.68</aggregateMarketValue>
            <noOfUnitsOutstanding>63748358</noOfUnitsOutstanding>
            <approxSaleDate>06/08/2023</approxSaleDate>
            <securitiesExchangeName>NASD</securitiesExchangeName>
        </securitiesInformation>
        <securitiesToBeSold>
            <securitiesClassTitle>Common</securitiesClassTitle>
            <acquiredDate>09/22/2015</acquiredDate>
            <natureOfAcquisitionTransaction>Restricted Stock</natureOfAcquisitionTransaction>
            <nameOfPersonfromWhomAcquired>Issuer</nameOfPersonfromWhomAcquired>
            <isGiftTransaction>N</isGiftTransaction>
            <amountOfSecuritiesAcquired>3450</amountOfSecuritiesAcquired>
            <paymentDate>09/22/2015</paymentDate>
            <natureOfPayment>Cash</natureOfPayment>
        </securitiesToBeSold>
        <securitiesToBeSold>
            <securitiesClassTitle>Common</securitiesClassTitle>
            <acquiredDate>02/09/2017</acquiredDate>
            <natureOfAcquisitionTransaction>Restricted Stock</natureOfAcquisitionTransaction>
            <nameOfPersonfromWhomAcquired>Issuer</nameOfPersonfromWhomAcquired>
            <isGiftTransaction>N</isGiftTransaction>
            <amountOfSecuritiesAcquired>2657</amountOfSecuritiesAcquired>
            <paymentDate>02/09/2017</paymentDate>
            <natureOfPayment>Cash</natureOfPayment>
        </securitiesToBeSold>
        <securitiesToBeSold>
            <securitiesClassTitle>Common</securitiesClassTitle>
            <acquiredDate>02/10/2018</acquiredDate>
            <natureOfAcquisitionTransaction>Restricted Stock</natureOfAcquisitionTransaction>
            <nameOfPersonfromWhomAcquired>Issuer</nameOfPersonfromWhomAcquired>
            <isGiftTransaction>N</isGiftTransaction>
            <amountOfSecuritiesAcquired>1987</amountOfSecuritiesAcquired>
            <paymentDate>02/10/2018</paymentDate>
            <natureOfPayment>Cash</natureOfPayment>
        </securitiesToBeSold>
        <securitiesToBeSold>
            <securitiesClassTitle>Common</securitiesClassTitle>
            <acquiredDate>02/13/2019</acquiredDate>
            <natureOfAcquisitionTransaction>Restricted Stock</natureOfAcquisitionTransaction>
            <nameOfPersonfromWhomAcquired>Issuer</nameOfPersonfromWhomAcquired>
            <isGiftTransaction>N</isGiftTransaction>
            <amountOfSecuritiesAcquired>2205</amountOfSecuritiesAcquired>
            <paymentDate>02/13/2019</paymentDate>
            <natureOfPayment>Cash</natureOfPayment>
        </securitiesToBeSold>
        <nothingToReportFlagOnSecuritiesSoldInPast3Months>Y</nothingToReportFlagOnSecuritiesSoldInPast3Months>
        <noticeSignature>
            <noticeDate>06/08/2023</noticeDate>
            <planAdoptionDates/>
            <signature>/s/ Stuart A. Randle</signature>
        </noticeSignature>
    </formData>
</edgarSubmission>
[{"type": "144", "sequence": "1", "filename": "primary_doc.xml", "secsgml_size_bytes": 4926}]
144
0001256144
XXXXXXXX
LIVE
0001124941
BEACON ROOFING SUPPLY INC.
000-50924
505 Huntmar Park Drive, Suite 300
Herndon
VA
20170
(571) 323-3939
STUART RANDLE
Director
Common
Morgan Stanley Smith Barney LLC
1 New York Plaza
38th Floor
New York
NY
10004
10299
745994.68
63748358
06/08/2023
NASD
Common
09/22/2015
Restricted Stock
Issuer
N
3450
09/22/2015
Cash
Common
02/09/2017
Restricted Stock
Issuer
N
2657
02/09/2017
Cash
Common
02/10/2018
Restricted Stock
Issuer
N
1987
02/10/2018
Cash
Common
02/13/2019
Restricted Stock
Issuer
N
2205
02/13/2019
Cash
Y
06/08/2023
/s/ Stuart A. Randle