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

    <schemaVersion>X0201</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2004-04-08</periodOfReport>

    <issuer>
        <issuerCik>0001094961</issuerCik>
        <issuerName>VIROLOGIC INC</issuerName>
        <issuerTradingSymbol>VLGC</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001263113</rptOwnerCik>
            <rptOwnerName>PERSING DAVID H</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>C/O VIROLOGIC, INC.</rptOwnerStreet1>
            <rptOwnerStreet2>345 OYSTER POINT BOULEVARD</rptOwnerStreet2>
            <rptOwnerCity>SOUTH SAN FRANCISCO</rptOwnerCity>
            <rptOwnerState>CA</rptOwnerState>
            <rptOwnerZipCode>94080</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>1</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
        </reportingOwnerRelationship>
    </reportingOwner>

    <derivativeTable>
        <derivativeTransaction>
            <securityTitle>
                <value>Stock Option (Right to Buy)</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>3.26</value>
            </conversionOrExercisePrice>
            <transactionDate>
                <value>2004-04-08</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>5000</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <exerciseDate>
                <footnoteId id="F1"/>
            </exerciseDate>
            <expirationDate>
                <value>2014-04-07</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>5000</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>5000</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value></value>
                </natureOfOwnership>
            </ownershipNature>
        </derivativeTransaction>
    </derivativeTable>

    <footnotes>
        <footnote id="F1">1/12th of the shares subject to the option shall vest and become exercisable on May 8, 2004, with the remaining shares vesting in equal monthly installments over the next one (1) year, such that all shares subject to the option will be fully vested and exercisable on April 8, 2005.</footnote>
    </footnotes>

    <remarks></remarks>

    <ownerSignature>
        <signatureName>William D. Young, Attorney-in-fact</signatureName>
        <signatureDate>2004-04-09</signatureDate>
    </ownerSignature>
</ownershipDocument>

