<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.19.3.a.u2</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>424</ContextCount>
  <ElementCount>624</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>101</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>9</UnitCount>
  <MyReports>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0001000 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/DocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>1002000 - Statement - CONSOLIDATED BALANCE SHEETS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/ConsolidatedBalanceSheets</Role>
      <ShortName>CONSOLIDATED BALANCE SHEETS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>1002501 - Statement - CONSOLIDATED BALANCE SHEETS (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/ConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>CONSOLIDATED BALANCE SHEETS (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>1003000 - Statement - CONSOLIDATED STATEMENTS OF OPERATIONS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/ConsolidatedStatementsOfOperations</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF OPERATIONS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>1004000 - Statement - CONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/ConsolidatedStatementsOfComprehensiveIncome</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>1005000 - Statement - CONSOLIDATED STATEMENTS OF SHAREHOLDERS' EQUITY</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/ConsolidatedStatementsOfShareholdersEquity</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF SHAREHOLDERS' EQUITY</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>1006000 - Statement - CONSOLIDATED STATEMENTS OF CASH FLOWS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/ConsolidatedStatementsOfCashFlows</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF CASH FLOWS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>2101100 - Disclosure - Nature of Business</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/NatureOfBusiness</Role>
      <ShortName>Nature of Business</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>2102100 - Disclosure - Basis of Presentation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/BasisOfPresentation</Role>
      <ShortName>Basis of Presentation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>2103100 - Disclosure - Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/SignificantAccountingPolicies</Role>
      <ShortName>Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>2104100 - Disclosure - Earnings per Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/EarningsPerShare</Role>
      <ShortName>Earnings per Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>2105100 - Disclosure - Investments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/Investments</Role>
      <ShortName>Investments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>2106100 - Disclosure - Fair Value Measurements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/FairValueMeasurements</Role>
      <ShortName>Fair Value Measurements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>2107100 - Disclosure - Debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/Debt</Role>
      <ShortName>Debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>2108100 - Disclosure - Loss Reserves</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/LossReserves</Role>
      <ShortName>Loss Reserves</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>2110100 - Disclosure - Reinsurance</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/Reinsurance</Role>
      <ShortName>Reinsurance</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>2111100 - Disclosure - Other Comprehensive Income (Loss)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/OtherComprehensiveIncomeLoss</Role>
      <ShortName>Other Comprehensive Income (Loss)</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>2112100 - Disclosure - Benefit Plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/BenefitPlans</Role>
      <ShortName>Benefit Plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>2113100 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/IncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>2114100 - Disclosure - Shareholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/ShareholdersEquity</Role>
      <ShortName>Shareholders' Equity</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>2117100 - Disclosure - Statutory Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/StatutoryInformation</Role>
      <ShortName>Statutory Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>2118100 - Disclosure - Share-based Compensation Plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/ShareBasedCompensationPlans</Role>
      <ShortName>Share-based Compensation Plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>2119100 - Disclosure - Leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/Leases</Role>
      <ShortName>Leases</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>2120100 - Disclosure - Litigation and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/LitigationAndContingencies</Role>
      <ShortName>Litigation and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>2121100 - Disclosure - Unaudited Quarterly Financial Data</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/UnauditedQuarterlyFinancialData</Role>
      <ShortName>Unaudited Quarterly Financial Data</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>2122100 - Schedule - SCHEDULE I - SUMMARY OF INVESTMENTS - OTHER THAN INVESTMENTS IN RELATED PARTIES</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/ScheduleISummaryOfInvestmentsOtherThanInvestmentsInRelatedParties</Role>
      <ShortName>SCHEDULE I - SUMMARY OF INVESTMENTS - OTHER THAN INVESTMENTS IN RELATED PARTIES</ShortName>
      <MenuCategory>Uncategorized</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>2123100 - Schedule - SCHEDULE II - CONDENSED FINANCIAL INFORMATION OF REGISTRANT</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/ScheduleIiCondensedFinancialInformationOfRegistrant</Role>
      <ShortName>SCHEDULE II - CONDENSED FINANCIAL INFORMATION OF REGISTRANT</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>27</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>2124100 - Schedule - SCHEDULE IV - REINSURANCE</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/ScheduleIvReinsurance</Role>
      <ShortName>SCHEDULE IV - REINSURANCE</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>28</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>2203201 - Disclosure - Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/SignificantAccountingPoliciesPolicies</Role>
      <ShortName>Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.mgic.com/role/SignificantAccountingPolicies</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>2303302 - Disclosure - Significant Accounting Policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/SignificantAccountingPoliciesTables</Role>
      <ShortName>Significant Accounting Policies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.mgic.com/role/SignificantAccountingPolicies</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>2304301 - Disclosure - Earnings per Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/EarningsPerShareTables</Role>
      <ShortName>Earnings per Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.mgic.com/role/EarningsPerShare</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>2305301 - Disclosure - Investments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/InvestmentsTables</Role>
      <ShortName>Investments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.mgic.com/role/Investments</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>2306301 - Disclosure - Fair Value Measurements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/FairValueMeasurementsTables</Role>
      <ShortName>Fair Value Measurements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.mgic.com/role/FairValueMeasurements</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>2307301 - Disclosure - Debt (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/DebtTables</Role>
      <ShortName>Debt (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.mgic.com/role/Debt</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>2308301 - Disclosure - Loss Reserves (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/LossReservesTables</Role>
      <ShortName>Loss Reserves (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.mgic.com/role/LossReserves</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>2310301 - Disclosure - Reinsurance (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/ReinsuranceTables</Role>
      <ShortName>Reinsurance (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.mgic.com/role/Reinsurance</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>2311301 - Disclosure - Other Comprehensive Income (Loss) (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/OtherComprehensiveIncomeLossTables</Role>
      <ShortName>Other Comprehensive Income (Loss) (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.mgic.com/role/OtherComprehensiveIncomeLoss</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>2312301 - Disclosure - Benefit Plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/BenefitPlansTables</Role>
      <ShortName>Benefit Plans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.mgic.com/role/BenefitPlans</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>2313301 - Disclosure - Income Taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/IncomeTaxesTables</Role>
      <ShortName>Income Taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.mgic.com/role/IncomeTaxes</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>2317301 - Disclosure - Statutory Information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/StatutoryInformationTables</Role>
      <ShortName>Statutory Information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.mgic.com/role/StatutoryInformation</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>2318301 - Disclosure - Share-based Compensation Plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/ShareBasedCompensationPlansTables</Role>
      <ShortName>Share-based Compensation Plans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.mgic.com/role/ShareBasedCompensationPlans</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>2319301 - Disclosure - Leases (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/LeasesTables</Role>
      <ShortName>Leases (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.mgic.com/role/Leases</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>2321301 - Disclosure - Unaudited Quarterly Financial Data (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/UnauditedQuarterlyFinancialDataTables</Role>
      <ShortName>Unaudited Quarterly Financial Data (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.mgic.com/role/UnauditedQuarterlyFinancialData</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>2401401 - Disclosure - Nature of Business (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/NatureOfBusinessDetails</Role>
      <ShortName>Nature of Business (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.mgic.com/role/NatureOfBusiness</ParentRole>
      <Position>44</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>2403403 - Disclosure - Significant Accounting Policies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/SignificantAccountingPoliciesDetails</Role>
      <ShortName>Significant Accounting Policies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.mgic.com/role/SignificantAccountingPoliciesTables</ParentRole>
      <Position>45</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>2404402 - Disclosure - Earnings per Share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/EarningsPerShareDetails</Role>
      <ShortName>Earnings per Share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.mgic.com/role/EarningsPerShareTables</ParentRole>
      <Position>46</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>2405402 - Disclosure - Investments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/InvestmentsDetails</Role>
      <ShortName>Investments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.mgic.com/role/InvestmentsTables</ParentRole>
      <Position>47</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>2405403 - Disclosure - Investments, Investment Income By Category (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/InvestmentsInvestmentIncomeByCategoryDetails</Role>
      <ShortName>Investments, Investment Income By Category (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>2405404 - Disclosure - Investments, Gain (Loss) on Investments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/InvestmentsGainLossOnInvestmentsDetails</Role>
      <ShortName>Investments, Gain (Loss) on Investments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>2406402 - Disclosure - Fair Value Measurements (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/FairValueMeasurementsDetails</Role>
      <ShortName>Fair Value Measurements (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.mgic.com/role/FairValueMeasurementsTables</ParentRole>
      <Position>50</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>2406403 - Disclosure - Fair Value Measurements - Unobservable Input Reconciliation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/FairValueMeasurementsUnobservableInputReconciliationDetails</Role>
      <ShortName>Fair Value Measurements - Unobservable Input Reconciliation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>2406404 - Disclosure - Fair Value Measurements - Assets and Liabilities Not Measured at Fair Value (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/FairValueMeasurementsAssetsAndLiabilitiesNotMeasuredAtFairValueDetails</Role>
      <ShortName>Fair Value Measurements - Assets and Liabilities Not Measured at Fair Value (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>2407402 - Disclosure - Debt Summary of Obligations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/DebtSummaryOfObligationsDetails</Role>
      <ShortName>Debt Summary of Obligations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>2407403 - Disclosure - Debt (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/DebtDetails</Role>
      <ShortName>Debt (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.mgic.com/role/DebtTables</ParentRole>
      <Position>54</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>2408402 - Disclosure - Loss Reserves - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/LossReservesNarrativeDetails</Role>
      <ShortName>Loss Reserves - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>2408403 - Disclosure - Loss Reserves - Reconciliation of Changes in Loss Reserves (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/LossReservesReconciliationOfChangesInLossReservesDetails</Role>
      <ShortName>Loss Reserves - Reconciliation of Changes in Loss Reserves (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>2408404 - Disclosure - Loss Reserves - Prior Year Loss Reserves (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/LossReservesPriorYearLossReservesDetails</Role>
      <ShortName>Loss Reserves - Prior Year Loss Reserves (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>2408405 - Disclosure - Loss Reserves - Default Inventory Reconciliation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/LossReservesDefaultInventoryReconciliationDetails</Role>
      <ShortName>Loss Reserves - Default Inventory Reconciliation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>2408406 - Disclosure - Loss Reserves - Aging of Primary Default Inventory and Number of Delinquent Payments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/LossReservesAgingOfPrimaryDefaultInventoryAndNumberOfDelinquentPaymentsDetails</Role>
      <ShortName>Loss Reserves - Aging of Primary Default Inventory and Number of Delinquent Payments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>2410402 - Disclosure - Reinsurance - Summary of Reinsurance Agreements (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/ReinsuranceSummaryOfReinsuranceAgreementsDetails</Role>
      <ShortName>Reinsurance - Summary of Reinsurance Agreements (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>2410403 - Disclosure - Reinsurance - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/ReinsuranceNarrativeDetails</Role>
      <ShortName>Reinsurance - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>2410404 - Disclosure - Reinsurance - Quota Share Reinsurance (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/ReinsuranceQuotaShareReinsuranceDetails</Role>
      <ShortName>Reinsurance - Quota Share Reinsurance (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>2410405 - Disclosure - Reinsurance - Excess of Loss Reinsurance (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/ReinsuranceExcessOfLossReinsuranceDetails</Role>
      <ShortName>Reinsurance - Excess of Loss Reinsurance (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>2410406 - Disclosure - Reinsurance - Home Re Entities Total Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/ReinsuranceHomeReEntitiesTotalAssetsDetails</Role>
      <ShortName>Reinsurance - Home Re Entities Total Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>2411402 - Disclosure - Other Comprehensive Income (Loss) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/OtherComprehensiveIncomeLossDetails</Role>
      <ShortName>Other Comprehensive Income (Loss) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.mgic.com/role/OtherComprehensiveIncomeLossTables</ParentRole>
      <Position>65</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>2412402 - Disclosure - Benefit Plans - Components of Net Periodic Benefit Costs (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/BenefitPlansComponentsOfNetPeriodicBenefitCostsDetails</Role>
      <ShortName>Benefit Plans - Components of Net Periodic Benefit Costs (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>66</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>2412403 - Disclosure - Benefit Plans - Development of Funded Status (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/BenefitPlansDevelopmentOfFundedStatusDetails</Role>
      <ShortName>Benefit Plans - Development of Funded Status (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>2412404 - Disclosure - Benefit Plans - Accumulated Other Comprehensive Income (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/BenefitPlansAccumulatedOtherComprehensiveIncomeDetails</Role>
      <ShortName>Benefit Plans - Accumulated Other Comprehensive Income (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>68</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>2412405 - Disclosure - Benefit Plans - Change in Project Benefit/Accumulated Benefit Obligations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/BenefitPlansChangeInProjectBenefitAccumulatedBenefitObligationsDetails</Role>
      <ShortName>Benefit Plans - Change in Project Benefit/Accumulated Benefit Obligations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>69</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>2412406 - Disclosure - Benefit Plans - Change in Plan Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/BenefitPlansChangeInPlanAssetsDetails</Role>
      <ShortName>Benefit Plans - Change in Plan Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>70</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>2412407 - Disclosure - Benefit Plans - Change in Accumulated Other Comprehensive Income (AOCI) and Expected Amortization (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/BenefitPlansChangeInAccumulatedOtherComprehensiveIncomeAociAndExpectedAmortizationDetails</Role>
      <ShortName>Benefit Plans - Change in Accumulated Other Comprehensive Income (AOCI) and Expected Amortization (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>71</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>2412408 - Disclosure - Benefit Plans - Actuarial Assumptions and Year-End Asset Allocations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/BenefitPlansActuarialAssumptionsAndYearEndAssetAllocationsDetails</Role>
      <ShortName>Benefit Plans - Actuarial Assumptions and Year-End Asset Allocations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>72</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>2412409 - Disclosure - Benefit Plans - Fair Value of Plan Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/BenefitPlansFairValueOfPlanAssetsDetails</Role>
      <ShortName>Benefit Plans - Fair Value of Plan Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>73</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>2412410 - Disclosure - Benefit Plans - Additional Disclosures (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/BenefitPlansAdditionalDisclosuresDetails</Role>
      <ShortName>Benefit Plans - Additional Disclosures (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>74</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>2412411 - Disclosure - Benefit Plans - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/BenefitPlansNarrativeDetails</Role>
      <ShortName>Benefit Plans - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>75</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>2413402 - Disclosure - Income Taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/IncomeTaxesDetails</Role>
      <ShortName>Income Taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.mgic.com/role/IncomeTaxesTables</ParentRole>
      <Position>76</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>2414401 - Disclosure - Shareholders' Equity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/ShareholdersEquityDetails</Role>
      <ShortName>Shareholders' Equity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.mgic.com/role/ShareholdersEquity</ParentRole>
      <Position>77</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>2417402 - Disclosure - Statutory Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/StatutoryInformationDetails</Role>
      <ShortName>Statutory Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.mgic.com/role/StatutoryInformationTables</ParentRole>
      <Position>78</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>2418402 - Disclosure - Share-based Compensation Plans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/ShareBasedCompensationPlansDetails</Role>
      <ShortName>Share-based Compensation Plans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.mgic.com/role/ShareBasedCompensationPlansTables</ParentRole>
      <Position>79</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>2419402 - Disclosure - Leases (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/LeasesDetails</Role>
      <ShortName>Leases (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.mgic.com/role/LeasesTables</ParentRole>
      <Position>80</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>2420401 - Disclosure - Litigation and Contingencies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/LitigationAndContingenciesDetails</Role>
      <ShortName>Litigation and Contingencies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.mgic.com/role/LitigationAndContingencies</ParentRole>
      <Position>81</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R82.htm</HtmlFileName>
      <LongName>2421402 - Disclosure - Unaudited Quarterly Financial Data (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/UnauditedQuarterlyFinancialDataDetails</Role>
      <ShortName>Unaudited Quarterly Financial Data (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.mgic.com/role/UnauditedQuarterlyFinancialDataTables</ParentRole>
      <Position>82</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R83.htm</HtmlFileName>
      <LongName>2422401 - Schedule - SCHEDULE I - SUMMARY OF INVESTMENTS - OTHER THAN INVESTMENTS IN RELATED PARTIES (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/ScheduleISummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesDetails</Role>
      <ShortName>SCHEDULE I - SUMMARY OF INVESTMENTS - OTHER THAN INVESTMENTS IN RELATED PARTIES (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>83</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R84.htm</HtmlFileName>
      <LongName>2423401 - Schedule - SCHEDULE II - CONDENSED FINANCIAL INFORMATION OF REGISTRANT (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/ScheduleIiCondensedFinancialInformationOfRegistrantDetails</Role>
      <ShortName>SCHEDULE II - CONDENSED FINANCIAL INFORMATION OF REGISTRANT (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>84</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R85.htm</HtmlFileName>
      <LongName>2423402 - Schedule - SCHEDULE II - CONDENSED FINANCIAL INFORMATION OF REGISTRANT - SUPPLEMENTARY NOTES (Details)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.mgic.com/role/ScheduleIiCondensedFinancialInformationOfRegistrantSupplementaryNotesDetails</Role>
      <ShortName>SCHEDULE II - CONDENSED FINANCIAL INFORMATION OF REGISTRANT - SUPPLEMENTARY NOTES (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>85</Position>
    </Report>
    <Report instance="mtg-123119x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R86.htm</HtmlFileName>
      <LongName>2424401 - Schedule - SCHEDULE IV - REINSURANCE (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgic.com/role/ScheduleIvReinsuranceDetails</Role>
      <ShortName>SCHEDULE IV - REINSURANCE (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.mgic.com/role/ScheduleIvReinsurance</ParentRole>
      <Position>86</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File doctype="10-K" original="mtg-123119x10k.htm">mtg-123119x10k.htm</File>
    <File>mtg-123119xex1012.htm</File>
    <File>mtg-123119xex10222.htm</File>
    <File>mtg-123119xex10223.htm</File>
    <File>mtg-123119xex106.htm</File>
    <File>mtg-123119xex21.htm</File>
    <File>mtg-123119xex23.htm</File>
    <File>mtg-123119xex311.htm</File>
    <File>mtg-123119xex32.htm</File>
    <File>mtg-123119xex43.htm</File>
    <File>mtg-1231x19xex312.htm</File>
    <File>mtg-20191231.xsd</File>
    <File>mtg-20191231_cal.xml</File>
    <File>mtg-20191231_def.xml</File>
    <File>mtg-20191231_lab.xml</File>
    <File>mtg-20191231_pre.xml</File>
  </InputFiles>
  <SupplementalFiles>
    <File>chart-64dcc19602415b6a848.jpg</File>
    <File>mgiclogoa05.jpg</File>
    <File>pwclogoa03.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy>http://xbrl.sec.gov/dei/2019-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://fasb.org/srt/2019-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://xbrl.sec.gov/exch/2019-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://fasb.org/us-gaap/2019-01-31</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
