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

    <schemaVersion>X0306</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2017-01-23</periodOfReport>

    <notSubjectToSection16>false</notSubjectToSection16>

    <issuer>
        <issuerCik>0000876437</issuerCik>
        <issuerName>MGIC INVESTMENT CORP</issuerName>
        <issuerTradingSymbol>MTG</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001041958</rptOwnerCik>
            <rptOwnerName>CULVER CURT S</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>C/O MGIC INVESTMENT CORPORATION</rptOwnerStreet1>
            <rptOwnerStreet2>250 EAST KILBOURN AVENUE</rptOwnerStreet2>
            <rptOwnerCity>MILWAUKEE</rptOwnerCity>
            <rptOwnerState>WI</rptOwnerState>
            <rptOwnerZipCode>53202</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>true</isDirector>
            <isOfficer>false</isOfficer>
            <isTenPercentOwner>false</isTenPercentOwner>
            <isOther>false</isOther>
            <officerTitle></officerTitle>
            <otherText></otherText>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1586231.3259</value>
                    <footnoteId id="F1"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>40000.00</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>By Family Trust</value>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
    </nonDerivativeTable>

    <derivativeTable>
        <derivativeTransaction>
            <securityTitle>
                <value>Share Units</value>
                <footnoteId id="F2"/>
            </securityTitle>
            <conversionOrExercisePrice>
                <footnoteId id="F3"/>
                <footnoteId id="F4"/>
            </conversionOrExercisePrice>
            <transactionDate>
                <value>2017-01-23</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>false</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>9606.1479</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0.00</value>
                    <footnoteId id="F5"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <exerciseDate>
                <value>2018-02-01</value>
                <footnoteId id="F6"/>
            </exerciseDate>
            <expirationDate>
                <footnoteId id="F7"/>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>9606.1479</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>27273.9924</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeTransaction>
    </derivativeTable>

    <footnotes>
        <footnote id="F1">This total includes 11,504.3259 shares of the Issuer's common stock held by the reporting person in an individual retirement account.</footnote>
        <footnote id="F2">The reporting person participates in the MGIC Investment Corporation Deferred Compensation Plan for Non-Employee Directors under which units corresponding to shares of Common Stock of the Issuer (&quot;Share Units&quot;) are awarded to the reporting person.</footnote>
        <footnote id="F3">These Share Units do not have a specified dollar-denominated exercise or conversion price.  (Their value is based, on a one-for-one basis, on the price of the Issuer's common stock on the New York Stock Exchange.)</footnote>
        <footnote id="F4">These Share Units are settled in cash, on a specified date, unless a qualified election for later distribution is made by the reporting person.</footnote>
        <footnote id="F5">These Share Units were awarded to the reporting person pursuant to the Issuer's Deferred Compensation Plan for Non-Employee Directors and no price was paid by the reporting person for the Share Units.</footnote>
        <footnote id="F6">These Share Units awarded on this transaction date are settled in cash ten business days after February 1, 2018 unless a qualified election for later distribution is made by the reporting person.</footnote>
        <footnote id="F7">These Share Units do not expire on a fixed date, except that the Share Units awarded on this transaction, date and on January 25, 2016 are settled in cash ten business days after February 1, 2018 and 2017, respectively, unless a qualified election for later distribution is made by the reporting person.</footnote>
    </footnotes>

    <remarks>This form 4 is being signed by the reporting person's attorney-in-fact pursuant to a previously filed power of attorney.</remarks>

    <ownerSignature>
        <signatureName>Dan D. Stilwell, Attorney-in-Fact</signatureName>
        <signatureDate>2017-01-25</signatureDate>
    </ownerSignature>
</ownershipDocument>
