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

    <schemaVersion>X0304</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2012-01-18</periodOfReport>

    <issuer>
        <issuerCik>0000352915</issuerCik>
        <issuerName>UNIVERSAL HEALTH SERVICES INC</issuerName>
        <issuerTradingSymbol>UHS</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001181037</rptOwnerCik>
            <rptOwnerName>DUCAT LEATRICE</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>NDRI</rptOwnerStreet1>
            <rptOwnerStreet2>1628 JFK BOULEVARD, 8TH FLOOR</rptOwnerStreet2>
            <rptOwnerCity>PHILADELPHIA</rptOwnerCity>
            <rptOwnerState>PA</rptOwnerState>
            <rptOwnerZipCode>19103</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>1</isDirector>
        </reportingOwnerRelationship>
    </reportingOwner>

    <derivativeTable>
        <derivativeTransaction>
            <securityTitle>
                <value>Option To Purchase Class B Common Stock</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>36.95</value>
            </conversionOrExercisePrice>
            <transactionDate>
                <value>2012-01-18</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
                <footnoteId id="F1"/>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>15000</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <exerciseDate>
                <footnoteId id="F2"/>
            </exerciseDate>
            <expirationDate>
                <value>2017-01-18</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Class B Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>15000</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>15000</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeTransaction>
    </derivativeTable>

    <footnotes>
        <footnote id="F1">Option granted to purchase shares of Class B Common Stock under the Company's Second Amended and Restated 2005 Stock Incentive Plan.</footnote>
        <footnote id="F2">The option vests ratably on each of 1/18/2013, 1/18/2014, 1/18/2015 and 1/18/2016.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Steve Filton, Attorney-in-Fact for Ms. Ducat</signatureName>
        <signatureDate>2012-01-19</signatureDate>
    </ownerSignature>
</ownershipDocument>
