content: <?xml version="1.0" encoding="UTF-8"?><edgarSubmission xmlns="http://www.sec.gov/edgar/ownership" xmlns:com="http://www.sec.gov/edgar/common">
    <headerData>
      <submissionType>144</submissionType>
      <filerInfo>
        <filer>
          <filerCredentials>
            <cik>0001645511</cik>
            <ccc>XXXXXXXX</ccc>
          </filerCredentials>
        </filer>
        <liveTestFlag>LIVE</liveTestFlag>
  
  
  
      </filerInfo>
    </headerData>
    <formData>
      <issuerInfo>
        <issuerCik>0000889900</issuerCik>
        <issuerName>PATTERSON UTI ENERGY INC</issuerName>
        <secFileNumber>001-39270</secFileNumber>
        <issuerAddress>
          <com:street1>10713 WEST SAM HOUSTON PARKWAY NORTH</com:street1>
          <com:street2>SUITE 800</com:street2>
          <com:city>HOUSTON</com:city>
          <com:stateOrCountry>TX</com:stateOrCountry>
          <com:zipCode>77064</com:zipCode>
        </issuerAddress>
        <issuerContactPhone>2817657100</issuerContactPhone>
        <nameOfPersonForWhoseAccountTheSecuritiesAreToBeSold>Drummond Robert Wayne Jr</nameOfPersonForWhoseAccountTheSecuritiesAreToBeSold>
        <relationshipsToIssuer>
          <relationshipToIssuer>Director</relationshipToIssuer>
        </relationshipsToIssuer>
      </issuerInfo>
      <securitiesInformation>
        <securitiesClassTitle>Common</securitiesClassTitle>
        <brokerOrMarketmakerDetails>
          <name>Fidelity Brokerage Services LLC</name>
          <address>
            <com:street1>900 Salem Street</com:street1>
            <com:city>Smithfield</com:city>
            <com:stateOrCountry>RI</com:stateOrCountry>
            <com:zipCode>02917</com:zipCode>
          </address>
        </brokerOrMarketmakerDetails>
        <noOfUnitsSold>230000</noOfUnitsSold>
        <aggregateMarketValue>2045017.24</aggregateMarketValue>
        <noOfUnitsOutstanding>386390297</noOfUnitsOutstanding>
        <approxSaleDate>02/14/2025</approxSaleDate>
        <securitiesExchangeName>NASDAQ</securitiesExchangeName>
      </securitiesInformation>
      <securitiesToBeSold>
        <securitiesClassTitle>Common</securitiesClassTitle>
        <acquiredDate>09/01/2023</acquiredDate>
        <natureOfAcquisitionTransaction>Restricted Stock Vesting</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>Issuer</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>230000</amountOfSecuritiesAcquired>
        <paymentDate>09/01/2023</paymentDate>
        <natureOfPayment>Compensation</natureOfPayment>
      </securitiesToBeSold>
      <nothingToReportFlagOnSecuritiesSoldInPast3Months>Y</nothingToReportFlagOnSecuritiesSoldInPast3Months>
      <noticeSignature>
        <noticeDate>02/14/2025</noticeDate>
        <signature>/s/ Andrew Glade, as a duly authorized representative of Fidelity Brokerage Services LLC, as attorney-in-fact for Robert W. Drummond Jr</signature>
      </noticeSignature>
    </formData>
  </edgarSubmission>
metadata_documents: [{"type": "144", "sequence": "1", "filename": "primary_doc.xml", "secsgml_size_bytes": 2918}]
text: 144
  0001645511
  XXXXXXXX
  LIVE
  0000889900
  PATTERSON UTI ENERGY INC
  001-39270
  10713 WEST SAM HOUSTON PARKWAY NORTH
  SUITE 800
  HOUSTON
  TX
  77064
  2817657100
  Drummond Robert Wayne Jr
  Director
  Common
  Fidelity Brokerage Services LLC
  900 Salem Street
  Smithfield
  RI
  02917
  230000
  2045017.24
  386390297
  02/14/2025
  NASDAQ
  Common
  09/01/2023
  Restricted Stock Vesting
  Issuer
  N
  230000
  09/01/2023
  Compensation
  Y
  02/14/2025
  /s/ Andrew Glade, as a duly authorized representative of Fidelity Brokerage Services LLC, as attorney-in-fact for Robert W. Drummond Jr