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

<!--XBRL Document Created with Wdesk from Workiva-->
<!--Copyright 2020 Workiva-->
<!--r:da2ae99b-62be-4265-bb8d-327ceb18c3cb,g:9717631d-aa6a-4cc8-b8a6-949f90d9d68f-->
<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.nationalmi.com/role/COVERPAGE" xlink:type="simple" xlink:href="nmih-20200930.xsd#COVERPAGE"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/COVERPAGE" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/CONDENSEDCONSOLIDATEDBALANCESHEETSUNAUDITED" xlink:type="simple" xlink:href="nmih-20200930.xsd#CONDENSEDCONSOLIDATEDBALANCESHEETSUNAUDITED"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CONDENSEDCONSOLIDATEDBALANCESHEETSUNAUDITED" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_24924e89-bb78-4ad8-bf6f-7e185a399f9b" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommitmentsAndContingencies_d29279fa-423d-45c7-b03e-530258deb6d1" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_CommitmentsAndContingencies"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_24924e89-bb78-4ad8-bf6f-7e185a399f9b" xlink:to="loc_us-gaap_CommitmentsAndContingencies_d29279fa-423d-45c7-b03e-530258deb6d1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_7ffc589a-1945-4cb1-80ce-2a2902dd2aaf" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_24924e89-bb78-4ad8-bf6f-7e185a399f9b" xlink:to="loc_us-gaap_Liabilities_7ffc589a-1945-4cb1-80ce-2a2902dd2aaf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_c940d684-b959-4a87-931a-b7420a2340e6" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StockholdersEquity"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_24924e89-bb78-4ad8-bf6f-7e185a399f9b" xlink:to="loc_us-gaap_StockholdersEquity_c940d684-b959-4a87-931a-b7420a2340e6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_17a5826e-5d74-431e-81a0-f5fbfe940fc0" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValueOutstanding_6f47dc21-49bf-4cda-b0d7-0b254ab7a4c6" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_CommonStockValueOutstanding"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_17a5826e-5d74-431e-81a0-f5fbfe940fc0" xlink:to="loc_us-gaap_CommonStockValueOutstanding_6f47dc21-49bf-4cda-b0d7-0b254ab7a4c6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapital_d06902fb-cd5c-4089-8c85-f6daadcd4b03" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AdditionalPaidInCapital"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_17a5826e-5d74-431e-81a0-f5fbfe940fc0" xlink:to="loc_us-gaap_AdditionalPaidInCapital_d06902fb-cd5c-4089-8c85-f6daadcd4b03" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_2c4b3041-afa1-4c05-ac61-b2091d4b4c5f" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_17a5826e-5d74-431e-81a0-f5fbfe940fc0" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_2c4b3041-afa1-4c05-ac61-b2091d4b4c5f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_c5a82449-62e9-4fff-9ca4-b064eae333cc" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_17a5826e-5d74-431e-81a0-f5fbfe940fc0" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_c5a82449-62e9-4fff-9ca4-b064eae333cc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_f24843c9-cb08-4e12-8d43-02a64a957ee0" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_Assets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_294844f9-4c7d-438e-8a0c-ee5ab2748b2c" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_f24843c9-cb08-4e12-8d43-02a64a957ee0" xlink:to="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_294844f9-4c7d-438e-8a0c-ee5ab2748b2c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_1fad7c0a-f5b0-45b7-bc80-3a58edfe37b9" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_Assets_f24843c9-cb08-4e12-8d43-02a64a957ee0" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_1fad7c0a-f5b0-45b7-bc80-3a58edfe37b9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssets_700017c7-7928-4c80-a312-ba3fb7a84bbe" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherAssets"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_f24843c9-cb08-4e12-8d43-02a64a957ee0" xlink:to="loc_us-gaap_OtherAssets_700017c7-7928-4c80-a312-ba3fb7a84bbe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_25cea06f-0f27-4aaa-bf2a-57b217edb5c7" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_f24843c9-cb08-4e12-8d43-02a64a957ee0" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_25cea06f-0f27-4aaa-bf2a-57b217edb5c7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_f4531d35-642c-4da4-b578-f8e6dbf62d8d" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_PrepaidExpenseCurrentAndNoncurrent"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_f24843c9-cb08-4e12-8d43-02a64a957ee0" xlink:to="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_f4531d35-642c-4da4-b578-f8e6dbf62d8d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredPolicyAcquisitionCosts_65ff34aa-dd2d-423a-89b1-7e07f5f745bd" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DeferredPolicyAcquisitionCosts"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_f24843c9-cb08-4e12-8d43-02a64a957ee0" xlink:to="loc_us-gaap_DeferredPolicyAcquisitionCosts_65ff34aa-dd2d-423a-89b1-7e07f5f745bd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PremiumsReceivableAtCarryingValue_5aaff5b0-5e43-4255-8ce9-2c2f38168efc" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_f24843c9-cb08-4e12-8d43-02a64a957ee0" xlink:to="loc_us-gaap_PremiumsReceivableAtCarryingValue_5aaff5b0-5e43-4255-8ce9-2c2f38168efc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetIncludingGoodwill_34c2ef47-ee12-4cfd-ba18-a5c1a1382645" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IntangibleAssetsNetIncludingGoodwill"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_f24843c9-cb08-4e12-8d43-02a64a957ee0" xlink:to="loc_us-gaap_IntangibleAssetsNetIncludingGoodwill_34c2ef47-ee12-4cfd-ba18-a5c1a1382645" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidReinsurancePremiums_509dfaa0-732b-4980-a9fb-7ed1c3e346ba" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_PrepaidReinsurancePremiums"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_f24843c9-cb08-4e12-8d43-02a64a957ee0" xlink:to="loc_us-gaap_PrepaidReinsurancePremiums_509dfaa0-732b-4980-a9fb-7ed1c3e346ba" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReinsuranceRecoverablesGross_8176a4ba-5208-4c99-8081-016d17d35112" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ReinsuranceRecoverablesGross"/>
    <link:calculationArc order="10" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_f24843c9-cb08-4e12-8d43-02a64a957ee0" xlink:to="loc_us-gaap_ReinsuranceRecoverablesGross_8176a4ba-5208-4c99-8081-016d17d35112" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedInvestmentIncomeReceivable_8007e209-b5bc-4dc3-a7e6-265682206a9b" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AccruedInvestmentIncomeReceivable"/>
    <link:calculationArc order="11" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_f24843c9-cb08-4e12-8d43-02a64a957ee0" xlink:to="loc_us-gaap_AccruedInvestmentIncomeReceivable_8007e209-b5bc-4dc3-a7e6-265682206a9b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_303cb5c4-4d1a-4fc3-9d54-ff9652691d3a" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_Liabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent_81c19eda-42e6-4037-ac4e-c069bf9cef50" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_303cb5c4-4d1a-4fc3-9d54-ff9652691d3a" xlink:to="loc_us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent_81c19eda-42e6-4037-ac4e-c069bf9cef50" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SecuredDebt_fc6fa310-58a1-4d0c-b5e7-4436307aa905" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_SecuredDebt"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_303cb5c4-4d1a-4fc3-9d54-ff9652691d3a" xlink:to="loc_us-gaap_SecuredDebt_fc6fa310-58a1-4d0c-b5e7-4436307aa905" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilities_9988704a-6608-4695-b9a8-3df20db83418" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherLiabilities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_303cb5c4-4d1a-4fc3-9d54-ff9652691d3a" xlink:to="loc_us-gaap_OtherLiabilities_9988704a-6608-4695-b9a8-3df20db83418" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UnearnedPremiums_7b8bdf8e-63a0-454d-97be-67831d1812da" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_303cb5c4-4d1a-4fc3-9d54-ff9652691d3a" xlink:to="loc_us-gaap_UnearnedPremiums_7b8bdf8e-63a0-454d-97be-67831d1812da" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WarrantsAndRightsOutstanding_9515373d-aeff-423c-9591-cad871aa3746" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_WarrantsAndRightsOutstanding"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_303cb5c4-4d1a-4fc3-9d54-ff9652691d3a" xlink:to="loc_us-gaap_WarrantsAndRightsOutstanding_9515373d-aeff-423c-9591-cad871aa3746" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_f55a47b9-c307-45bc-a63a-8d4bd0ab0aca" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DeferredIncomeTaxLiabilitiesNet"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_303cb5c4-4d1a-4fc3-9d54-ff9652691d3a" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_f55a47b9-c307-45bc-a63a-8d4bd0ab0aca" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_c34e19eb-abc5-445e-891b-d412055801db" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_303cb5c4-4d1a-4fc3-9d54-ff9652691d3a" xlink:to="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_c34e19eb-abc5-445e-891b-d412055801db" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FundsHeldUnderReinsuranceAgreementsLiability_917aafc9-882f-4a90-bd23-58767b144df5" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FundsHeldUnderReinsuranceAgreementsLiability"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_303cb5c4-4d1a-4fc3-9d54-ff9652691d3a" xlink:to="loc_us-gaap_FundsHeldUnderReinsuranceAgreementsLiability_917aafc9-882f-4a90-bd23-58767b144df5" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/CONDENSEDCONSOLIDATEDBALANCESHEETSUNAUDITEDParenthetical" xlink:type="simple" xlink:href="nmih-20200930.xsd#CONDENSEDCONSOLIDATEDBALANCESHEETSUNAUDITEDParenthetical"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CONDENSEDCONSOLIDATEDBALANCESHEETSUNAUDITEDParenthetical" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSANDCOMPREHENSIVEINCOMEUNAUDITED" xlink:type="simple" xlink:href="nmih-20200930.xsd#CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSANDCOMPREHENSIVEINCOMEUNAUDITED"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSANDCOMPREHENSIVEINCOMEUNAUDITED" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostsAndExpenses_9313312a-2b64-45e6-9a76-16394830b736" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_CostsAndExpenses"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncurredClaimsPropertyCasualtyAndLiability_116e1596-da62-4296-bec0-c6c728424ded" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncurredClaimsPropertyCasualtyAndLiability"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_9313312a-2b64-45e6-9a76-16394830b736" xlink:to="loc_us-gaap_IncurredClaimsPropertyCasualtyAndLiability_116e1596-da62-4296-bec0-c6c728424ded" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherCostAndExpenseOperating_4563de4d-a53e-43f7-a818-5aadeece3b07" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherCostAndExpenseOperating"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_9313312a-2b64-45e6-9a76-16394830b736" xlink:to="loc_us-gaap_OtherCostAndExpenseOperating_4563de4d-a53e-43f7-a818-5aadeece3b07" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingExpense_5a87be3c-c9cc-42ae-8f5b-b760560643bd" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherNonoperatingExpense"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_9313312a-2b64-45e6-9a76-16394830b736" xlink:to="loc_us-gaap_OtherNonoperatingExpense_5a87be3c-c9cc-42ae-8f5b-b760560643bd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpense_607030bf-3758-4a70-98f6-b879c533ee0f" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_InterestExpense"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_9313312a-2b64-45e6-9a76-16394830b736" xlink:to="loc_us-gaap_InterestExpense_607030bf-3758-4a70-98f6-b879c533ee0f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_nmih_GainLossonChangeinFairValueofWarrantLiability_07a7b162-5f82-4ed9-ba06-75387e591abd" xlink:href="nmih-20200930.xsd#nmih_GainLossonChangeinFairValueofWarrantLiability"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_9313312a-2b64-45e6-9a76-16394830b736" xlink:to="loc_nmih_GainLossonChangeinFairValueofWarrantLiability_07a7b162-5f82-4ed9-ba06-75387e591abd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_8aca7257-bfd4-48dc-8661-a11fc3bdf6f8" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_NetIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_8255b6e5-a865-4e8f-b7cf-b89f06c748fc" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_8aca7257-bfd4-48dc-8661-a11fc3bdf6f8" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_8255b6e5-a865-4e8f-b7cf-b89f06c748fc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_1a55c940-24a5-465d-a4c3-ab3064ab6b0b" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_8aca7257-bfd4-48dc-8661-a11fc3bdf6f8" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_1a55c940-24a5-465d-a4c3-ab3064ab6b0b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_82dce205-662f-4c50-87c8-412af9ccd191" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax_8e01f402-f49e-48c1-a822-a23527d351d5" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_82dce205-662f-4c50-87c8-412af9ccd191" xlink:to="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax_8e01f402-f49e-48c1-a822-a23527d351d5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax_e11bd6a6-884f-40eb-9936-68fe94e9507d" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_82dce205-662f-4c50-87c8-412af9ccd191" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax_e11bd6a6-884f-40eb-9936-68fe94e9507d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Revenues_32ee138f-370e-4cf4-b551-eb242b9eda69" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_Revenues"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PremiumsEarnedNet_59685236-23e2-48e0-81e4-44eb03991e77" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_PremiumsEarnedNet"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Revenues_32ee138f-370e-4cf4-b551-eb242b9eda69" xlink:to="loc_us-gaap_PremiumsEarnedNet_59685236-23e2-48e0-81e4-44eb03991e77" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetInvestmentIncome_ff6f2546-96a9-4ad7-8572-15e9f290ef65" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_NetInvestmentIncome"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Revenues_32ee138f-370e-4cf4-b551-eb242b9eda69" xlink:to="loc_us-gaap_NetInvestmentIncome_ff6f2546-96a9-4ad7-8572-15e9f290ef65" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnInvestments_f78f0ff4-2416-41d6-bd7d-fa018d654344" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_GainLossOnInvestments"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Revenues_32ee138f-370e-4cf4-b551-eb242b9eda69" xlink:to="loc_us-gaap_GainLossOnInvestments_f78f0ff4-2416-41d6-bd7d-fa018d654344" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherIncome_d49d47d5-c2b3-4386-9590-3feccb73733c" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherIncome"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Revenues_32ee138f-370e-4cf4-b551-eb242b9eda69" xlink:to="loc_us-gaap_OtherIncome_d49d47d5-c2b3-4386-9590-3feccb73733c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_be1ff451-6a4e-4d0c-ad98-29cbc7e0771c" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ComprehensiveIncomeNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_3f5f0784-4eee-4824-b6c4-88a8fbab2d4e" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_be1ff451-6a4e-4d0c-ad98-29cbc7e0771c" xlink:to="loc_us-gaap_NetIncomeLoss_3f5f0784-4eee-4824-b6c4-88a8fbab2d4e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_a9dd66c5-01fd-48bc-80f5-970d48b2818d" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_be1ff451-6a4e-4d0c-ad98-29cbc7e0771c" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_a9dd66c5-01fd-48bc-80f5-970d48b2818d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_6f07b36b-557a-4b36-a48f-f3c391e07bf3" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Revenues_666f7f95-a339-4fbe-9c8f-eab04fdeb607" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_Revenues"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_6f07b36b-557a-4b36-a48f-f3c391e07bf3" xlink:to="loc_us-gaap_Revenues_666f7f95-a339-4fbe-9c8f-eab04fdeb607" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostsAndExpenses_4df26eff-9bf0-4783-af89-a8884171cfb8" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_CostsAndExpenses"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_6f07b36b-557a-4b36-a48f-f3c391e07bf3" xlink:to="loc_us-gaap_CostsAndExpenses_4df26eff-9bf0-4783-af89-a8884171cfb8" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSANDCOMPREHENSIVEINCOMEUNAUDITEDParenthetical" xlink:type="simple" xlink:href="nmih-20200930.xsd#CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSANDCOMPREHENSIVEINCOMEUNAUDITEDParenthetical"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSANDCOMPREHENSIVEINCOMEUNAUDITEDParenthetical" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCHANGESINSHAREHOLDERSEQUITYUNAUDITED" xlink:type="simple" xlink:href="nmih-20200930.xsd#CONDENSEDCONSOLIDATEDSTATEMENTSOFCHANGESINSHAREHOLDERSEQUITYUNAUDITED"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCHANGESINSHAREHOLDERSEQUITYUNAUDITED" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCHANGESINSHAREHOLDERSEQUITYUNAUDITEDParenthetical" xlink:type="simple" xlink:href="nmih-20200930.xsd#CONDENSEDCONSOLIDATEDSTATEMENTSOFCHANGESINSHAREHOLDERSEQUITYUNAUDITEDParenthetical"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCHANGESINSHAREHOLDERSEQUITYUNAUDITEDParenthetical" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUNAUDITED" xlink:type="simple" xlink:href="nmih-20200930.xsd#CONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUNAUDITED"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUNAUDITED" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_45596889-d196-48a6-a4c6-afcf2e12dd0d" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireShortTermInvestments_7f585ae8-b0da-441e-8956-0bd655b4a353" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_PaymentsToAcquireShortTermInvestments"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_45596889-d196-48a6-a4c6-afcf2e12dd0d" xlink:to="loc_us-gaap_PaymentsToAcquireShortTermInvestments_7f585ae8-b0da-441e-8956-0bd655b4a353" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt_bf45c4db-9826-416e-b1bd-86ff712f225a" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_45596889-d196-48a6-a4c6-afcf2e12dd0d" xlink:to="loc_us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt_bf45c4db-9826-416e-b1bd-86ff712f225a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleOfShortTermInvestments_5bab9539-294e-4b29-b4aa-e43144d4b526" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ProceedsFromSaleOfShortTermInvestments"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_45596889-d196-48a6-a4c6-afcf2e12dd0d" xlink:to="loc_us-gaap_ProceedsFromSaleOfShortTermInvestments_5bab9539-294e-4b29-b4aa-e43144d4b526" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleAndMaturityOfAvailableForSaleSecurities_9c27baf3-afcb-4594-a074-c2f7b4270bbf" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ProceedsFromSaleAndMaturityOfAvailableForSaleSecurities"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_45596889-d196-48a6-a4c6-afcf2e12dd0d" xlink:to="loc_us-gaap_ProceedsFromSaleAndMaturityOfAvailableForSaleSecurities_9c27baf3-afcb-4594-a074-c2f7b4270bbf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_1dd9ac40-746b-4555-bb96-0cce991315b9" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_PaymentsToAcquirePropertyPlantAndEquipment"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_45596889-d196-48a6-a4c6-afcf2e12dd0d" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_1dd9ac40-746b-4555-bb96-0cce991315b9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_db27173b-a6e3-41d6-afc4-4071f96346ff" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfSecuredDebt_e6d89d36-9291-4593-beaa-89f6764b137b" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RepaymentsOfSecuredDebt"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_db27173b-a6e3-41d6-afc4-4071f96346ff" xlink:to="loc_us-gaap_RepaymentsOfSecuredDebt_e6d89d36-9291-4593-beaa-89f6764b137b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsOfDebtIssuanceCosts_69550753-b473-4238-b14b-ff96c63d5494" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_PaymentsOfDebtIssuanceCosts"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_db27173b-a6e3-41d6-afc4-4071f96346ff" xlink:to="loc_us-gaap_PaymentsOfDebtIssuanceCosts_69550753-b473-4238-b14b-ff96c63d5494" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlansIncludingStockOptions_d24c2304-4f3a-4197-b8bb-3355b6cfe50f" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlansIncludingStockOptions"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_db27173b-a6e3-41d6-afc4-4071f96346ff" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlansIncludingStockOptions_d24c2304-4f3a-4197-b8bb-3355b6cfe50f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfSeniorLongTermDebt_9962dfde-9623-474c-af41-5de0e02f2252" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ProceedsFromIssuanceOfSeniorLongTermDebt"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_db27173b-a6e3-41d6-afc4-4071f96346ff" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfSeniorLongTermDebt_9962dfde-9623-474c-af41-5de0e02f2252" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_4a03a133-308b-49bc-b032-07c72a9a3d88" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_db27173b-a6e3-41d6-afc4-4071f96346ff" xlink:to="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_4a03a133-308b-49bc-b032-07c72a9a3d88" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_34390921-0a17-432f-a19f-a932cae36a8b" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ProceedsFromIssuanceOfCommonStock"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_db27173b-a6e3-41d6-afc4-4071f96346ff" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_34390921-0a17-432f-a19f-a932cae36a8b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_89f8cf83-d033-4ed5-96f7-e53775034649" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_99b9135a-9714-4d4a-bb75-ec1318f51a7e" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_NetCashProvidedByUsedInOperatingActivities_89f8cf83-d033-4ed5-96f7-e53775034649" xlink:to="loc_us-gaap_NetIncomeLoss_99b9135a-9714-4d4a-bb75-ec1318f51a7e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss_518eb57d-2990-4eb9-b9d4-ff1f58a26301" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_89f8cf83-d033-4ed5-96f7-e53775034649" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss_518eb57d-2990-4eb9-b9d4-ff1f58a26301" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAdjustmentOfWarrants_ce6afaef-bbb4-4b74-84e8-b63b83df755a" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FairValueAdjustmentOfWarrants"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_89f8cf83-d033-4ed5-96f7-e53775034649" xlink:to="loc_us-gaap_FairValueAdjustmentOfWarrants_ce6afaef-bbb4-4b74-84e8-b63b83df755a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationAmortizationAndAccretionNet_6e885126-ae90-4321-a9fb-2431c02f27cb" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DepreciationAmortizationAndAccretionNet"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_89f8cf83-d033-4ed5-96f7-e53775034649" xlink:to="loc_us-gaap_DepreciationAmortizationAndAccretionNet_6e885126-ae90-4321-a9fb-2431c02f27cb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments_0d6fd62a-ee2b-4e9c-917f-c8835019bac8" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_89f8cf83-d033-4ed5-96f7-e53775034649" xlink:to="loc_us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments_0d6fd62a-ee2b-4e9c-917f-c8835019bac8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AmortizationOfFinancingCostsAndDiscounts_4bef4d13-07f4-4737-8ad3-648cf717c58c" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AmortizationOfFinancingCostsAndDiscounts"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_89f8cf83-d033-4ed5-96f7-e53775034649" xlink:to="loc_us-gaap_AmortizationOfFinancingCostsAndDiscounts_4bef4d13-07f4-4737-8ad3-648cf717c58c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxesAndTaxCredits_f4a651f9-52ca-420e-9984-b88965193156" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DeferredIncomeTaxesAndTaxCredits"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_89f8cf83-d033-4ed5-96f7-e53775034649" xlink:to="loc_us-gaap_DeferredIncomeTaxesAndTaxCredits_f4a651f9-52ca-420e-9984-b88965193156" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensation_a86610f0-7e85-4716-a349-ee60adb996e1" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_89f8cf83-d033-4ed5-96f7-e53775034649" xlink:to="loc_us-gaap_ShareBasedCompensation_a86610f0-7e85-4716-a349-ee60adb996e1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInPremiumsReceivable_930536f2-d858-49c3-8627-2abdb515bef5" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncreaseDecreaseInPremiumsReceivable"/>
    <link:calculationArc order="9" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_89f8cf83-d033-4ed5-96f7-e53775034649" xlink:to="loc_us-gaap_IncreaseDecreaseInPremiumsReceivable_930536f2-d858-49c3-8627-2abdb515bef5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable_258fecc8-e77c-4463-8782-4835732f8f8a" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable"/>
    <link:calculationArc order="10" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_89f8cf83-d033-4ed5-96f7-e53775034649" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable_258fecc8-e77c-4463-8782-4835732f8f8a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidExpense_4024bcdf-46de-49e7-8f96-af42a483c536" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncreaseDecreaseInPrepaidExpense"/>
    <link:calculationArc order="11" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_89f8cf83-d033-4ed5-96f7-e53775034649" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidExpense_4024bcdf-46de-49e7-8f96-af42a483c536" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInDeferredPolicyAcquisitionCosts_51ef9314-e9bc-4e6e-a190-d0e2b94a1ff1" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncreaseDecreaseInDeferredPolicyAcquisitionCosts"/>
    <link:calculationArc order="12" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_89f8cf83-d033-4ed5-96f7-e53775034649" xlink:to="loc_us-gaap_IncreaseDecreaseInDeferredPolicyAcquisitionCosts_51ef9314-e9bc-4e6e-a190-d0e2b94a1ff1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_4994a819-e698-48fd-ab98-62376085d2ff" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets"/>
    <link:calculationArc order="13" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_89f8cf83-d033-4ed5-96f7-e53775034649" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_4994a819-e698-48fd-ab98-62376085d2ff" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInUnearnedPremiums_77c465be-0137-4b5f-80c1-f83140433fdc" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_89f8cf83-d033-4ed5-96f7-e53775034649" xlink:to="loc_us-gaap_IncreaseDecreaseInUnearnedPremiums_77c465be-0137-4b5f-80c1-f83140433fdc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInLiabilityForClaimsAndClaimsAdjustmentExpenseReserve_59df8b5a-33a8-426a-a981-fcecdd0768cf" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncreaseDecreaseInLiabilityForClaimsAndClaimsAdjustmentExpenseReserve"/>
    <link:calculationArc order="15" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_89f8cf83-d033-4ed5-96f7-e53775034649" xlink:to="loc_us-gaap_IncreaseDecreaseInLiabilityForClaimsAndClaimsAdjustmentExpenseReserve_59df8b5a-33a8-426a-a981-fcecdd0768cf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_nmih_IncreaseDecreaseinReinsuranceAssetsandLiabilities_d7422f46-6b4d-434b-86da-186883d6cfb5" xlink:href="nmih-20200930.xsd#nmih_IncreaseDecreaseinReinsuranceAssetsandLiabilities"/>
    <link:calculationArc order="16" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_89f8cf83-d033-4ed5-96f7-e53775034649" xlink:to="loc_nmih_IncreaseDecreaseinReinsuranceAssetsandLiabilities_d7422f46-6b4d-434b-86da-186883d6cfb5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_2bc57b72-a70b-43d0-9e72-456cdfe4521f" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities"/>
    <link:calculationArc order="17" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_89f8cf83-d033-4ed5-96f7-e53775034649" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_2bc57b72-a70b-43d0-9e72-456cdfe4521f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInReinsuranceRecoverable_bb1eaeac-3372-44ad-baf4-f79bbf569c60" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncreaseDecreaseInReinsuranceRecoverable"/>
    <link:calculationArc order="18" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_89f8cf83-d033-4ed5-96f7-e53775034649" xlink:to="loc_us-gaap_IncreaseDecreaseInReinsuranceRecoverable_bb1eaeac-3372-44ad-baf4-f79bbf569c60" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_e98da589-b94d-4874-a265-8263b8815b97" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_7e8d993e-8e2e-4f77-810f-9f4bcfecb58d" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_e98da589-b94d-4874-a265-8263b8815b97" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_7e8d993e-8e2e-4f77-810f-9f4bcfecb58d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_985ef548-ea60-4f0e-9b70-6c5826ba942f" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_e98da589-b94d-4874-a265-8263b8815b97" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_985ef548-ea60-4f0e-9b70-6c5826ba942f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1866b048-a882-4b9c-a2a1-57dee89eb43d" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_e98da589-b94d-4874-a265-8263b8815b97" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1866b048-a882-4b9c-a2a1-57dee89eb43d" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/OrganizationBasisofPresentationandSummaryofAccountingPrinciples" xlink:type="simple" xlink:href="nmih-20200930.xsd#OrganizationBasisofPresentationandSummaryofAccountingPrinciples"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/OrganizationBasisofPresentationandSummaryofAccountingPrinciples" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/OrganizationBasisofPresentationandSummaryofAccountingPrinciplesPolicies" xlink:type="simple" xlink:href="nmih-20200930.xsd#OrganizationBasisofPresentationandSummaryofAccountingPrinciplesPolicies"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/OrganizationBasisofPresentationandSummaryofAccountingPrinciplesPolicies" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/OrganizationBasisofPresentationandSummaryofAccountingPrinciplesNarrativeDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#OrganizationBasisofPresentationandSummaryofAccountingPrinciplesNarrativeDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/OrganizationBasisofPresentationandSummaryofAccountingPrinciplesNarrativeDetails" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/Investments" xlink:type="simple" xlink:href="nmih-20200930.xsd#Investments"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/Investments" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsTables" xlink:type="simple" xlink:href="nmih-20200930.xsd#InvestmentsTables"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsTables" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsFairValuesandGrossUnrealizedGainsandLossesDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#InvestmentsFairValuesandGrossUnrealizedGainsandLossesDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsFairValuesandGrossUnrealizedGainsandLossesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_eb6e35aa-bd4b-4491-a94a-ece695b49c4c" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_663d33f6-aabe-4652-87eb-64480a63d8a8" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_eb6e35aa-bd4b-4491-a94a-ece695b49c4c" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_663d33f6-aabe-4652-87eb-64480a63d8a8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_1e7b10a6-7374-4765-8b80-c33ea98a7efa" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_eb6e35aa-bd4b-4491-a94a-ece695b49c4c" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_1e7b10a6-7374-4765-8b80-c33ea98a7efa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_5a14121a-8018-445a-b029-334a9bee8249" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_AvailableForSaleDebtSecuritiesAmortizedCostBasis_eb6e35aa-bd4b-4491-a94a-ece695b49c4c" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_5a14121a-8018-445a-b029-334a9bee8249" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsCorporateDebtSecuritiesbyIndustryGroupDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#InvestmentsCorporateDebtSecuritiesbyIndustryGroupDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsCorporateDebtSecuritiesbyIndustryGroupDetails" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNarrativeDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#InvestmentsNarrativeDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsNarrativeDetails" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsScheduledMaturitiesDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#InvestmentsScheduledMaturitiesDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsScheduledMaturitiesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_4d9b9f72-7517-4d3b-a45b-13d422e52e67" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesNextRollingTwelveMonthsAmortizedCostBasis_cb8739f3-d095-465f-b33b-be2485145375" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesNextRollingTwelveMonthsAmortizedCostBasis"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_4d9b9f72-7517-4d3b-a45b-13d422e52e67" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesNextRollingTwelveMonthsAmortizedCostBasis_cb8739f3-d095-465f-b33b-be2485145375" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearSixThroughTenAmortizedCostBasis_fc13ccb6-48d7-47bd-8b8f-16821b62779d" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearSixThroughTenAmortizedCostBasis"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_4d9b9f72-7517-4d3b-a45b-13d422e52e67" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearSixThroughTenAmortizedCostBasis_fc13ccb6-48d7-47bd-8b8f-16821b62779d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost_3f512ec6-3039-490c-932d-79d1b9602cff" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_4d9b9f72-7517-4d3b-a45b-13d422e52e67" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost_3f512ec6-3039-490c-932d-79d1b9602cff" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearTwoThroughFiveAmortizedCostBasis_7113d771-17a9-4aac-b6fd-577a3a43ca7d" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearTwoThroughFiveAmortizedCostBasis"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_4d9b9f72-7517-4d3b-a45b-13d422e52e67" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearTwoThroughFiveAmortizedCostBasis_7113d771-17a9-4aac-b6fd-577a3a43ca7d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingAfterYearTenAmortizedCostBasis_ee84275e-0e3f-476a-9b97-225bb4321ab2" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingAfterYearTenAmortizedCostBasis"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_4d9b9f72-7517-4d3b-a45b-13d422e52e67" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingAfterYearTenAmortizedCostBasis_ee84275e-0e3f-476a-9b97-225bb4321ab2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_c8e8227b-0c86-4101-b1f3-58f8ab5d7a33" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearSixThroughTenFairValue_796f6aa6-8494-440d-b94c-3f01b95a3493" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearSixThroughTenFairValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_c8e8227b-0c86-4101-b1f3-58f8ab5d7a33" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearSixThroughTenFairValue_796f6aa6-8494-440d-b94c-3f01b95a3493" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesNextRollingTwelveMonthsFairValue_36a81534-b0ac-4853-80ae-f0f231b0b2ee" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesNextRollingTwelveMonthsFairValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_c8e8227b-0c86-4101-b1f3-58f8ab5d7a33" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesNextRollingTwelveMonthsFairValue_36a81534-b0ac-4853-80ae-f0f231b0b2ee" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearTwoThroughFiveFairValue_68a3b063-a560-4061-8cf8-ddd291b4addb" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearTwoThroughFiveFairValue"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_c8e8227b-0c86-4101-b1f3-58f8ab5d7a33" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearTwoThroughFiveFairValue_68a3b063-a560-4061-8cf8-ddd291b4addb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingAfterYearTenFairValue_981d43bd-cae8-4c9c-8a91-839141c71d98" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingAfterYearTenFairValue"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_c8e8227b-0c86-4101-b1f3-58f8ab5d7a33" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingAfterYearTenFairValue_981d43bd-cae8-4c9c-8a91-839141c71d98" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue_c85dc38d-1a79-45b0-900c-78067bfd902f" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_c8e8227b-0c86-4101-b1f3-58f8ab5d7a33" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue_c85dc38d-1a79-45b0-900c-78067bfd902f" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsAgingofUnrealizedLossesDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#InvestmentsAgingofUnrealizedLossesDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsAgingofUnrealizedLossesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionNumberOfPositions_d4bba9a8-86f1-4a3f-bcb5-b192b2c30cb6" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionNumberOfPositions"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsNumberOfPositions_aaec35f0-3c8d-48df-84f9-0dc1a00a78b8" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsNumberOfPositions"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionNumberOfPositions_d4bba9a8-86f1-4a3f-bcb5-b192b2c30cb6" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsNumberOfPositions_aaec35f0-3c8d-48df-84f9-0dc1a00a78b8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions_cd420f63-881a-4872-9d3e-e6555258d890" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionNumberOfPositions_d4bba9a8-86f1-4a3f-bcb5-b192b2c30cb6" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions_cd420f63-881a-4872-9d3e-e6555258d890" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition_1ca9088d-50e1-48a6-a04e-042156a07374" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_d61ad09c-989a-4ec0-bedf-51edf1511376" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_1ca9088d-50e1-48a6-a04e-042156a07374" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_d61ad09c-989a-4ec0-bedf-51edf1511376" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_df2e6e8a-7acd-4a84-9883-228e8da82d84" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_1ca9088d-50e1-48a6-a04e-042156a07374" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_df2e6e8a-7acd-4a84-9883-228e8da82d84" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss_7a732e38-299b-40e3-bf52-246d46908930" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_42936c67-3efd-427f-ae1e-ad60824b869f" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_7a732e38-299b-40e3-bf52-246d46908930" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_42936c67-3efd-427f-ae1e-ad60824b869f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_32c5d4df-9162-4f39-883c-9a000699db10" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_7a732e38-299b-40e3-bf52-246d46908930" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_32c5d4df-9162-4f39-883c-9a000699db10" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNetInvestmentIncomeDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#InvestmentsNetInvestmentIncomeDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsNetInvestmentIncomeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeNet_d869914e-7e68-4485-a528-f566c1560d33" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_InvestmentIncomeNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeInterestAndDividend_887a3dbf-b4d7-4f0d-975a-285142fc2663" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_InvestmentIncomeInterestAndDividend"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InvestmentIncomeNet_d869914e-7e68-4485-a528-f566c1560d33" xlink:to="loc_us-gaap_InvestmentIncomeInterestAndDividend_887a3dbf-b4d7-4f0d-975a-285142fc2663" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeInvestmentExpense_2b14a9dc-126c-410e-a61a-e017177e32b7" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_InvestmentIncomeInvestmentExpense"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InvestmentIncomeNet_d869914e-7e68-4485-a528-f566c1560d33" xlink:to="loc_us-gaap_InvestmentIncomeInvestmentExpense_2b14a9dc-126c-410e-a61a-e017177e32b7" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNetRealizedInvestmentGainsLossesDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#InvestmentsNetRealizedInvestmentGainsLossesDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsNetRealizedInvestmentGainsLossesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss_571899e0-c2f3-4803-8a6b-5f96614ed575" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGain_7972e546-4332-4936-b7e2-d4c0b1e2658d" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleRealizedGain"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss_571899e0-c2f3-4803-8a6b-5f96614ed575" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGain_7972e546-4332-4936-b7e2-d4c0b1e2658d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedLoss_36b5995b-65ef-4d35-b649-985df5d5307f" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleRealizedLoss"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss_571899e0-c2f3-4803-8a6b-5f96614ed575" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedLoss_36b5995b-65ef-4d35-b649-985df5d5307f" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/FairValueofFinancialInstruments" xlink:type="simple" xlink:href="nmih-20200930.xsd#FairValueofFinancialInstruments"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/FairValueofFinancialInstruments" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/FairValueofFinancialInstrumentsTables" xlink:type="simple" xlink:href="nmih-20200930.xsd#FairValueofFinancialInstrumentsTables"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/FairValueofFinancialInstrumentsTables" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/FairValueofFinancialInstrumentsAssetsandLiabilitiesatFairValueDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#FairValueofFinancialInstrumentsAssetsandLiabilitiesatFairValueDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/FairValueofFinancialInstrumentsAssetsandLiabilitiesatFairValueDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsFairValueDisclosure_8d61a903-de95-4769-8881-8b7a9811565b" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AssetsFairValueDisclosure"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_0f9565a7-21ab-465c-886b-b4cd1845c17a" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsFairValueDisclosure_8d61a903-de95-4769-8881-8b7a9811565b" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_0f9565a7-21ab-465c-886b-b4cd1845c17a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsFairValueDisclosure_86ea75a4-4e48-49eb-aab1-b50d92f28681" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_CashAndCashEquivalentsFairValueDisclosure"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsFairValueDisclosure_8d61a903-de95-4769-8881-8b7a9811565b" xlink:to="loc_us-gaap_CashAndCashEquivalentsFairValueDisclosure_86ea75a4-4e48-49eb-aab1-b50d92f28681" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesFairValueDisclosure_f51cc6c8-e5e1-4bfd-b774-66c8ff71c6b9" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LiabilitiesFairValueDisclosure"/>
    <link:loc xlink:type="locator" xlink:label="loc_nmih_WarrantLiability_2c9addb8-3b1a-48d1-8088-11303bb7de70" xlink:href="nmih-20200930.xsd#nmih_WarrantLiability"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesFairValueDisclosure_f51cc6c8-e5e1-4bfd-b774-66c8ff71c6b9" xlink:to="loc_nmih_WarrantLiability_2c9addb8-3b1a-48d1-8088-11303bb7de70" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/FairValueofFinancialInstrumentsRollforwardofLevel3LiabilitiesDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#FairValueofFinancialInstrumentsRollforwardofLevel3LiabilitiesDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/FairValueofFinancialInstrumentsRollforwardofLevel3LiabilitiesDetails" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/FairValueofFinancialInstrumentsValuationAssumptionsforWarrantLiabilitiesDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#FairValueofFinancialInstrumentsValuationAssumptionsforWarrantLiabilitiesDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/FairValueofFinancialInstrumentsValuationAssumptionsforWarrantLiabilitiesDetails" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/FairValueofFinancialInstrumentsNarrativeDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#FairValueofFinancialInstrumentsNarrativeDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/FairValueofFinancialInstrumentsNarrativeDetails" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/Debt" xlink:type="simple" xlink:href="nmih-20200930.xsd#Debt"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/Debt" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/DebtNarrativeDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#DebtNarrativeDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/DebtNarrativeDetails" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/Reinsurance" xlink:type="simple" xlink:href="nmih-20200930.xsd#Reinsurance"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/Reinsurance" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReinsuranceTables" xlink:type="simple" xlink:href="nmih-20200930.xsd#ReinsuranceTables"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ReinsuranceTables" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReinsuranceEffectofReinsuranceAgreementsonPremiumsWrittenandEarnedDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#ReinsuranceEffectofReinsuranceAgreementsonPremiumsWrittenandEarnedDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ReinsuranceEffectofReinsuranceAgreementsonPremiumsWrittenandEarnedDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PremiumsWrittenNet_724edf2c-1772-4e61-8129-db0031e456cf" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_PremiumsWrittenNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DirectPremiumsWritten_33078739-be30-4a92-8d8f-641f65e6ae63" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_724edf2c-1772-4e61-8129-db0031e456cf" xlink:to="loc_us-gaap_DirectPremiumsWritten_33078739-be30-4a92-8d8f-641f65e6ae63" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CededPremiumsWritten_07fba63e-2453-4193-becf-a6c814a521af" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_CededPremiumsWritten"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PremiumsWrittenNet_724edf2c-1772-4e61-8129-db0031e456cf" xlink:to="loc_us-gaap_CededPremiumsWritten_07fba63e-2453-4193-becf-a6c814a521af" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PremiumsEarnedNet_73f1300b-7e4e-4351-9e76-417a6133fcdf" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_PremiumsEarnedNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DirectPremiumsEarned_2e96f266-50b1-41c3-b925-d0e22c66f3fa" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_73f1300b-7e4e-4351-9e76-417a6133fcdf" xlink:to="loc_us-gaap_DirectPremiumsEarned_2e96f266-50b1-41c3-b925-d0e22c66f3fa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CededPremiumsEarned_8656141f-0c13-421f-bf05-482282ecf7e7" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_CededPremiumsEarned"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PremiumsEarnedNet_73f1300b-7e4e-4351-9e76-417a6133fcdf" xlink:to="loc_us-gaap_CededPremiumsEarned_8656141f-0c13-421f-bf05-482282ecf7e7" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReinsuranceNarrativeDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#ReinsuranceNarrativeDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ReinsuranceNarrativeDetails" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReinsuranceILNTransactionsDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#ReinsuranceILNTransactionsDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ReinsuranceILNTransactionsDetails" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReinsuranceAmountsRelatedtoQSRTransactionsDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#ReinsuranceAmountsRelatedtoQSRTransactionsDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ReinsuranceAmountsRelatedtoQSRTransactionsDetails" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReservesforInsuranceClaimsandClaimExpenses" xlink:type="simple" xlink:href="nmih-20200930.xsd#ReservesforInsuranceClaimsandClaimExpenses"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ReservesforInsuranceClaimsandClaimExpenses" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReservesforInsuranceClaimsandClaimExpensesTables" xlink:type="simple" xlink:href="nmih-20200930.xsd#ReservesforInsuranceClaimsandClaimExpensesTables"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ReservesforInsuranceClaimsandClaimExpensesTables" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReservesforInsuranceClaimsandClaimExpensesNarrativeDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#ReservesforInsuranceClaimsandClaimExpensesNarrativeDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ReservesforInsuranceClaimsandClaimExpensesNarrativeDetails" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReservesforInsuranceClaimsandClaimExpensesReconciliationofReserveBalancesforInsuranceClaimsandClaimExpenseDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#ReservesforInsuranceClaimsandClaimExpensesReconciliationofReserveBalancesforInsuranceClaimsandClaimExpenseDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ReservesforInsuranceClaimsandClaimExpensesReconciliationofReserveBalancesforInsuranceClaimsandClaimExpenseDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseNet_69a50fbb-f670-4f81-8e55-1d0bb06e843d" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_eae5ea5a-df38-4601-ad77-bbb7e47e7315" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseNet_69a50fbb-f670-4f81-8e55-1d0bb06e843d" xlink:to="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_eae5ea5a-df38-4601-ad77-bbb7e47e7315" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReinsuranceRecoverablesOnPaidAndUnpaidLosses_7964ae6f-a7c2-4bea-9e5f-c03f2677554c" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ReinsuranceRecoverablesOnPaidAndUnpaidLosses"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseNet_69a50fbb-f670-4f81-8e55-1d0bb06e843d" xlink:to="loc_us-gaap_ReinsuranceRecoverablesOnPaidAndUnpaidLosses_7964ae6f-a7c2-4bea-9e5f-c03f2677554c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaims1_aa850c12-9a50-4e94-b424-50a17a0fc3c9" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaims1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersCurrentYearClaimsAndClaimsAdjustmentExpense_cf17ae62-886d-4b30-bc51-f54ffc77aded" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_aa850c12-9a50-4e94-b424-50a17a0fc3c9" xlink:to="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersCurrentYearClaimsAndClaimsAdjustmentExpense_cf17ae62-886d-4b30-bc51-f54ffc77aded" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense_b022e748-f1b1-4acb-9c0a-2ab12109fdf2" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_aa850c12-9a50-4e94-b424-50a17a0fc3c9" xlink:to="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense_b022e748-f1b1-4acb-9c0a-2ab12109fdf2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForLossesAndLossAdjustmentExpense_5112128e-1ea6-44f8-9dd0-e7c923bfcd0c" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_PaymentsForLossesAndLossAdjustmentExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidCurrentYear1_3adf6f91-d740-451c-8a18-30d2c3f5ca37" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_5112128e-1ea6-44f8-9dd0-e7c923bfcd0c" xlink:to="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidCurrentYear1_3adf6f91-d740-451c-8a18-30d2c3f5ca37" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidPriorYears1_bdc5168e-d46d-4344-bf39-7c46130482c3" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_5112128e-1ea6-44f8-9dd0-e7c923bfcd0c" xlink:to="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidPriorYears1_bdc5168e-d46d-4344-bf39-7c46130482c3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_nmih_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidReinsuranceTerminations_30b4e54f-d30c-4973-b53a-39338f6155de" xlink:href="nmih-20200930.xsd#nmih_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidReinsuranceTerminations"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PaymentsForLossesAndLossAdjustmentExpense_5112128e-1ea6-44f8-9dd0-e7c923bfcd0c" xlink:to="loc_nmih_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidReinsuranceTerminations_30b4e54f-d30c-4973-b53a-39338f6155de" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/EarningsperShareEPS" xlink:type="simple" xlink:href="nmih-20200930.xsd#EarningsperShareEPS"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/EarningsperShareEPS" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/EarningsperShareEPSTables" xlink:type="simple" xlink:href="nmih-20200930.xsd#EarningsperShareEPSTables"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/EarningsperShareEPSTables" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/EarningsperShareEPSDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#EarningsperShareEPSDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/EarningsperShareEPSDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_35ed7c3e-8851-4fed-aae8-9c4f27975f44" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_4a3d7400-c9a7-4c05-9206-cd06f26c3e4d" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_35ed7c3e-8851-4fed-aae8-9c4f27975f44" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_4a3d7400-c9a7-4c05-9206-cd06f26c3e4d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment_b48d4414-5508-4e2f-b9d5-709a44ead216" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_35ed7c3e-8851-4fed-aae8-9c4f27975f44" xlink:to="loc_us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment_b48d4414-5508-4e2f-b9d5-709a44ead216" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLossAttributableToParentDiluted_62aefc8c-cdf7-4754-abd0-54b9839241c7" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_NetIncomeLossAttributableToParentDiluted"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_6c8a06fd-0714-468a-8037-4cd9416d8efa" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.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_NetIncomeLossAttributableToParentDiluted_62aefc8c-cdf7-4754-abd0-54b9839241c7" xlink:to="loc_us-gaap_NetIncomeLoss_6c8a06fd-0714-468a-8037-4cd9416d8efa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_nmih_GainFromChangeInFairValueOfWarrantLiability_c6317a79-6918-49f6-b93c-0215844f954e" xlink:href="nmih-20200930.xsd#nmih_GainFromChangeInFairValueOfWarrantLiability"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLossAttributableToParentDiluted_62aefc8c-cdf7-4754-abd0-54b9839241c7" xlink:to="loc_nmih_GainFromChangeInFairValueOfWarrantLiability_c6317a79-6918-49f6-b93c-0215844f954e" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/Warrants" xlink:type="simple" xlink:href="nmih-20200930.xsd#Warrants"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/Warrants" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/WarrantsDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#WarrantsDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/WarrantsDetails" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxes" xlink:type="simple" xlink:href="nmih-20200930.xsd#IncomeTaxes"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/IncomeTaxes" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxesDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#IncomeTaxesDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/IncomeTaxesDetails" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/CommonStock" xlink:type="simple" xlink:href="nmih-20200930.xsd#CommonStock"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CommonStock" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/CommonStockDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#CommonStockDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CommonStockDetails" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/RegulatoryInformation" xlink:type="simple" xlink:href="nmih-20200930.xsd#RegulatoryInformation"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/RegulatoryInformation" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/RegulatoryInformationTables" xlink:type="simple" xlink:href="nmih-20200930.xsd#RegulatoryInformationTables"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/RegulatoryInformationTables" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/RegulatoryInformationStatutoryNetIncomeLossDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#RegulatoryInformationStatutoryNetIncomeLossDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/RegulatoryInformationStatutoryNetIncomeLossDetails" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/RegulatoryInformationScheduleofStatutorySurplusContingencyReserveandRTCRatioDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#RegulatoryInformationScheduleofStatutorySurplusContingencyReserveandRTCRatioDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/RegulatoryInformationScheduleofStatutorySurplusContingencyReserveandRTCRatioDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_nmih_StatutoryAccountingPracticesStatutoryCapitalAndSurplusIncludingContingencyReserve_c167162f-8315-41d6-996e-ac13203ab7d7" xlink:href="nmih-20200930.xsd#nmih_StatutoryAccountingPracticesStatutoryCapitalAndSurplusIncludingContingencyReserve"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatutoryAccountingPracticesStatutoryCapitalAndSurplusBalance_9d99360d-5aa3-41e5-85d6-1434d839b3ad" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatutoryAccountingPracticesStatutoryCapitalAndSurplusBalance"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_nmih_StatutoryAccountingPracticesStatutoryCapitalAndSurplusIncludingContingencyReserve_c167162f-8315-41d6-996e-ac13203ab7d7" xlink:to="loc_us-gaap_StatutoryAccountingPracticesStatutoryCapitalAndSurplusBalance_9d99360d-5aa3-41e5-85d6-1434d839b3ad" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_nmih_StatutoryAccountingPracticesContingencyReserve_2629d7b3-aeb4-483c-a936-323223da59ab" xlink:href="nmih-20200930.xsd#nmih_StatutoryAccountingPracticesContingencyReserve"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_nmih_StatutoryAccountingPracticesStatutoryCapitalAndSurplusIncludingContingencyReserve_c167162f-8315-41d6-996e-ac13203ab7d7" xlink:to="loc_nmih_StatutoryAccountingPracticesContingencyReserve_2629d7b3-aeb4-483c-a936-323223da59ab" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/RegulatoryInformationNarrativeDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#RegulatoryInformationNarrativeDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/RegulatoryInformationNarrativeDetails" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/SubsequentEvent" xlink:type="simple" xlink:href="nmih-20200930.xsd#SubsequentEvent"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/SubsequentEvent" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/SubsequentEventDetails" xlink:type="simple" xlink:href="nmih-20200930.xsd#SubsequentEventDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/SubsequentEventDetails" xlink:type="extended"/>
</link:linkbase>
