<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0306</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2018-05-22</periodOfReport>

    <notSubjectToSection16>0</notSubjectToSection16>

    <issuer>
        <issuerCik>0001035983</issuerCik>
        <issuerName>COMFORT SYSTEMS USA INC</issuerName>
        <issuerTradingSymbol>FIX</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001563462</rptOwnerCik>
            <rptOwnerName>Skidmore Constance Ellen</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>C/O COMFORT SYSTEMS USA, INC.</rptOwnerStreet1>
            <rptOwnerStreet2>675 BERING DRIVE, SUITE 400</rptOwnerStreet2>
            <rptOwnerCity>HOUSTON</rptOwnerCity>
            <rptOwnerState>TX</rptOwnerState>
            <rptOwnerZipCode>77057</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>1</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle></officerTitle>
            <otherText></otherText>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2018-05-22</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>3453</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                    <footnoteId id="F1"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>30864</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <derivativeTable></derivativeTable>

    <footnotes>
        <footnote id="F1">Shares granted pursuant to the 2017 Omnibus Incentive Plan as approved by stockholders on May 23, 2017. Non-employee directors are given an annual grant of Comfort Systems USA Common Stock following election or reelection at the Company's annual stockholders' meeting. This year's grant is equal to $160,000 as rounded down to the nearest whole share based on the average of the high and low price of the Company's Common Stock on the day of the annual stockholders' meeting.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Trent T. McKenna, by power of attorney</signatureName>
        <signatureDate>2018-05-23</signatureDate>
    </ownerSignature>
</ownershipDocument>
