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>0001469527</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>Wexler Seth David</nameOfPersonForWhoseAccountTheSecuritiesAreToBeSold>
        <relationshipsToIssuer>
          <relationshipToIssuer>Officer</relationshipToIssuer>
        </relationshipsToIssuer>
      </issuerInfo>
      <securitiesInformation>
        <securitiesClassTitle>Common</securitiesClassTitle>
        <brokerOrMarketmakerDetails>
          <name>Fidelity Brokerage Services LLC</name>
          <address>
            <com:street1>245 Summer Street</com:street1>
            <com:city>Boston</com:city>
            <com:stateOrCountry>MA</com:stateOrCountry>
            <com:zipCode>02110</com:zipCode>
          </address>
        </brokerOrMarketmakerDetails>
        <noOfUnitsSold>37500</noOfUnitsSold>
        <aggregateMarketValue>588937.50</aggregateMarketValue>
        <noOfUnitsOutstanding>207993589</noOfUnitsOutstanding>
        <approxSaleDate>09/13/2023</approxSaleDate>
        <securitiesExchangeName>NASDAQ</securitiesExchangeName>
      </securitiesInformation>
      <securitiesToBeSold>
        <securitiesClassTitle>Common</securitiesClassTitle>
        <acquiredDate>04/26/2022</acquiredDate>
        <natureOfAcquisitionTransaction>Long term incentive plan</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>Issuer</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>46943</amountOfSecuritiesAcquired>
        <paymentDate>04/26/2022</paymentDate>
        <natureOfPayment>Compensation</natureOfPayment>
      </securitiesToBeSold>
      <nothingToReportFlagOnSecuritiesSoldInPast3Months>Y</nothingToReportFlagOnSecuritiesSoldInPast3Months>
      <noticeSignature>
        <noticeDate>09/13/2023</noticeDate>
        <signature>/s/ Cristina Garcia, as a duly authorized representative of Fidelity Brokerage Services LLC, as attorney-in-fact for Wexler Seth David</signature>
      </noticeSignature>
    </formData>
  </edgarSubmission>
metadata_documents: [{"type": "144", "sequence": "1", "filename": "primary_doc.xml", "secsgml_size_bytes": 2902}]
text: 144
  0001469527
  XXXXXXXX
  LIVE
  0000889900
  PATTERSON UTI ENERGY INC
  001-39270
  10713 WEST SAM HOUSTON PARKWAY NORTH
  SUITE 800
  HOUSTON
  TX
  77064
  2817657100
  Wexler Seth David
  Officer
  Common
  Fidelity Brokerage Services LLC
  245 Summer Street
  Boston
  MA
  02110
  37500
  588937.50
  207993589
  09/13/2023
  NASDAQ
  Common
  04/26/2022
  Long term incentive plan
  Issuer
  N
  46943
  04/26/2022
  Compensation
  Y
  09/13/2023
  /s/ Cristina Garcia, as a duly authorized representative of Fidelity Brokerage Services LLC, as attorney-in-fact for Wexler Seth David