<?xml version="1.0" encoding="UTF-8"?>

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2024 Workiva-->
<!--r:edc14ca0-2ff0-4110-a4d3-5555955d07b1,g:abb121f0-1665-49e9-98bb-62aa4b83b6d1-->
<link:linkbase xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd">
  <link:roleRef roleURI="http://www.mgic.com/role/CONSOLIDATEDBALANCESHEETS" xlink:type="simple" xlink:href="mtg-20231231.xsd#CONSOLIDATEDBALANCESHEETS"/>
  <link:calculationLink xlink:role="http://www.mgic.com/role/CONSOLIDATEDBALANCESHEETS" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_fa640517-77d1-49d2-bf33-63b5c1d577df" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Assets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_6c2f08a6-5739-4841-afd2-7f971a468552" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_fa640517-77d1-49d2-bf33-63b5c1d577df" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_6c2f08a6-5739-4841-afd2-7f971a468552" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedCashAndCashEquivalents_3176cdb4-d02d-4ca0-8ef0-b21c19827c2b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RestrictedCashAndCashEquivalents"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_fa640517-77d1-49d2-bf33-63b5c1d577df" xlink:to="loc_us-gaap_RestrictedCashAndCashEquivalents_3176cdb4-d02d-4ca0-8ef0-b21c19827c2b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedInvestmentIncomeReceivable_74e4a417-cef6-4462-96a3-baf3cffc3126" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccruedInvestmentIncomeReceivable"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_fa640517-77d1-49d2-bf33-63b5c1d577df" xlink:to="loc_us-gaap_AccruedInvestmentIncomeReceivable_74e4a417-cef6-4462-96a3-baf3cffc3126" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Investments_d953e395-73ec-40dd-a098-92ef85080222" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Investments"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_fa640517-77d1-49d2-bf33-63b5c1d577df" xlink:to="loc_us-gaap_Investments_d953e395-73ec-40dd-a098-92ef85080222" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReinsuranceRecoverableForUnpaidClaimsAndClaimsAdjustments_4737b336-1285-478b-a7c9-1328bfff4b93" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReinsuranceRecoverableForUnpaidClaimsAndClaimsAdjustments"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_fa640517-77d1-49d2-bf33-63b5c1d577df" xlink:to="loc_us-gaap_ReinsuranceRecoverableForUnpaidClaimsAndClaimsAdjustments_4737b336-1285-478b-a7c9-1328bfff4b93" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReinsuranceRecoverablesOnPaidLosses_ebed688b-d029-4b60-b714-1fbb120bb63a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReinsuranceRecoverablesOnPaidLosses"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_fa640517-77d1-49d2-bf33-63b5c1d577df" xlink:to="loc_us-gaap_ReinsuranceRecoverablesOnPaidLosses_ebed688b-d029-4b60-b714-1fbb120bb63a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PremiumsReceivableAtCarryingValue_2d05facc-cbdd-441e-accf-957508508491" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PremiumsReceivableAtCarryingValue"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_fa640517-77d1-49d2-bf33-63b5c1d577df" xlink:to="loc_us-gaap_PremiumsReceivableAtCarryingValue_2d05facc-cbdd-441e-accf-957508508491" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_9b0ef5cb-3f4b-4e19-b294-dfd87e27ab00" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_fa640517-77d1-49d2-bf33-63b5c1d577df" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_9b0ef5cb-3f4b-4e19-b294-dfd87e27ab00" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredPolicyAcquisitionCosts_d35d8c7f-8d16-4d3a-87c9-4959bb377a25" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredPolicyAcquisitionCosts"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_fa640517-77d1-49d2-bf33-63b5c1d577df" xlink:to="loc_us-gaap_DeferredPolicyAcquisitionCosts_d35d8c7f-8d16-4d3a-87c9-4959bb377a25" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssets_0eb59b6b-fe6a-4748-b7cb-3109ef4ab8e8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherAssets"/>
    <link:calculationArc order="10" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_fa640517-77d1-49d2-bf33-63b5c1d577df" xlink:to="loc_us-gaap_OtherAssets_0eb59b6b-fe6a-4748-b7cb-3109ef4ab8e8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_20653a98-ba20-44ce-a0d2-ed3c0f9a25b6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredIncomeTaxAssetsNet"/>
    <link:calculationArc order="11" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_fa640517-77d1-49d2-bf33-63b5c1d577df" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_20653a98-ba20-44ce-a0d2-ed3c0f9a25b6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_094c1f59-9984-438a-ae5d-a78d3ab8a7fb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_12966273-2b23-4310-9397-443f4ff31870" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_094c1f59-9984-438a-ae5d-a78d3ab8a7fb" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_12966273-2b23-4310-9397-443f4ff31870" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockValue_7e04f231-062b-4bac-8fe6-9a3365e7313a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TreasuryStockValue"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_094c1f59-9984-438a-ae5d-a78d3ab8a7fb" xlink:to="loc_us-gaap_TreasuryStockValue_7e04f231-062b-4bac-8fe6-9a3365e7313a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapitalCommonStock_5e6c363c-d5f6-4047-beea-3006740420fc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AdditionalPaidInCapitalCommonStock"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_094c1f59-9984-438a-ae5d-a78d3ab8a7fb" xlink:to="loc_us-gaap_AdditionalPaidInCapitalCommonStock_5e6c363c-d5f6-4047-beea-3006740420fc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_2ed9659c-a3b4-473a-a123-e2c5b4245b02" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_094c1f59-9984-438a-ae5d-a78d3ab8a7fb" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_2ed9659c-a3b4-473a-a123-e2c5b4245b02" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValue_1b0f2be3-5001-48d0-926d-58506e31890a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockValue"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_094c1f59-9984-438a-ae5d-a78d3ab8a7fb" xlink:to="loc_us-gaap_CommonStockValue_1b0f2be3-5001-48d0-926d-58506e31890a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_27590908-2a55-4268-b02e-4835013dcd2e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_032adefb-5b94-4a3e-8ff3-cf6c84d44c8e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquity"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_27590908-2a55-4268-b02e-4835013dcd2e" xlink:to="loc_us-gaap_StockholdersEquity_032adefb-5b94-4a3e-8ff3-cf6c84d44c8e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_4d2a34a3-e7f7-48eb-8a44-47d31863fffb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Liabilities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_27590908-2a55-4268-b02e-4835013dcd2e" xlink:to="loc_us-gaap_Liabilities_4d2a34a3-e7f7-48eb-8a44-47d31863fffb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommitmentsAndContingencies_84634500-e375-48ea-bdf3-7165eb3c700a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommitmentsAndContingencies"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_27590908-2a55-4268-b02e-4835013dcd2e" xlink:to="loc_us-gaap_CommitmentsAndContingencies_84634500-e375-48ea-bdf3-7165eb3c700a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Investments_a2483930-97e6-47a5-81b4-f2948808227c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Investments"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherInvestments_a6940053-f0d0-4510-8505-bb0ad3494c94" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherInvestments"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Investments_a2483930-97e6-47a5-81b4-f2948808227c" xlink:to="loc_us-gaap_OtherInvestments_a6940053-f0d0-4510-8505-bb0ad3494c94" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySecuritiesFvNi_b2ce784d-9c09-4c45-8ae1-ad2136861ade" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquitySecuritiesFvNi"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Investments_a2483930-97e6-47a5-81b4-f2948808227c" xlink:to="loc_us-gaap_EquitySecuritiesFvNi_b2ce784d-9c09-4c45-8ae1-ad2136861ade" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_c65c2e8c-07eb-459d-ada7-b81bd48e2ea0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Investments_a2483930-97e6-47a5-81b4-f2948808227c" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_c65c2e8c-07eb-459d-ada7-b81bd48e2ea0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_706404f7-d2dd-40dc-bdb1-b708e836840e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Liabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpensePropertyCasualtyLiability_dfdd749b-173e-4ce2-a205-dfa8ecec8c69" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpensePropertyCasualtyLiability"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_706404f7-d2dd-40dc-bdb1-b708e836840e" xlink:to="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpensePropertyCasualtyLiability_dfdd749b-173e-4ce2-a205-dfa8ecec8c69" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilities_ed895523-2dac-4fbb-8bae-8769b4d975f2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherLiabilities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_706404f7-d2dd-40dc-bdb1-b708e836840e" xlink:to="loc_us-gaap_OtherLiabilities_ed895523-2dac-4fbb-8bae-8769b4d975f2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConvertibleSubordinatedDebt_b204b77d-d367-4198-84de-bb3142100a88" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConvertibleSubordinatedDebt"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_706404f7-d2dd-40dc-bdb1-b708e836840e" xlink:to="loc_us-gaap_ConvertibleSubordinatedDebt_b204b77d-d367-4198-84de-bb3142100a88" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UnearnedPremiums_158abfd6-42d2-44f2-8a9c-662fa79e517d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_UnearnedPremiums"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_706404f7-d2dd-40dc-bdb1-b708e836840e" xlink:to="loc_us-gaap_UnearnedPremiums_158abfd6-42d2-44f2-8a9c-662fa79e517d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SeniorNotes_41ddc90e-85eb-4716-a350-84f697fb62d0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SeniorNotes"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_706404f7-d2dd-40dc-bdb1-b708e836840e" xlink:to="loc_us-gaap_SeniorNotes_41ddc90e-85eb-4716-a350-84f697fb62d0" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mgic.com/role/CONSOLIDATEDSTATEMENTSOFOPERATIONS" xlink:type="simple" xlink:href="mtg-20231231.xsd#CONSOLIDATEDSTATEMENTSOFOPERATIONS"/>
  <link:calculationLink xlink:role="http://www.mgic.com/role/CONSOLIDATEDSTATEMENTSOFOPERATIONS" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PremiumsEarnedNet_c8b5a4ac-a471-4a80-81f1-13537f0f7e1f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PremiumsEarnedNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PremiumsWrittenNet_0fbd2b78-f73f-4651-b023-a678b5d8f503" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PremiumsWrittenNet"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PremiumsEarnedNet_c8b5a4ac-a471-4a80-81f1-13537f0f7e1f" xlink:to="loc_us-gaap_PremiumsWrittenNet_0fbd2b78-f73f-4651-b023-a678b5d8f503" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInUnearnedPremiumsNet_8d2fb09e-36be-47ae-82be-59f5139a09ab" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInUnearnedPremiumsNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PremiumsEarnedNet_c8b5a4ac-a471-4a80-81f1-13537f0f7e1f" xlink:to="loc_us-gaap_IncreaseDecreaseInUnearnedPremiumsNet_8d2fb09e-36be-47ae-82be-59f5139a09ab" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_293944b3-59a0-4cf0-927a-93463d9ba3c7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BenefitsLossesAndExpenses_0c9d6630-96e7-4aee-bc92-bc38f8aa8add" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BenefitsLossesAndExpenses"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_293944b3-59a0-4cf0-927a-93463d9ba3c7" xlink:to="loc_us-gaap_BenefitsLossesAndExpenses_0c9d6630-96e7-4aee-bc92-bc38f8aa8add" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Revenues_9fec31e8-67d8-4d5b-a000-3a00cd807722" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Revenues"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_293944b3-59a0-4cf0-927a-93463d9ba3c7" xlink:to="loc_us-gaap_Revenues_9fec31e8-67d8-4d5b-a000-3a00cd807722" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BenefitsLossesAndExpenses_97e76542-69ff-46f7-a071-e8b0704ef799" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BenefitsLossesAndExpenses"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredPolicyAcquisitionCostAmortizationExpense_39a0c343-760d-4a11-ad84-26b42508ff3f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredPolicyAcquisitionCostAmortizationExpense"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BenefitsLossesAndExpenses_97e76542-69ff-46f7-a071-e8b0704ef799" xlink:to="loc_us-gaap_DeferredPolicyAcquisitionCostAmortizationExpense_39a0c343-760d-4a11-ad84-26b42508ff3f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PolicyholderBenefitsAndClaimsIncurredNet_8d1e4ffb-f0d9-4c82-a144-c8e1dd088308" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PolicyholderBenefitsAndClaimsIncurredNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BenefitsLossesAndExpenses_97e76542-69ff-46f7-a071-e8b0704ef799" xlink:to="loc_us-gaap_PolicyholderBenefitsAndClaimsIncurredNet_8d1e4ffb-f0d9-4c82-a144-c8e1dd088308" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainsLossesOnExtinguishmentOfDebt_1d228296-91a6-4ed3-96cc-f5fdec53e5e3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GainsLossesOnExtinguishmentOfDebt"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BenefitsLossesAndExpenses_97e76542-69ff-46f7-a071-e8b0704ef799" xlink:to="loc_us-gaap_GainsLossesOnExtinguishmentOfDebt_1d228296-91a6-4ed3-96cc-f5fdec53e5e3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherUnderwritingExpense_2454b738-2da6-4987-afe8-e907b72cd8d3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherUnderwritingExpense"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BenefitsLossesAndExpenses_97e76542-69ff-46f7-a071-e8b0704ef799" xlink:to="loc_us-gaap_OtherUnderwritingExpense_2454b738-2da6-4987-afe8-e907b72cd8d3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpenseDebt_9845c5b7-e5db-4957-bdcf-c4df247bbc85" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestExpenseDebt"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BenefitsLossesAndExpenses_97e76542-69ff-46f7-a071-e8b0704ef799" xlink:to="loc_us-gaap_InterestExpenseDebt_9845c5b7-e5db-4957-bdcf-c4df247bbc85" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Revenues_3234e217-5240-483b-9839-46af8683cde3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Revenues"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherIncome_85339c5d-737c-4a03-8506-f095aa10826f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherIncome"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Revenues_3234e217-5240-483b-9839-46af8683cde3" xlink:to="loc_us-gaap_OtherIncome_85339c5d-737c-4a03-8506-f095aa10826f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_NetGainsLossesOnInvestmentsAndOtherFinancialInstruments_75ca4edd-110f-4ab4-8bbd-6cf2e646ec14" xlink:href="mtg-20231231.xsd#mtg_NetGainsLossesOnInvestmentsAndOtherFinancialInstruments"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Revenues_3234e217-5240-483b-9839-46af8683cde3" xlink:to="loc_mtg_NetGainsLossesOnInvestmentsAndOtherFinancialInstruments_75ca4edd-110f-4ab4-8bbd-6cf2e646ec14" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetInvestmentIncome_c295714a-8bf3-4611-bacf-3c55556f5eee" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetInvestmentIncome"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Revenues_3234e217-5240-483b-9839-46af8683cde3" xlink:to="loc_us-gaap_NetInvestmentIncome_c295714a-8bf3-4611-bacf-3c55556f5eee" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PremiumsEarnedNet_31ceea24-ef75-4b77-b3e6-ae17414af154" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PremiumsEarnedNet"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Revenues_3234e217-5240-483b-9839-46af8683cde3" xlink:to="loc_us-gaap_PremiumsEarnedNet_31ceea24-ef75-4b77-b3e6-ae17414af154" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PremiumsWrittenNet_e07f3fd0-9ed5-42e6-99c6-1686b00b2b9a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PremiumsWrittenNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DirectPremiumsWritten_a8535ae6-3b23-47d1-8c68-a7ed251da8ad" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DirectPremiumsWritten"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PremiumsWrittenNet_e07f3fd0-9ed5-42e6-99c6-1686b00b2b9a" xlink:to="loc_us-gaap_DirectPremiumsWritten_a8535ae6-3b23-47d1-8c68-a7ed251da8ad" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssumedPremiumsWritten_329819fa-56db-4766-ab0c-92f06dfd68ec" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssumedPremiumsWritten"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PremiumsWrittenNet_e07f3fd0-9ed5-42e6-99c6-1686b00b2b9a" xlink:to="loc_us-gaap_AssumedPremiumsWritten_329819fa-56db-4766-ab0c-92f06dfd68ec" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CededPremiumsWritten_34a96475-d174-4dac-9b56-92be5f8a3faf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CededPremiumsWritten"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PremiumsWrittenNet_e07f3fd0-9ed5-42e6-99c6-1686b00b2b9a" xlink:to="loc_us-gaap_CededPremiumsWritten_34a96475-d174-4dac-9b56-92be5f8a3faf" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mgic.com/role/CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOME" xlink:type="simple" xlink:href="mtg-20231231.xsd#CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOME"/>
  <link:calculationLink xlink:role="http://www.mgic.com/role/CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOME" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_4160f5d4-cc5e-4191-ac8a-6259ab6121d2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPortionAttributableToParent_373a2763-ba6b-4422-8115-e5eeda95103f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPortionAttributableToParent"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_4160f5d4-cc5e-4191-ac8a-6259ab6121d2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPortionAttributableToParent_373a2763-ba6b-4422-8115-e5eeda95103f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent_a0ac28ea-715a-4750-b074-c87ba909071e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_4160f5d4-cc5e-4191-ac8a-6259ab6121d2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent_a0ac28ea-715a-4750-b074-c87ba909071e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_bb3d9f57-0392-4b34-a73a-55316b844d1b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ComprehensiveIncomeNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_c480016e-291a-46a9-85c1-555354dd6c90" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_bb3d9f57-0392-4b34-a73a-55316b844d1b" xlink:to="loc_us-gaap_NetIncomeLoss_c480016e-291a-46a9-85c1-555354dd6c90" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_c1a9f5d4-3586-4205-9296-3e98c20b0716" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_bb3d9f57-0392-4b34-a73a-55316b844d1b" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_c1a9f5d4-3586-4205-9296-3e98c20b0716" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mgic.com/role/CONSOLIDATEDSTATEMENTSOFCASHFLOWS" xlink:type="simple" xlink:href="mtg-20231231.xsd#CONSOLIDATEDSTATEMENTSOFCASHFLOWS"/>
  <link:calculationLink xlink:role="http://www.mgic.com/role/CONSOLIDATEDSTATEMENTSOFCASHFLOWS" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a875eddf-f930-4c2d-be24-5db93ca4f42b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationAmortizationAndAccretionNet_ae2347a0-c780-49d2-ada4-76cf3bd609e6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DepreciationAmortizationAndAccretionNet"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a875eddf-f930-4c2d-be24-5db93ca4f42b" xlink:to="loc_us-gaap_DepreciationAmortizationAndAccretionNet_ae2347a0-c780-49d2-ada4-76cf3bd609e6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherOperatingCapitalNet_77710bab-654c-445c-a1c9-ce15098ff58c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInOtherOperatingCapitalNet"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a875eddf-f930-4c2d-be24-5db93ca4f42b" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherOperatingCapitalNet_77710bab-654c-445c-a1c9-ce15098ff58c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInIncomeTaxesPayableNetOfIncomeTaxesReceivable_54d450b4-89a3-40d5-a77c-e07cf86f80f1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInIncomeTaxesPayableNetOfIncomeTaxesReceivable"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a875eddf-f930-4c2d-be24-5db93ca4f42b" xlink:to="loc_us-gaap_IncreaseDecreaseInIncomeTaxesPayableNetOfIncomeTaxesReceivable_54d450b4-89a3-40d5-a77c-e07cf86f80f1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInReinsuranceRecoverable_9d4b13ba-0846-4362-8dea-c7956ba6747f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInReinsuranceRecoverable"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a875eddf-f930-4c2d-be24-5db93ca4f42b" xlink:to="loc_us-gaap_IncreaseDecreaseInReinsuranceRecoverable_9d4b13ba-0846-4362-8dea-c7956ba6747f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInPremiumsReceivable_043c2d69-260e-4cbd-a047-9ccefc303c20" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInPremiumsReceivable"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a875eddf-f930-4c2d-be24-5db93ca4f42b" xlink:to="loc_us-gaap_IncreaseDecreaseInPremiumsReceivable_043c2d69-260e-4cbd-a047-9ccefc303c20" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainsLossesOnExtinguishmentOfDebt_952dfcc6-4d9a-48d9-a3ad-a30e8515062d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GainsLossesOnExtinguishmentOfDebt"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a875eddf-f930-4c2d-be24-5db93ca4f42b" xlink:to="loc_us-gaap_GainsLossesOnExtinguishmentOfDebt_952dfcc6-4d9a-48d9-a3ad-a30e8515062d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInLiabilityForClaimsAndClaimsAdjustmentExpenseReserve_52dbafb4-8fd1-4440-8801-015953b098eb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInLiabilityForClaimsAndClaimsAdjustmentExpenseReserve"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a875eddf-f930-4c2d-be24-5db93ca4f42b" xlink:to="loc_us-gaap_IncreaseDecreaseInLiabilityForClaimsAndClaimsAdjustmentExpenseReserve_52dbafb4-8fd1-4440-8801-015953b098eb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensation_01d8cda6-b0bf-4c41-97e8-aee59fa9b4a4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensation"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a875eddf-f930-4c2d-be24-5db93ca4f42b" xlink:to="loc_us-gaap_ShareBasedCompensation_01d8cda6-b0bf-4c41-97e8-aee59fa9b4a4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInDeferredIncomeTaxes_171274af-c684-4824-a0c1-f9dcfb651566" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInDeferredIncomeTaxes"/>
    <link:calculationArc order="9" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a875eddf-f930-4c2d-be24-5db93ca4f42b" xlink:to="loc_us-gaap_IncreaseDecreaseInDeferredIncomeTaxes_171274af-c684-4824-a0c1-f9dcfb651566" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInDeferredPolicyAcquisitionCosts_d3993020-3545-410b-a61c-e9d100583df4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInDeferredPolicyAcquisitionCosts"/>
    <link:calculationArc order="10" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a875eddf-f930-4c2d-be24-5db93ca4f42b" xlink:to="loc_us-gaap_IncreaseDecreaseInDeferredPolicyAcquisitionCosts_d3993020-3545-410b-a61c-e9d100583df4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_IncreaseDecreaseInReinsuranceRecoverableOnPaidLosses_5947e1b3-5794-434c-8e9f-e981b8853473" xlink:href="mtg-20231231.xsd#mtg_IncreaseDecreaseInReinsuranceRecoverableOnPaidLosses"/>
    <link:calculationArc order="11" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a875eddf-f930-4c2d-be24-5db93ca4f42b" xlink:to="loc_mtg_IncreaseDecreaseInReinsuranceRecoverableOnPaidLosses_5947e1b3-5794-434c-8e9f-e981b8853473" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_IncreaseDecreaseInProfitCommissionReceivable_9f372545-de0f-4a44-8dce-99774c791b61" xlink:href="mtg-20231231.xsd#mtg_IncreaseDecreaseInProfitCommissionReceivable"/>
    <link:calculationArc order="12" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a875eddf-f930-4c2d-be24-5db93ca4f42b" xlink:to="loc_mtg_IncreaseDecreaseInProfitCommissionReceivable_9f372545-de0f-4a44-8dce-99774c791b61" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_NetGainsLossesOnInvestmentsAndOtherFinancialInstruments_2c1ec2da-eadd-4359-8665-ba5d78c65958" xlink:href="mtg-20231231.xsd#mtg_NetGainsLossesOnInvestmentsAndOtherFinancialInstruments"/>
    <link:calculationArc order="13" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a875eddf-f930-4c2d-be24-5db93ca4f42b" xlink:to="loc_mtg_NetGainsLossesOnInvestmentsAndOtherFinancialInstruments_2c1ec2da-eadd-4359-8665-ba5d78c65958" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInUnearnedPremiums_10677419-f112-4fcc-9d7e-92f4fc61a08f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInUnearnedPremiums"/>
    <link:calculationArc order="14" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a875eddf-f930-4c2d-be24-5db93ca4f42b" xlink:to="loc_us-gaap_IncreaseDecreaseInUnearnedPremiums_10677419-f112-4fcc-9d7e-92f4fc61a08f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherInsuranceLiabilities_89f83269-0363-4d35-b98d-fcf73e5ca55b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInOtherInsuranceLiabilities"/>
    <link:calculationArc order="15" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a875eddf-f930-4c2d-be24-5db93ca4f42b" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherInsuranceLiabilities_89f83269-0363-4d35-b98d-fcf73e5ca55b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_55e24fbc-691f-4bda-81aa-036d7333b844" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="16" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a875eddf-f930-4c2d-be24-5db93ca4f42b" xlink:to="loc_us-gaap_NetIncomeLoss_55e24fbc-691f-4bda-81aa-036d7333b844" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable_d15d0237-ed79-4745-989f-eee4f922b121" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable"/>
    <link:calculationArc order="17" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a875eddf-f930-4c2d-be24-5db93ca4f42b" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable_d15d0237-ed79-4745-989f-eee4f922b121" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_1fe6b80d-261c-4ed2-afb4-f4b9b8423f88" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ProceedsFromSaleMaturityAndCollectionOfSecurities_70ba3faa-9766-4d17-addb-a6d2822f9854" xlink:href="mtg-20231231.xsd#mtg_ProceedsFromSaleMaturityAndCollectionOfSecurities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_1fe6b80d-261c-4ed2-afb4-f4b9b8423f88" xlink:to="loc_mtg_ProceedsFromSaleMaturityAndCollectionOfSecurities_70ba3faa-9766-4d17-addb-a6d2822f9854" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleMaturityAndCollectionsOfInvestments_aa8f12a1-fb6b-446a-8cc2-249bcecea0bf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromSaleMaturityAndCollectionsOfInvestments"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_1fe6b80d-261c-4ed2-afb4-f4b9b8423f88" xlink:to="loc_us-gaap_ProceedsFromSaleMaturityAndCollectionsOfInvestments_aa8f12a1-fb6b-446a-8cc2-249bcecea0bf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireInvestments_0b39b2fb-b343-4949-b213-fa46b19d4377" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsToAcquireInvestments"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_1fe6b80d-261c-4ed2-afb4-f4b9b8423f88" xlink:to="loc_us-gaap_PaymentsToAcquireInvestments_0b39b2fb-b343-4949-b213-fa46b19d4377" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_b9210c18-d803-41d7-a9b4-89835efc9efe" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsToAcquirePropertyPlantAndEquipment"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_1fe6b80d-261c-4ed2-afb4-f4b9b8423f88" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_b9210c18-d803-41d7-a9b4-89835efc9efe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment_75ac2726-6821-415a-9ed4-0c505a5623cf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_1fe6b80d-261c-4ed2-afb4-f4b9b8423f88" xlink:to="loc_us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment_75ac2726-6821-415a-9ed4-0c505a5623cf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect_1c289fb7-ed7e-4abf-87d3-7ea078c7e252" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_cb63fa5d-a602-4299-b337-b924703ae8f9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect_1c289fb7-ed7e-4abf-87d3-7ea078c7e252" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_cb63fa5d-a602-4299-b337-b924703ae8f9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_d8201352-d283-4e52-ba5f-301d9dc2f3bd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect_1c289fb7-ed7e-4abf-87d3-7ea078c7e252" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_d8201352-d283-4e52-ba5f-301d9dc2f3bd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_b6e582d8-89e6-4568-84c4-bcae17d4678a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect_1c289fb7-ed7e-4abf-87d3-7ea078c7e252" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_b6e582d8-89e6-4568-84c4-bcae17d4678a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_b3caadbb-49ab-4c17-8b8b-84238f126141" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_da09e365-9186-4a81-bc81-d3a16517eee9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_b3caadbb-49ab-4c17-8b8b-84238f126141" xlink:to="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_da09e365-9186-4a81-bc81-d3a16517eee9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarlyRepaymentOfSubordinatedDebt_b5965b2c-ebd6-4b97-9cd8-20b5c8910a29" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EarlyRepaymentOfSubordinatedDebt"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_b3caadbb-49ab-4c17-8b8b-84238f126141" xlink:to="loc_us-gaap_EarlyRepaymentOfSubordinatedDebt_b5965b2c-ebd6-4b97-9cd8-20b5c8910a29" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfFederalHomeLoanBankBorrowings_6281b43b-5905-4baa-9432-9321eb31cc7d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RepaymentsOfFederalHomeLoanBankBorrowings"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_b3caadbb-49ab-4c17-8b8b-84238f126141" xlink:to="loc_us-gaap_RepaymentsOfFederalHomeLoanBankBorrowings_6281b43b-5905-4baa-9432-9321eb31cc7d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfSeniorDebt_76092b14-5742-4a2c-964f-543b3bcec2d8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RepaymentsOfSeniorDebt"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_b3caadbb-49ab-4c17-8b8b-84238f126141" xlink:to="loc_us-gaap_RepaymentsOfSeniorDebt_76092b14-5742-4a2c-964f-543b3bcec2d8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_72a39b63-c056-467d-8d68-bcb0c5fdddda" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsForRepurchaseOfCommonStock"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_b3caadbb-49ab-4c17-8b8b-84238f126141" xlink:to="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_72a39b63-c056-467d-8d68-bcb0c5fdddda" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_GainLossOnDebtExtinghuishmentCashPortion_23e11cfd-bce8-41d3-8740-6eb6a065a66d" xlink:href="mtg-20231231.xsd#mtg_GainLossOnDebtExtinghuishmentCashPortion"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_b3caadbb-49ab-4c17-8b8b-84238f126141" xlink:to="loc_mtg_GainLossOnDebtExtinghuishmentCashPortion_23e11cfd-bce8-41d3-8740-6eb6a065a66d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsOfDividendsCommonStock_3532c79d-afd7-42d3-b2e2-1fa6db64f46a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsOfDividendsCommonStock"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_b3caadbb-49ab-4c17-8b8b-84238f126141" xlink:to="loc_us-gaap_PaymentsOfDividendsCommonStock_3532c79d-afd7-42d3-b2e2-1fa6db64f46a" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mgic.com/role/EarningsperShareDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#EarningsperShareDetails"/>
  <link:calculationLink xlink:role="http://www.mgic.com/role/EarningsperShareDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersDiluted_fbe8cadd-7e0b-4f87-9e83-67bde12daa43" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLossAvailableToCommonStockholdersDiluted"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_d207a7e7-5961-4732-b6ff-412eec409bf7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersDiluted_fbe8cadd-7e0b-4f87-9e83-67bde12daa43" xlink:to="loc_us-gaap_NetIncomeLoss_d207a7e7-5961-4732-b6ff-412eec409bf7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DilutiveSecurities_89190fb1-2833-4b6e-9a28-1986af9af2dc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DilutiveSecurities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersDiluted_fbe8cadd-7e0b-4f87-9e83-67bde12daa43" xlink:to="loc_us-gaap_DilutiveSecurities_89190fb1-2833-4b6e-9a28-1986af9af2dc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_2a95b628-bd32-4125-9b06-1e73ef00387a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_f22e7de2-2b73-4f5a-8048-f233d4d24d4f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingBasic"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_2a95b628-bd32-4125-9b06-1e73ef00387a" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_f22e7de2-2b73-4f5a-8048-f233d4d24d4f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_3f0099e0-981e-4b34-901d-b29dfea627c3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_2a95b628-bd32-4125-9b06-1e73ef00387a" xlink:to="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_3f0099e0-981e-4b34-901d-b29dfea627c3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment_b803f030-1436-4fb2-8ce0-f5ecc17e2f63" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_2a95b628-bd32-4125-9b06-1e73ef00387a" xlink:to="loc_us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment_b803f030-1436-4fb2-8ce0-f5ecc17e2f63" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mgic.com/role/InvestmentsAmortizedCostandFairValuesofDebtSecuritiesDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#InvestmentsAmortizedCostandFairValuesofDebtSecuritiesDetails"/>
  <link:calculationLink xlink:role="http://www.mgic.com/role/InvestmentsAmortizedCostandFairValuesofDebtSecuritiesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_mtg_AvailableForSaleSecuritiesDebtMaturitiesWithSingleMaturityDateFairValue_59a3acb6-3a32-47e0-b9da-59a2bad64911" xlink:href="mtg-20231231.xsd#mtg_AvailableForSaleSecuritiesDebtMaturitiesWithSingleMaturityDateFairValue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_b7430a82-09e3-4cc4-9e09-164b05ba0bc0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_mtg_AvailableForSaleSecuritiesDebtMaturitiesWithSingleMaturityDateFairValue_59a3acb6-3a32-47e0-b9da-59a2bad64911" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_b7430a82-09e3-4cc4-9e09-164b05ba0bc0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_16d8cc1b-20aa-4243-9f6f-c796e9d98fbb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_mtg_AvailableForSaleSecuritiesDebtMaturitiesWithSingleMaturityDateFairValue_59a3acb6-3a32-47e0-b9da-59a2bad64911" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_16d8cc1b-20aa-4243-9f6f-c796e9d98fbb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_25682b0c-4f65-423e-a188-3846a7c1a83c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_mtg_AvailableForSaleSecuritiesDebtMaturitiesWithSingleMaturityDateFairValue_59a3acb6-3a32-47e0-b9da-59a2bad64911" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_25682b0c-4f65-423e-a188-3846a7c1a83c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue_4ed4515d-458a-435e-a0c4-cbda3e5bf2cb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_mtg_AvailableForSaleSecuritiesDebtMaturitiesWithSingleMaturityDateFairValue_59a3acb6-3a32-47e0-b9da-59a2bad64911" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue_4ed4515d-458a-435e-a0c4-cbda3e5bf2cb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_b4792c44-78e7-4090-8fa4-4de0b8cc6818" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost_654864e8-232b-4ded-b932-9022e9ed1faa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_b4792c44-78e7-4090-8fa4-4de0b8cc6818" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost_654864e8-232b-4ded-b932-9022e9ed1faa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_AvailableForSaleSecuritiesDebtMaturitiesWithSingleMaturityDateAmortizedCost_2dbd6d50-311f-4f4b-adb2-450745b507c5" xlink:href="mtg-20231231.xsd#mtg_AvailableForSaleSecuritiesDebtMaturitiesWithSingleMaturityDateAmortizedCost"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_b4792c44-78e7-4090-8fa4-4de0b8cc6818" xlink:to="loc_mtg_AvailableForSaleSecuritiesDebtMaturitiesWithSingleMaturityDateAmortizedCost_2dbd6d50-311f-4f4b-adb2-450745b507c5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_6cf32e81-1704-4c20-ac55-39fa5a446352" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue_ee84c7d7-63a0-4eb3-9564-b8ae92be3d8f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_6cf32e81-1704-4c20-ac55-39fa5a446352" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue_ee84c7d7-63a0-4eb3-9564-b8ae92be3d8f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_AvailableForSaleSecuritiesDebtMaturitiesWithSingleMaturityDateFairValue_483e4606-8718-4596-949f-b4493bbcd14e" xlink:href="mtg-20231231.xsd#mtg_AvailableForSaleSecuritiesDebtMaturitiesWithSingleMaturityDateFairValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_6cf32e81-1704-4c20-ac55-39fa5a446352" xlink:to="loc_mtg_AvailableForSaleSecuritiesDebtMaturitiesWithSingleMaturityDateFairValue_483e4606-8718-4596-949f-b4493bbcd14e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_AvailableForSaleSecuritiesDebtMaturitiesWithSingleMaturityDateAmortizedCost_08f408e7-4cda-408a-b798-8b9b821e9565" xlink:href="mtg-20231231.xsd#mtg_AvailableForSaleSecuritiesDebtMaturitiesWithSingleMaturityDateAmortizedCost"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost_24dd2d88-b092-417e-bf56-5844655d5baf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_mtg_AvailableForSaleSecuritiesDebtMaturitiesWithSingleMaturityDateAmortizedCost_08f408e7-4cda-408a-b798-8b9b821e9565" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost_24dd2d88-b092-417e-bf56-5844655d5baf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost_53729bb8-c613-48dc-a516-e6ba2bf008f3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_mtg_AvailableForSaleSecuritiesDebtMaturitiesWithSingleMaturityDateAmortizedCost_08f408e7-4cda-408a-b798-8b9b821e9565" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost_53729bb8-c613-48dc-a516-e6ba2bf008f3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost_88cec143-ddc4-4320-8e85-37a3e00347dd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_mtg_AvailableForSaleSecuritiesDebtMaturitiesWithSingleMaturityDateAmortizedCost_08f408e7-4cda-408a-b798-8b9b821e9565" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost_88cec143-ddc4-4320-8e85-37a3e00347dd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost_64491e67-0fce-4910-9e05-9209a33f9c00" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_mtg_AvailableForSaleSecuritiesDebtMaturitiesWithSingleMaturityDateAmortizedCost_08f408e7-4cda-408a-b798-8b9b821e9565" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost_64491e67-0fce-4910-9e05-9209a33f9c00" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mgic.com/role/InvestmentsNetGainsLossesOnInvestmentsandOtherFinancialInstrumentsDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#InvestmentsNetGainsLossesOnInvestmentsandOtherFinancialInstrumentsDetails"/>
  <link:calculationLink xlink:role="http://www.mgic.com/role/InvestmentsNetGainsLossesOnInvestmentsandOtherFinancialInstrumentsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnInvestments_aee928fc-788b-4adf-b501-8d09f12f8c26" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GainLossOnInvestments"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySecuritiesFvNiUnrealizedGainLoss_b02b71a7-89cc-44c1-aa55-accdb05f7e96" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquitySecuritiesFvNiUnrealizedGainLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GainLossOnInvestments_aee928fc-788b-4adf-b501-8d09f12f8c26" xlink:to="loc_us-gaap_EquitySecuritiesFvNiUnrealizedGainLoss_b02b71a7-89cc-44c1-aa55-accdb05f7e96" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherThanTemporaryImpairmentLossDebtSecuritiesPortionRecognizedInEarnings_917cdc24-c144-422d-b3e4-b017e337d3b2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherThanTemporaryImpairmentLossDebtSecuritiesPortionRecognizedInEarnings"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GainLossOnInvestments_aee928fc-788b-4adf-b501-8d09f12f8c26" xlink:to="loc_us-gaap_OtherThanTemporaryImpairmentLossDebtSecuritiesPortionRecognizedInEarnings_917cdc24-c144-422d-b3e4-b017e337d3b2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmbeddedDerivativeGainLossOnEmbeddedDerivativeNet_4cc3527e-a510-488e-8679-b92bdc40f4b9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EmbeddedDerivativeGainLossOnEmbeddedDerivativeNet"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GainLossOnInvestments_aee928fc-788b-4adf-b501-8d09f12f8c26" xlink:to="loc_us-gaap_EmbeddedDerivativeGainLossOnEmbeddedDerivativeNet_4cc3527e-a510-488e-8679-b92bdc40f4b9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAllowanceForCreditLossPeriodIncreaseDecrease_d2246e6e-b674-4fd9-a695-55de85e9570d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleAllowanceForCreditLossPeriodIncreaseDecrease"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GainLossOnInvestments_aee928fc-788b-4adf-b501-8d09f12f8c26" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleAllowanceForCreditLossPeriodIncreaseDecrease_d2246e6e-b674-4fd9-a695-55de85e9570d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UnrealizedGainLossOnInvestments_9460b193-3b3b-427c-be69-302f6763790d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_UnrealizedGainLossOnInvestments"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GainLossOnInvestments_aee928fc-788b-4adf-b501-8d09f12f8c26" xlink:to="loc_us-gaap_UnrealizedGainLossOnInvestments_9460b193-3b3b-427c-be69-302f6763790d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGain_6abae547-a4b4-4cba-9060-4892d9794131" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleRealizedGain"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GainLossOnInvestments_aee928fc-788b-4adf-b501-8d09f12f8c26" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGain_6abae547-a4b4-4cba-9060-4892d9794131" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySecuritiesFvNiRealizedGainLoss_8948bb6a-ca9c-4ace-9ffd-f593c6b80c4e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquitySecuritiesFvNiRealizedGainLoss"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GainLossOnInvestments_aee928fc-788b-4adf-b501-8d09f12f8c26" xlink:to="loc_us-gaap_EquitySecuritiesFvNiRealizedGainLoss_8948bb6a-ca9c-4ace-9ffd-f593c6b80c4e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnSaleOfOtherInvestments_015bcb7c-7362-4c47-a191-4325841d0bf5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GainLossOnSaleOfOtherInvestments"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GainLossOnInvestments_aee928fc-788b-4adf-b501-8d09f12f8c26" xlink:to="loc_us-gaap_GainLossOnSaleOfOtherInvestments_015bcb7c-7362-4c47-a191-4325841d0bf5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedLoss_b52d99b0-662e-414c-848b-0c0a1313c443" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleRealizedLoss"/>
    <link:calculationArc order="9" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GainLossOnInvestments_aee928fc-788b-4adf-b501-8d09f12f8c26" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedLoss_b52d99b0-662e-414c-848b-0c0a1313c443" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mgic.com/role/InvestmentsSecuritiesInUnrealizedLossPositionDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#InvestmentsSecuritiesInUnrealizedLossPositionDetails"/>
  <link:calculationLink xlink:role="http://www.mgic.com/role/InvestmentsSecuritiesInUnrealizedLossPositionDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss_afc92d3b-ab97-4e5f-8ef2-b84361fe4b9a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_0ce904a6-06c7-46c6-af26-c1a8bfcb2f9a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss_afc92d3b-ab97-4e5f-8ef2-b84361fe4b9a" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_0ce904a6-06c7-46c6-af26-c1a8bfcb2f9a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_06289f73-ffa3-445d-a9c5-78eea89b3b8d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss_afc92d3b-ab97-4e5f-8ef2-b84361fe4b9a" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_06289f73-ffa3-445d-a9c5-78eea89b3b8d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition_878d2408-0ff5-4eea-a50c-a9aa23cffdd3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_1df122f4-c768-44f4-a1e8-f15336c7d491" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition_878d2408-0ff5-4eea-a50c-a9aa23cffdd3" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_1df122f4-c768-44f4-a1e8-f15336c7d491" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_42e2bfd4-720d-4595-9403-e772b2326f61" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition_878d2408-0ff5-4eea-a50c-a9aa23cffdd3" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_42e2bfd4-720d-4595-9403-e772b2326f61" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mgic.com/role/FairValueMeasurementsDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#FairValueMeasurementsDetails"/>
  <link:calculationLink xlink:role="http://www.mgic.com/role/FairValueMeasurementsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsFairValueDisclosure_0752e58e-d7a0-4cc4-a48a-1dac4f85a23e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetsFairValueDisclosure"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsFairValueDisclosure_b501cac4-3b23-4db2-8c1a-5522fdfeacd3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherAssetsFairValueDisclosure"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsFairValueDisclosure_0752e58e-d7a0-4cc4-a48a-1dac4f85a23e" xlink:to="loc_us-gaap_OtherAssetsFairValueDisclosure_b501cac4-3b23-4db2-8c1a-5522fdfeacd3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_3fd75ab0-2993-4d24-bece-9f9b7a6152f5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsFairValueDisclosure_0752e58e-d7a0-4cc4-a48a-1dac4f85a23e" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_3fd75ab0-2993-4d24-bece-9f9b7a6152f5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySecuritiesFvNi_d0132ddc-6c19-41eb-8b55-dddc896cf464" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquitySecuritiesFvNi"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsFairValueDisclosure_0752e58e-d7a0-4cc4-a48a-1dac4f85a23e" xlink:to="loc_us-gaap_EquitySecuritiesFvNi_d0132ddc-6c19-41eb-8b55-dddc896cf464" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mgic.com/role/FairValueMeasurementsAssetsandLiabilitiesNotMeasuredatFairValueDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#FairValueMeasurementsAssetsandLiabilitiesNotMeasuredatFairValueDetails"/>
  <link:calculationLink xlink:role="http://www.mgic.com/role/FairValueMeasurementsAssetsandLiabilitiesNotMeasuredatFairValueDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentFairValue_7ac01f18-0a7a-4b54-9f8b-4d9d981edf3b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentFairValue"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_SeniorNotesFairValueDisclosure_e279e65f-778a-44df-b533-2035c124987f" xlink:href="mtg-20231231.xsd#mtg_SeniorNotesFairValueDisclosure"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtInstrumentFairValue_7ac01f18-0a7a-4b54-9f8b-4d9d981edf3b" xlink:to="loc_mtg_SeniorNotesFairValueDisclosure_e279e65f-778a-44df-b533-2035c124987f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisSubordinatedDebtObligations_2a56dd2a-aeea-425a-99f9-3681242eda2a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisSubordinatedDebtObligations"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtInstrumentFairValue_7ac01f18-0a7a-4b54-9f8b-4d9d981edf3b" xlink:to="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisSubordinatedDebtObligations_2a56dd2a-aeea-425a-99f9-3681242eda2a" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mgic.com/role/LossReservesReconciliationofChangesinLossReservesDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#LossReservesReconciliationofChangesinLossReservesDetails"/>
  <link:calculationLink xlink:role="http://www.mgic.com/role/LossReservesReconciliationofChangesinLossReservesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaims1_46cb0138-48e6-473e-ad07-fdc857cde92f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaims1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersCurrentYearClaimsAndClaimsAdjustmentExpense_42844fd2-711e-421d-9dbf-5006302a5f3c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersCurrentYearClaimsAndClaimsAdjustmentExpense"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaims1_46cb0138-48e6-473e-ad07-fdc857cde92f" xlink:to="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersCurrentYearClaimsAndClaimsAdjustmentExpense_42844fd2-711e-421d-9dbf-5006302a5f3c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense_8b55c8b4-d1b6-4d05-9e73-9e23f937e725" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaims1_46cb0138-48e6-473e-ad07-fdc857cde92f" xlink:to="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense_8b55c8b4-d1b6-4d05-9e73-9e23f937e725" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForLossesAndLossAdjustmentExpense_92fb5078-1a28-41c4-8195-23bd3722adbe" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsForLossesAndLossAdjustmentExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidCurrentYear1_b11385fa-23f3-4b42-bb9b-36bc01bd7a68" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidCurrentYear1"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PaymentsForLossesAndLossAdjustmentExpense_92fb5078-1a28-41c4-8195-23bd3722adbe" xlink:to="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidCurrentYear1_b11385fa-23f3-4b42-bb9b-36bc01bd7a68" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidPriorYears1_f2852baa-a226-4b8a-b8a0-f22a21a7f0f7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidPriorYears1"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PaymentsForLossesAndLossAdjustmentExpense_92fb5078-1a28-41c4-8195-23bd3722adbe" xlink:to="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidPriorYears1_f2852baa-a226-4b8a-b8a0-f22a21a7f0f7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ReinsuranceTerminations_3bea9add-dade-4c1f-b833-060696aafdfd" xlink:href="mtg-20231231.xsd#mtg_ReinsuranceTerminations"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PaymentsForLossesAndLossAdjustmentExpense_92fb5078-1a28-41c4-8195-23bd3722adbe" xlink:to="loc_mtg_ReinsuranceTerminations_3bea9add-dade-4c1f-b833-060696aafdfd" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mgic.com/role/LossReservesAgingofPrimaryDefaultInventoryDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#LossReservesAgingofPrimaryDefaultInventoryDetails"/>
  <link:calculationLink xlink:role="http://www.mgic.com/role/LossReservesAgingofPrimaryDefaultInventoryDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_mtg_PrimaryDefaultInventoryPercentage_f553abdd-172f-492a-b584-c9e3b6a6cdeb" xlink:href="mtg-20231231.xsd#mtg_PrimaryDefaultInventoryPercentage"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_PrimaryDefaultInventoryThreeMonthsOrLessPercentage_0c1403df-a657-4e3f-bee3-d944a2da7205" xlink:href="mtg-20231231.xsd#mtg_PrimaryDefaultInventoryThreeMonthsOrLessPercentage"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_mtg_PrimaryDefaultInventoryPercentage_f553abdd-172f-492a-b584-c9e3b6a6cdeb" xlink:to="loc_mtg_PrimaryDefaultInventoryThreeMonthsOrLessPercentage_0c1403df-a657-4e3f-bee3-d944a2da7205" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_PrimaryDefaultInventoryFourToElevenMonthsPercentage_6f199c3e-059e-41b1-bfdd-e0bcfa6f54ec" xlink:href="mtg-20231231.xsd#mtg_PrimaryDefaultInventoryFourToElevenMonthsPercentage"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_mtg_PrimaryDefaultInventoryPercentage_f553abdd-172f-492a-b584-c9e3b6a6cdeb" xlink:to="loc_mtg_PrimaryDefaultInventoryFourToElevenMonthsPercentage_6f199c3e-059e-41b1-bfdd-e0bcfa6f54ec" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_PrimaryDefaultInventoryTwelveMonthsOrMorePercentage_46273177-047c-4bf5-bf04-5ebe6966dfa7" xlink:href="mtg-20231231.xsd#mtg_PrimaryDefaultInventoryTwelveMonthsOrMorePercentage"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_mtg_PrimaryDefaultInventoryPercentage_f553abdd-172f-492a-b584-c9e3b6a6cdeb" xlink:to="loc_mtg_PrimaryDefaultInventoryTwelveMonthsOrMorePercentage_46273177-047c-4bf5-bf04-5ebe6966dfa7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_PrimaryDefaultInventory_ab4980ed-6dcf-4c4d-9ad5-9b20bdef6850" xlink:href="mtg-20231231.xsd#mtg_PrimaryDefaultInventory"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_PrimaryDefaultInventoryThreeMonthsOrLess_174ccc60-252c-4b59-a0ed-9f7cd7892a4e" xlink:href="mtg-20231231.xsd#mtg_PrimaryDefaultInventoryThreeMonthsOrLess"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_mtg_PrimaryDefaultInventory_ab4980ed-6dcf-4c4d-9ad5-9b20bdef6850" xlink:to="loc_mtg_PrimaryDefaultInventoryThreeMonthsOrLess_174ccc60-252c-4b59-a0ed-9f7cd7892a4e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_PrimaryDefaultInventoryFourToElevenMonths_c32c4834-791b-41d5-9fb8-2f3606c7bebc" xlink:href="mtg-20231231.xsd#mtg_PrimaryDefaultInventoryFourToElevenMonths"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_mtg_PrimaryDefaultInventory_ab4980ed-6dcf-4c4d-9ad5-9b20bdef6850" xlink:to="loc_mtg_PrimaryDefaultInventoryFourToElevenMonths_c32c4834-791b-41d5-9fb8-2f3606c7bebc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_PrimaryDefaultInventoryTwelveMonthsOrMore_c3d8e77e-95f9-4c03-8957-43f26a428595" xlink:href="mtg-20231231.xsd#mtg_PrimaryDefaultInventoryTwelveMonthsOrMore"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_mtg_PrimaryDefaultInventory_ab4980ed-6dcf-4c4d-9ad5-9b20bdef6850" xlink:to="loc_mtg_PrimaryDefaultInventoryTwelveMonthsOrMore_c3d8e77e-95f9-4c03-8957-43f26a428595" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mgic.com/role/ReinsuranceSummaryofReinsuranceAgreementsDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#ReinsuranceSummaryofReinsuranceAgreementsDetails"/>
  <link:calculationLink xlink:role="http://www.mgic.com/role/ReinsuranceSummaryofReinsuranceAgreementsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PolicyholderBenefitsAndClaimsIncurredNet_c5d2de2c-7549-4ffe-88c8-38d2362c3043" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PolicyholderBenefitsAndClaimsIncurredNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PolicyholderBenefitsAndClaimsIncurredGross_267af083-5ca2-4449-a57d-e995571e1ce0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PolicyholderBenefitsAndClaimsIncurredGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PolicyholderBenefitsAndClaimsIncurredNet_c5d2de2c-7549-4ffe-88c8-38d2362c3043" xlink:to="loc_us-gaap_PolicyholderBenefitsAndClaimsIncurredGross_267af083-5ca2-4449-a57d-e995571e1ce0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReinsuranceEffectOnClaimsAndBenefitsIncurredAmountAssumed_0366cdd2-cd6f-4c08-a8aa-4e36b7f48bd2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReinsuranceEffectOnClaimsAndBenefitsIncurredAmountAssumed"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PolicyholderBenefitsAndClaimsIncurredNet_c5d2de2c-7549-4ffe-88c8-38d2362c3043" xlink:to="loc_us-gaap_ReinsuranceEffectOnClaimsAndBenefitsIncurredAmountAssumed_0366cdd2-cd6f-4c08-a8aa-4e36b7f48bd2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReinsuranceEffectOnClaimsAndBenefitsIncurredAmountCeded_b05703e2-bcf6-4301-85d4-ba0ade4619c9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReinsuranceEffectOnClaimsAndBenefitsIncurredAmountCeded"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PolicyholderBenefitsAndClaimsIncurredNet_c5d2de2c-7549-4ffe-88c8-38d2362c3043" xlink:to="loc_us-gaap_ReinsuranceEffectOnClaimsAndBenefitsIncurredAmountCeded_b05703e2-bcf6-4301-85d4-ba0ade4619c9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PremiumsEarnedNet_aa4e41bf-90ea-4393-bc35-37b4c4d5dd20" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PremiumsEarnedNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DirectPremiumsEarned_d2a48a53-d8eb-478e-8da9-108e1c3388a5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DirectPremiumsEarned"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PremiumsEarnedNet_aa4e41bf-90ea-4393-bc35-37b4c4d5dd20" xlink:to="loc_us-gaap_DirectPremiumsEarned_d2a48a53-d8eb-478e-8da9-108e1c3388a5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssumedPremiumsEarned_f4a1ea1b-703e-485a-90db-2ebe19588012" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssumedPremiumsEarned"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PremiumsEarnedNet_aa4e41bf-90ea-4393-bc35-37b4c4d5dd20" xlink:to="loc_us-gaap_AssumedPremiumsEarned_f4a1ea1b-703e-485a-90db-2ebe19588012" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CededPremiumsEarned_1a532ca6-9e57-4d63-bf18-7fbaf5b1a96a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CededPremiumsEarned"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PremiumsEarnedNet_aa4e41bf-90ea-4393-bc35-37b4c4d5dd20" xlink:to="loc_us-gaap_CededPremiumsEarned_1a532ca6-9e57-4d63-bf18-7fbaf5b1a96a" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mgic.com/role/OtherComprehensiveIncomeLossPretaxComponentsofOtherComprehensiveIncomeLossandRelatedIncomeTaxBenefitExpenseDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#OtherComprehensiveIncomeLossPretaxComponentsofOtherComprehensiveIncomeLossandRelatedIncomeTaxBenefitExpenseDetails"/>
  <link:calculationLink xlink:role="http://www.mgic.com/role/OtherComprehensiveIncomeLossPretaxComponentsofOtherComprehensiveIncomeLossandRelatedIncomeTaxBenefitExpenseDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPortionAttributableToParent_44f34c71-fd9a-4434-9736-5d3db5084062" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPortionAttributableToParent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentBeforeTaxPortionAttributableToParent_7a4f711b-b7f7-49ed-b3d7-f78a473bab3d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentBeforeTaxPortionAttributableToParent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPortionAttributableToParent_44f34c71-fd9a-4434-9736-5d3db5084062" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentBeforeTaxPortionAttributableToParent_7a4f711b-b7f7-49ed-b3d7-f78a473bab3d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansTaxPortionAttributableToParent_84985b9c-5903-4584-ad34-b800127f07dc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansTaxPortionAttributableToParent"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPortionAttributableToParent_44f34c71-fd9a-4434-9736-5d3db5084062" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansTaxPortionAttributableToParent_84985b9c-5903-4584-ad34-b800127f07dc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_96bbf4ef-1c90-4494-a35c-4212f168f66d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossBeforeTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentBeforeTaxPortionAttributableToParent_a5b932c4-98cc-4110-9bba-4d099da9cb10" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentBeforeTaxPortionAttributableToParent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_96bbf4ef-1c90-4494-a35c-4212f168f66d" xlink:to="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentBeforeTaxPortionAttributableToParent_a5b932c4-98cc-4110-9bba-4d099da9cb10" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentBeforeTaxPortionAttributableToParent_b2193ae8-4ceb-4fc3-860a-8be4a33e03da" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentBeforeTaxPortionAttributableToParent"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_96bbf4ef-1c90-4494-a35c-4212f168f66d" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentBeforeTaxPortionAttributableToParent_b2193ae8-4ceb-4fc3-860a-8be4a33e03da" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossTax_74045be4-9c0f-49c3-8a93-9e67623381b0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesTaxPortionAttributableToParent_95e0647a-7894-4f23-8aff-09df9d531b54" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesTaxPortionAttributableToParent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_74045be4-9c0f-49c3-8a93-9e67623381b0" xlink:to="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesTaxPortionAttributableToParent_95e0647a-7894-4f23-8aff-09df9d531b54" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansTaxPortionAttributableToParent_718d0ff5-236b-4585-981e-eee25a60806b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansTaxPortionAttributableToParent"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_74045be4-9c0f-49c3-8a93-9e67623381b0" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansTaxPortionAttributableToParent_718d0ff5-236b-4585-981e-eee25a60806b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent_8cf5fcde-a3fa-4028-8fec-d2b9957a6f42" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentBeforeTaxPortionAttributableToParent_f57fed73-0702-4ba4-ba96-3d5a7faff57a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentBeforeTaxPortionAttributableToParent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent_8cf5fcde-a3fa-4028-8fec-d2b9957a6f42" xlink:to="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentBeforeTaxPortionAttributableToParent_f57fed73-0702-4ba4-ba96-3d5a7faff57a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesTaxPortionAttributableToParent_da91a42e-6ada-4ab7-93ae-5ef6cde47d58" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesTaxPortionAttributableToParent"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent_8cf5fcde-a3fa-4028-8fec-d2b9957a6f42" xlink:to="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesTaxPortionAttributableToParent_da91a42e-6ada-4ab7-93ae-5ef6cde47d58" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mgic.com/role/BenefitPlansComponentsofNetPeriodicBenefitCostsDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#BenefitPlansComponentsofNetPeriodicBenefitCostsDetails"/>
  <link:calculationLink xlink:role="http://www.mgic.com/role/BenefitPlansComponentsofNetPeriodicBenefitCostsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_03c80ddb-fb0e-4f2a-bfe9-0ce862373b4d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlementsAndCurtailments1_19162436-e961-42cb-bec4-726a6cbb6cc2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlementsAndCurtailments1"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_03c80ddb-fb0e-4f2a-bfe9-0ce862373b4d" xlink:to="loc_us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlementsAndCurtailments1_19162436-e961-42cb-bec4-726a6cbb6cc2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets_840dc9b5-7574-42f0-a340-9bd8033250f3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_03c80ddb-fb0e-4f2a-bfe9-0ce862373b4d" xlink:to="loc_us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets_840dc9b5-7574-42f0-a340-9bd8033250f3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanServiceCost_d07fcf53-fb33-4f93-8408-f76cd6c5e5d4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanServiceCost"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_03c80ddb-fb0e-4f2a-bfe9-0ce862373b4d" xlink:to="loc_us-gaap_DefinedBenefitPlanServiceCost_d07fcf53-fb33-4f93-8408-f76cd6c5e5d4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses_7e659365-951b-455d-91a6-2339cf91895f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_03c80ddb-fb0e-4f2a-bfe9-0ce862373b4d" xlink:to="loc_us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses_7e659365-951b-455d-91a6-2339cf91895f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit_4e3411f2-d65d-41f0-9611-ac99c26f5e99" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_03c80ddb-fb0e-4f2a-bfe9-0ce862373b4d" xlink:to="loc_us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit_4e3411f2-d65d-41f0-9611-ac99c26f5e99" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanInterestCost_71272fc1-96ed-4612-baf8-354d396a9355" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanInterestCost"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_03c80ddb-fb0e-4f2a-bfe9-0ce862373b4d" xlink:to="loc_us-gaap_DefinedBenefitPlanInterestCost_71272fc1-96ed-4612-baf8-354d396a9355" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAmortizationOfTransitionAssetObligation_4d5e47b4-dcf9-4308-b35a-1a72688a93c8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAmortizationOfTransitionAssetObligation"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_03c80ddb-fb0e-4f2a-bfe9-0ce862373b4d" xlink:to="loc_us-gaap_DefinedBenefitPlanAmortizationOfTransitionAssetObligation_4d5e47b4-dcf9-4308-b35a-1a72688a93c8" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mgic.com/role/BenefitPlansDevelopmentofFundedStatusDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#BenefitPlansDevelopmentofFundedStatusDetails"/>
  <link:calculationLink xlink:role="http://www.mgic.com/role/BenefitPlansDevelopmentofFundedStatusDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanFundedStatusOfPlan_9a354a14-1cad-4710-aab3-7e5715bdce5f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanFundedStatusOfPlan"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanBenefitObligation_625de58f-0af8-4c3d-a130-bf4655ad9369" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanBenefitObligation"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanFundedStatusOfPlan_9a354a14-1cad-4710-aab3-7e5715bdce5f" xlink:to="loc_us-gaap_DefinedBenefitPlanBenefitObligation_625de58f-0af8-4c3d-a130-bf4655ad9369" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanFairValueOfPlanAssets_aa7bf66f-2450-437c-a93e-ce30d31fba5f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanFairValueOfPlanAssets"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanFundedStatusOfPlan_9a354a14-1cad-4710-aab3-7e5715bdce5f" xlink:to="loc_us-gaap_DefinedBenefitPlanFairValueOfPlanAssets_aa7bf66f-2450-437c-a93e-ce30d31fba5f" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mgic.com/role/BenefitPlansAccumulatedOtherComprehensiveIncomeDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#BenefitPlansAccumulatedOtherComprehensiveIncomeDetails"/>
  <link:calculationLink xlink:role="http://www.mgic.com/role/BenefitPlansAccumulatedOtherComprehensiveIncomeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeBeforeTax_8e0b4004-fa52-4ea2-a771-a7d7816aa824" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeBeforeTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetGainsLossesBeforeTax_0fde7753-0d0d-438d-a973-359962a643f0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetGainsLossesBeforeTax"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeBeforeTax_8e0b4004-fa52-4ea2-a771-a7d7816aa824" xlink:to="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetGainsLossesBeforeTax_0fde7753-0d0d-438d-a973-359962a643f0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetPriorServiceCostCreditBeforeTax_b1ec053e-c3f1-462f-a6b0-b4185b509a8b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetPriorServiceCostCreditBeforeTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeBeforeTax_8e0b4004-fa52-4ea2-a771-a7d7816aa824" xlink:to="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetPriorServiceCostCreditBeforeTax_b1ec053e-c3f1-462f-a6b0-b4185b509a8b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetTransitionAssetsObligationsBeforeTax_13d37666-5a18-4d4c-9521-0ceedfff6a0f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetTransitionAssetsObligationsBeforeTax"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeBeforeTax_8e0b4004-fa52-4ea2-a771-a7d7816aa824" xlink:to="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetTransitionAssetsObligationsBeforeTax_13d37666-5a18-4d4c-9521-0ceedfff6a0f" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mgic.com/role/IncomeTaxesDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#IncomeTaxesDetails"/>
  <link:calculationLink xlink:role="http://www.mgic.com/role/IncomeTaxesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilities_95ff9239-3a17-4312-aeb5-81b53a899659" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredTaxLiabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilities_af4556ec-6c15-47df-9f1d-c7e54d96ace0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredIncomeTaxLiabilities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxLiabilities_95ff9239-3a17-4312-aeb5-81b53a899659" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilities_af4556ec-6c15-47df-9f1d-c7e54d96ace0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsGross_30bacbbe-e5ae-425c-90a2-e0fb4218c18d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredTaxAssetsGross"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxLiabilities_95ff9239-3a17-4312-aeb5-81b53a899659" xlink:to="loc_us-gaap_DeferredTaxAssetsGross_30bacbbe-e5ae-425c-90a2-e0fb4218c18d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_a3779a08-61c3-45b0-ba2a-80c9495c06bd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EffectiveIncomeTaxRateContinuingOperations"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate_4160b6c1-be26-40ed-83e1-bb13b46df54a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_a3779a08-61c3-45b0-ba2a-80c9495c06bd" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate_4160b6c1-be26-40ed-83e1-bb13b46df54a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationTaxExemptIncome_518c323d-e55d-4c40-abb0-d3dc4a710b62" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationTaxExemptIncome"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_a3779a08-61c3-45b0-ba2a-80c9495c06bd" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationTaxExemptIncome_518c323d-e55d-4c40-abb0-d3dc4a710b62" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationOtherAdjustments_a7d5f63d-c2c3-4f2c-b253-93fc15faec01" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationOtherAdjustments"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_a3779a08-61c3-45b0-ba2a-80c9495c06bd" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationOtherAdjustments_a7d5f63d-c2c3-4f2c-b253-93fc15faec01" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mgic.com/role/IncomeTaxesDetails_1" xlink:type="simple" xlink:href="mtg-20231231.xsd#IncomeTaxesDetails_1"/>
  <link:calculationLink xlink:role="http://www.mgic.com/role/IncomeTaxesDetails_1" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilities_0ed059de-96b8-44e6-91cc-388c49b6fc01" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredTaxLiabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsUnearnedPremiumsReserve_01738951-674d-4583-b49a-3f91801f68b5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsUnearnedPremiumsReserve"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxLiabilities_0ed059de-96b8-44e6-91cc-388c49b6fc01" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsUnearnedPremiumsReserve_01738951-674d-4583-b49a-3f91801f68b5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_DeferredTaxLiabilitiesTaxDeferredExpenseCompensationandBenefitsEmployeeBenefits_c9c44dc6-f199-4840-b0b4-956250acbef8" xlink:href="mtg-20231231.xsd#mtg_DeferredTaxLiabilitiesTaxDeferredExpenseCompensationandBenefitsEmployeeBenefits"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxLiabilities_0ed059de-96b8-44e6-91cc-388c49b6fc01" xlink:to="loc_mtg_DeferredTaxLiabilitiesTaxDeferredExpenseCompensationandBenefitsEmployeeBenefits_c9c44dc6-f199-4840-b0b4-956250acbef8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsLossReserves_11565243-41e1-44e6-97a9-59750c193c09" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsLossReserves"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxLiabilities_0ed059de-96b8-44e6-91cc-388c49b6fc01" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsLossReserves_11565243-41e1-44e6-97a9-59750c193c09" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesDeferredExpense_0a44d95f-7596-49b9-b0e2-d845d7e3405f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredTaxLiabilitiesDeferredExpense"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxLiabilities_0ed059de-96b8-44e6-91cc-388c49b6fc01" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesDeferredExpense_0a44d95f-7596-49b9-b0e2-d845d7e3405f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefits_84ac5abf-ec52-4661-ad4a-027f30cbd129" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefits"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxLiabilities_0ed059de-96b8-44e6-91cc-388c49b6fc01" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefits_84ac5abf-ec52-4661-ad4a-027f30cbd129" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_DeferredTaxAssetsLiabilitiesNetOther_01520bd3-7666-4574-8373-f61a4ff4cac3" xlink:href="mtg-20231231.xsd#mtg_DeferredTaxAssetsLiabilitiesNetOther"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxLiabilities_0ed059de-96b8-44e6-91cc-388c49b6fc01" xlink:to="loc_mtg_DeferredTaxAssetsLiabilitiesNetOther_01520bd3-7666-4574-8373-f61a4ff4cac3" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mgic.com/role/LeasesDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#LeasesDetails"/>
  <link:calculationLink xlink:role="http://www.mgic.com/role/LeasesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_ef379576-3cb0-4860-a528-d74520ce5039" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_ecca1df1-90ee-4dc3-927f-70b672c12ff4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_ef379576-3cb0-4860-a528-d74520ce5039" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_ecca1df1-90ee-4dc3-927f-70b672c12ff4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_0fe4067c-04d3-4939-b988-ed5180db4a27" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_ef379576-3cb0-4860-a528-d74520ce5039" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_0fe4067c-04d3-4939-b988-ed5180db4a27" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_4b69bbe2-fb90-47fc-9ba3-fb3dfb7a7a92" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_ef379576-3cb0-4860-a528-d74520ce5039" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_4b69bbe2-fb90-47fc-9ba3-fb3dfb7a7a92" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_620e3311-7b09-4801-90fa-924d9887e7f8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_ef379576-3cb0-4860-a528-d74520ce5039" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_620e3311-7b09-4801-90fa-924d9887e7f8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive_ee9079c2-a4c0-4e10-8ebe-a70119301432" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_ef379576-3cb0-4860-a528-d74520ce5039" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive_ee9079c2-a4c0-4e10-8ebe-a70119301432" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mgic.com/role/SCHEDULEIICONDENSEDFINANCIALINFORMATIONOFREGISTRANTDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#SCHEDULEIICONDENSEDFINANCIALINFORMATIONOFREGISTRANTDetails"/>
  <link:calculationLink xlink:role="http://www.mgic.com/role/SCHEDULEIICONDENSEDFINANCIALINFORMATIONOFREGISTRANTDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_b239444c-5d99-49b5-af3c-044d181d6833" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromSubsidiariesNetOfTax_b51c5dc3-ec3f-4c5b-a663-7954129340f7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeLossFromSubsidiariesNetOfTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_b239444c-5d99-49b5-af3c-044d181d6833" xlink:to="loc_us-gaap_IncomeLossFromSubsidiariesNetOfTax_b51c5dc3-ec3f-4c5b-a663-7954129340f7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_7056cf1d-5c87-42b4-967e-689acb423846" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_b239444c-5d99-49b5-af3c-044d181d6833" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_7056cf1d-5c87-42b4-967e-689acb423846" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_b640be2e-f230-49a6-bb41-538b12b0dc86" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_b239444c-5d99-49b5-af3c-044d181d6833" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_b640be2e-f230-49a6-bb41-538b12b0dc86" xlink:type="arc"/>
  </link:calculationLink>
</link:linkbase>
