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

    <schemaVersion>X0202</schemaVersion>

    <documentType>3</documentType>

    <periodOfReport>2006-11-16</periodOfReport>

    <noSecuritiesOwned>0</noSecuritiesOwned>

    <issuer>
        <issuerCik>0000047217</issuerCik>
        <issuerName>HEWLETT PACKARD CO</issuerName>
        <issuerTradingSymbol>HPQ</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001190149</rptOwnerCik>
            <rptOwnerName>THOMPSON G KENNEDY</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>C/O HEWLETT-PACKARD COMPANY</rptOwnerStreet1>
            <rptOwnerStreet2>3000 HANOVER STREET</rptOwnerStreet2>
            <rptOwnerCity>PALO ALTO,</rptOwnerCity>
            <rptOwnerState>CA</rptOwnerState>
            <rptOwnerZipCode>94304</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>1</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common Stock</value>
                <footnoteId id="F1"/>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>370</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value></value>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">Exhibit List - Exhibit 24 - Power of Attorney</footnote>
    </footnotes>

    <remarks></remarks>

    <ownerSignature>
        <signatureName>/s/Charles N. Charnas, Attorney-in-Fact</signatureName>
        <signatureDate>2006-11-22</signatureDate>
    </ownerSignature>
</ownershipDocument>
