<?xml version="1.0"?>
<ownershipDocument>
    <schemaVersion>X0101</schemaVersion>

    <documentType>4</documentType><periodOfReport>2003-06-24</periodOfReport>
    <issuer>
        <issuerCik>0000002135</issuerCik>
        <issuerName>AFFILIATED COMPUTER SERVICES INC</issuerName>
        <issuerTradingSymbol>ACS</issuerTradingSymbol></issuer><reportingOwner><reportingOwnerId>
            <rptOwnerCik>0001182592</rptOwnerCik>
            <rptOwnerName>RICH JEFFREY A</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>  </rptOwnerStreet1>
            <rptOwnerStreet2>  </rptOwnerStreet2>
            <rptOwnerCity>  </rptOwnerCity>
            <rptOwnerState>  </rptOwnerState>
            <rptOwnerZipCode>  </rptOwnerZipCode>
        </reportingOwnerAddress>
            <reportingOwnerRelationship>
<isDirector>1</isDirector><isOfficer>1</isOfficer><isTenPercentOwner>0</isTenPercentOwner><isOther>0</isOther><officerTitle>Chief Executive Officer</officerTitle></reportingOwnerRelationship></reportingOwner><nonDerivativeSecurity><securityTitle><value>Class A Common Stock par value $0.01</value></securityTitle><transactionDate><value>2003-06-24</value></transactionDate><deemedExecutionDate><value>2003-06-24</value></deemedExecutionDate><transactionCoding><transactionFormType>4</transactionFormType><transactionCode>M</transactionCode><equitySwapInvolved>0</equitySwapInvolved></transactionCoding><transactionAmounts><transactionShares><value>4000</value></transactionShares><transactionValue><value>10.5625</value></transactionValue><transactionAcquiredDisposedCode><value>A</value></transactionAcquiredDisposedCode></transactionAmounts><postTransactionAmounts><sharesOwnedFollowingTransaction><value>94972</value></sharesOwnedFollowingTransaction></postTransactionAmounts><ownershipNature><directOrIndirectOwnership><value>D</value></directOrIndirectOwnership><natureOfOwnership><value></value></natureOfOwnership></ownershipNature></nonDerivativeSecurity><nonDerivativeSecurity><securityTitle><value>Class A Common Stock par value $0.01</value></securityTitle><transactionDate><value>2003-06-24</value></transactionDate><deemedExecutionDate><value>2003-06-24</value></deemedExecutionDate><transactionCoding><transactionFormType>4</transactionFormType><transactionCode>S</transactionCode><equitySwapInvolved>0</equitySwapInvolved></transactionCoding><transactionAmounts><transactionShares><value>2000</value></transactionShares><transactionValue><value>45.75</value></transactionValue><transactionAcquiredDisposedCode><value>D</value></transactionAcquiredDisposedCode></transactionAmounts><postTransactionAmounts><sharesOwnedFollowingTransaction><value>92972</value><footnoteId id="F1"/></sharesOwnedFollowingTransaction></postTransactionAmounts><ownershipNature><directOrIndirectOwnership><value>D</value></directOrIndirectOwnership><natureOfOwnership><value></value></natureOfOwnership></ownershipNature></nonDerivativeSecurity><derivativeSecurity><securityTitle><value>Employee Stock Option (Right to Buy)</value></securityTitle><conversionOrExercisePrice><value>10.5625</value></conversionOrExercisePrice><transactionDate><value>2003-06-24</value></transactionDate><transactionCoding><transactionFormType>4</transactionFormType><transactionCode>M</transactionCode><equitySwapInvolved>0</equitySwapInvolved></transactionCoding><transactionAmounts><transactionShares><value>4000</value></transactionShares><transactionValue><value>45.75</value></transactionValue><transactionAcquiredDisposedCode><value>D</value></transactionAcquiredDisposedCode></transactionAmounts><exerciseDate><value>2002-04-07</value></exerciseDate><expirationDate><value>2007-04-07</value></expirationDate><underlyingSecurity><underlyingSecurityTitle><value>Class A Common</value></underlyingSecurityTitle><underlyingSecurityShares><value>4000</value></underlyingSecurityShares></underlyingSecurity><postTransactionAmounts><sharesOwnedFollowingTransaction><value>48100</value></sharesOwnedFollowingTransaction></postTransactionAmounts><ownershipNature><directOrIndirectOwnership><value>D</value><footnoteId id="F2"/></directOrIndirectOwnership><natureOfOwnership><value></value></natureOfOwnership></ownershipNature></derivativeSecurity><footnotes><footnote id="F1">Indirectly held ownership includes 306 shares of Class A Common Stock in the 401kPlan and 992 shares of Class A Common Stock in the Employee Stock Purchase Plan.</footnote><footnote id="F2">Beneficially Owned Securities (Directly Owned) for Table II: (i) Grant of Employee Stock Option (Right to Buy) on 07/23/2002 for 400,000 shares of ACS Class A Common Stock at an Exercise Price of $35.75 exercisable on 07/23/2007, expiring on 07/23/2012; (ii) Grant of Employee Stock Option (Right to Buy) on 07/11/2000 for 200,000 shares of ACS Class A Common Stock at an Exercise Price of $16.4375 exercisable on 07/11/2005, expiring on 07/11/2010; (iii) Grant of Employee Stock Option (Right to Buy) on 10/08/1998 for 500,000 shares of ACS Class A Common Stock at an Exercise Price of $11.53125 exercisable on 10/08/2003, expiring on 10/08/2008; (iv) Grant of Employee Stock Option (Right to Buy) on 04/07/1997 for 120,000 shares of ACS Class A Common Stock at an Exercise Price of $10.5625 exercisable on 04/07/2002, expiring on 04/07/2007.  Including the reported transaction, 71,900 shares have been exercised and 48,100 shares remain to be exercised with respect to this option.</footnote></footnotes><ownerSignature><signatureName>Jeffrey A. Rich</signatureName><signatureDate>2003-06-24</signatureDate></ownerSignature></ownershipDocument>

