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

<!--XBRL Document Created with Wdesk from Workiva-->
<!--Copyright 2020 Workiva-->
<!--r:d8237901-0605-4e0f-8b05-8332ff9b43ae,g:a731aaec-fd53-453b-a5b0-b33e4a19f3c7-->
<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-20200630.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-20200630.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_Liabilities_6979d620-e108-4078-adbc-36af30acde18" 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_b9bd65a6-c70c-480a-a67b-cdaf11a1a790" 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_6979d620-e108-4078-adbc-36af30acde18" xlink:to="loc_us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent_b9bd65a6-c70c-480a-a67b-cdaf11a1a790" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SecuredDebt_76daa0f9-eae8-4802-8b37-727788ec70d8" 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_6979d620-e108-4078-adbc-36af30acde18" xlink:to="loc_us-gaap_SecuredDebt_76daa0f9-eae8-4802-8b37-727788ec70d8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilities_fd2b2876-39e9-4188-95d7-54224de7285d" 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_6979d620-e108-4078-adbc-36af30acde18" xlink:to="loc_us-gaap_OtherLiabilities_fd2b2876-39e9-4188-95d7-54224de7285d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UnearnedPremiums_94a9046b-8764-462d-9985-fe998e3e21b4" 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_6979d620-e108-4078-adbc-36af30acde18" xlink:to="loc_us-gaap_UnearnedPremiums_94a9046b-8764-462d-9985-fe998e3e21b4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WarrantsAndRightsOutstanding_56f0269b-f1c1-4b8d-a2dc-f3e5939f4d4e" 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_6979d620-e108-4078-adbc-36af30acde18" xlink:to="loc_us-gaap_WarrantsAndRightsOutstanding_56f0269b-f1c1-4b8d-a2dc-f3e5939f4d4e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_2aaa1d24-ff2b-4d39-82b0-5c27e4fdff44" 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_6979d620-e108-4078-adbc-36af30acde18" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_2aaa1d24-ff2b-4d39-82b0-5c27e4fdff44" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_8d668699-4355-4421-b465-7d097b9e42f9" 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_6979d620-e108-4078-adbc-36af30acde18" xlink:to="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_8d668699-4355-4421-b465-7d097b9e42f9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FundsHeldUnderReinsuranceAgreementsLiability_6ff9ec2b-cef0-4553-84b5-42f024aded76" 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_6979d620-e108-4078-adbc-36af30acde18" xlink:to="loc_us-gaap_FundsHeldUnderReinsuranceAgreementsLiability_6ff9ec2b-cef0-4553-84b5-42f024aded76" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_f797e811-6440-48ad-bd3d-30da3bedc6b2" 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_b0aaf390-e0e2-4eab-bcac-c8ec5d5e77e8" 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_f797e811-6440-48ad-bd3d-30da3bedc6b2" xlink:to="loc_us-gaap_CommonStockValueOutstanding_b0aaf390-e0e2-4eab-bcac-c8ec5d5e77e8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapital_89153a6f-eda3-4b4a-9209-1fa2b2cb39a2" 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_f797e811-6440-48ad-bd3d-30da3bedc6b2" xlink:to="loc_us-gaap_AdditionalPaidInCapital_89153a6f-eda3-4b4a-9209-1fa2b2cb39a2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_ef37c378-3b2f-4422-828b-e64375ca227c" 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_f797e811-6440-48ad-bd3d-30da3bedc6b2" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_ef37c378-3b2f-4422-828b-e64375ca227c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_7c0e1a34-d29f-4231-9004-3f77fbcf2a8a" 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_f797e811-6440-48ad-bd3d-30da3bedc6b2" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_7c0e1a34-d29f-4231-9004-3f77fbcf2a8a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_6a539dbd-1fe9-46d4-b369-3ae96515a339" 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_9f619842-92e3-4680-bc4e-deca5608721e" 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_6a539dbd-1fe9-46d4-b369-3ae96515a339" xlink:to="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_9f619842-92e3-4680-bc4e-deca5608721e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_7fae8afd-1b4c-4ffb-a7d8-ecbd3610e6e1" 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_6a539dbd-1fe9-46d4-b369-3ae96515a339" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_7fae8afd-1b4c-4ffb-a7d8-ecbd3610e6e1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssets_11dda533-9976-4d60-ac95-cf92dad48299" 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_6a539dbd-1fe9-46d4-b369-3ae96515a339" xlink:to="loc_us-gaap_OtherAssets_11dda533-9976-4d60-ac95-cf92dad48299" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_66e03da2-202d-4cee-8a86-fea5e486edeb" 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_6a539dbd-1fe9-46d4-b369-3ae96515a339" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_66e03da2-202d-4cee-8a86-fea5e486edeb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_ab89474c-3365-4f18-88a1-e7ab59f1b223" 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_6a539dbd-1fe9-46d4-b369-3ae96515a339" xlink:to="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_ab89474c-3365-4f18-88a1-e7ab59f1b223" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredPolicyAcquisitionCosts_2d1949f1-6b7b-4d65-8b08-121e6f6fdafd" 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_6a539dbd-1fe9-46d4-b369-3ae96515a339" xlink:to="loc_us-gaap_DeferredPolicyAcquisitionCosts_2d1949f1-6b7b-4d65-8b08-121e6f6fdafd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PremiumsReceivableAtCarryingValue_1a34cbae-05fb-4392-8186-9f8277c0a098" 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_6a539dbd-1fe9-46d4-b369-3ae96515a339" xlink:to="loc_us-gaap_PremiumsReceivableAtCarryingValue_1a34cbae-05fb-4392-8186-9f8277c0a098" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetIncludingGoodwill_718b7804-e72e-4109-9601-1606563b8bcc" 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_6a539dbd-1fe9-46d4-b369-3ae96515a339" xlink:to="loc_us-gaap_IntangibleAssetsNetIncludingGoodwill_718b7804-e72e-4109-9601-1606563b8bcc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidReinsurancePremiums_7342356f-e918-4420-a079-c417e0db96d5" 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_6a539dbd-1fe9-46d4-b369-3ae96515a339" xlink:to="loc_us-gaap_PrepaidReinsurancePremiums_7342356f-e918-4420-a079-c417e0db96d5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReinsuranceRecoverablesGross_ab254df8-b365-4abd-9bbd-63f66a4156b3" 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_6a539dbd-1fe9-46d4-b369-3ae96515a339" xlink:to="loc_us-gaap_ReinsuranceRecoverablesGross_ab254df8-b365-4abd-9bbd-63f66a4156b3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedInvestmentIncomeReceivable_80dd1ec9-bb1b-48eb-a8cf-adf8f6631fc3" 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_6a539dbd-1fe9-46d4-b369-3ae96515a339" xlink:to="loc_us-gaap_AccruedInvestmentIncomeReceivable_80dd1ec9-bb1b-48eb-a8cf-adf8f6631fc3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_e6ae1a32-042f-4118-830c-7eafe7086bde" 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_21f8e04f-69bc-436a-b45b-d1e1f8c10059" 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_e6ae1a32-042f-4118-830c-7eafe7086bde" xlink:to="loc_us-gaap_CommitmentsAndContingencies_21f8e04f-69bc-436a-b45b-d1e1f8c10059" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_a2f1db3e-fca0-425c-865a-a0fbab35b123" 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_e6ae1a32-042f-4118-830c-7eafe7086bde" xlink:to="loc_us-gaap_Liabilities_a2f1db3e-fca0-425c-865a-a0fbab35b123" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_c473c4cb-fdcf-4f09-979e-af3fe048a6ab" 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_e6ae1a32-042f-4118-830c-7eafe7086bde" xlink:to="loc_us-gaap_StockholdersEquity_c473c4cb-fdcf-4f09-979e-af3fe048a6ab" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/CONDENSEDCONSOLIDATEDBALANCESHEETSUNAUDITEDParenthetical" xlink:type="simple" xlink:href="nmih-20200630.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-20200630.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_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_759d5d7e-5167-4149-9f0c-1008c4504f7f" 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_0ef02985-9e12-40d1-bde8-bb97de1c0681" 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_759d5d7e-5167-4149-9f0c-1008c4504f7f" xlink:to="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax_0ef02985-9e12-40d1-bde8-bb97de1c0681" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax_cd1dbd10-9606-4923-a38c-a35cb271f9df" 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_759d5d7e-5167-4149-9f0c-1008c4504f7f" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax_cd1dbd10-9606-4923-a38c-a35cb271f9df" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_4885090e-34dc-440f-9be3-d74d2bad5f19" 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_3ed55691-ad35-40fa-b32f-86055dd87a51" 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_4885090e-34dc-440f-9be3-d74d2bad5f19" xlink:to="loc_us-gaap_Revenues_3ed55691-ad35-40fa-b32f-86055dd87a51" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostsAndExpenses_7d0db64d-5861-4c9a-95de-40b22b2b901d" 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_4885090e-34dc-440f-9be3-d74d2bad5f19" xlink:to="loc_us-gaap_CostsAndExpenses_7d0db64d-5861-4c9a-95de-40b22b2b901d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostsAndExpenses_92588583-5103-4743-9349-33b3de6e507f" 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_ef7eed67-a18c-4588-85f0-71e5a6b65c2d" 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_92588583-5103-4743-9349-33b3de6e507f" xlink:to="loc_us-gaap_IncurredClaimsPropertyCasualtyAndLiability_ef7eed67-a18c-4588-85f0-71e5a6b65c2d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherCostAndExpenseOperating_194dcb04-33b6-40c4-9b40-f0747f969a75" 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_92588583-5103-4743-9349-33b3de6e507f" xlink:to="loc_us-gaap_OtherCostAndExpenseOperating_194dcb04-33b6-40c4-9b40-f0747f969a75" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingExpense_8bba19aa-b0b8-4c4a-a49b-19386f9fdf33" 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_92588583-5103-4743-9349-33b3de6e507f" xlink:to="loc_us-gaap_OtherNonoperatingExpense_8bba19aa-b0b8-4c4a-a49b-19386f9fdf33" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpense_3331d756-79a2-4ff9-9cab-89efa5c9275c" 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_92588583-5103-4743-9349-33b3de6e507f" xlink:to="loc_us-gaap_InterestExpense_3331d756-79a2-4ff9-9cab-89efa5c9275c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_nmih_GainLossonChangeinFairValueofWarrantLiability_0a73363f-da7a-4ea1-b376-a6995b64bd54" xlink:href="nmih-20200630.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_92588583-5103-4743-9349-33b3de6e507f" xlink:to="loc_nmih_GainLossonChangeinFairValueofWarrantLiability_0a73363f-da7a-4ea1-b376-a6995b64bd54" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Revenues_b045625c-2112-455e-9265-22de84e0f085" 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_32283667-aa2a-4f8d-9ec2-3392873944f9" 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_b045625c-2112-455e-9265-22de84e0f085" xlink:to="loc_us-gaap_PremiumsEarnedNet_32283667-aa2a-4f8d-9ec2-3392873944f9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetInvestmentIncome_dd493169-4da4-46f6-a4dd-358e93f6807f" 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_b045625c-2112-455e-9265-22de84e0f085" xlink:to="loc_us-gaap_NetInvestmentIncome_dd493169-4da4-46f6-a4dd-358e93f6807f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnInvestments_2371a4db-eafc-4184-9440-aed2508f1b40" 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_b045625c-2112-455e-9265-22de84e0f085" xlink:to="loc_us-gaap_GainLossOnInvestments_2371a4db-eafc-4184-9440-aed2508f1b40" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherIncome_30d2951c-785a-41ad-b852-9dc1a673a27b" 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_b045625c-2112-455e-9265-22de84e0f085" xlink:to="loc_us-gaap_OtherIncome_30d2951c-785a-41ad-b852-9dc1a673a27b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_5a537ca0-dfc8-458b-8cd7-d27a6fd1002d" 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_72d3b643-7ea4-42bb-b63e-a8695a21d096" 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_5a537ca0-dfc8-458b-8cd7-d27a6fd1002d" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_72d3b643-7ea4-42bb-b63e-a8695a21d096" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_1fc0337f-0a1c-4298-afde-5030e7ca8533" 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_5a537ca0-dfc8-458b-8cd7-d27a6fd1002d" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_1fc0337f-0a1c-4298-afde-5030e7ca8533" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_78007b6e-12e3-4e21-ac4b-7410f88f9cb7" 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_484ab02b-a6ca-47b5-9512-0c5cc3fc193a" 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_78007b6e-12e3-4e21-ac4b-7410f88f9cb7" xlink:to="loc_us-gaap_NetIncomeLoss_484ab02b-a6ca-47b5-9512-0c5cc3fc193a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_3c3e9ccb-9f5c-410c-a0f3-26d6b0b52df0" 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_78007b6e-12e3-4e21-ac4b-7410f88f9cb7" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_3c3e9ccb-9f5c-410c-a0f3-26d6b0b52df0" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSANDCOMPREHENSIVEINCOMEUNAUDITEDParenthetical" xlink:type="simple" xlink:href="nmih-20200630.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-20200630.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-20200630.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-20200630.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_NetCashProvidedByUsedInFinancingActivities_f2f9258c-8908-4712-8f9a-63e1bb5c00a1" 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_fd5066ee-ad24-4c52-9893-c38a3fbbe7a3" 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_f2f9258c-8908-4712-8f9a-63e1bb5c00a1" xlink:to="loc_us-gaap_RepaymentsOfSecuredDebt_fd5066ee-ad24-4c52-9893-c38a3fbbe7a3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsOfDebtIssuanceCosts_cc36db3a-7f9d-418a-9d9a-25bd792739f1" 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_f2f9258c-8908-4712-8f9a-63e1bb5c00a1" xlink:to="loc_us-gaap_PaymentsOfDebtIssuanceCosts_cc36db3a-7f9d-418a-9d9a-25bd792739f1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlansIncludingStockOptions_beeb76fd-b437-4770-88f9-7e7822f50c3f" 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_f2f9258c-8908-4712-8f9a-63e1bb5c00a1" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlansIncludingStockOptions_beeb76fd-b437-4770-88f9-7e7822f50c3f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfSeniorLongTermDebt_289a172c-a98a-45cf-b550-bbf29e3b575c" 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_f2f9258c-8908-4712-8f9a-63e1bb5c00a1" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfSeniorLongTermDebt_289a172c-a98a-45cf-b550-bbf29e3b575c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_32870c2b-4fdc-403d-b5cc-3efe18d5ab78" 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_f2f9258c-8908-4712-8f9a-63e1bb5c00a1" xlink:to="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_32870c2b-4fdc-403d-b5cc-3efe18d5ab78" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_25396575-78c5-4658-a834-041c60899e5c" 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_f2f9258c-8908-4712-8f9a-63e1bb5c00a1" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_25396575-78c5-4658-a834-041c60899e5c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_3998d427-58a0-424b-8c43-88e40de8be3e" 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_45880dd4-b613-4c00-977f-c05308f6f24b" 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_3998d427-58a0-424b-8c43-88e40de8be3e" xlink:to="loc_us-gaap_NetIncomeLoss_45880dd4-b613-4c00-977f-c05308f6f24b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss_5b51ecc4-92b0-44eb-a048-4cd0c97c595c" 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_3998d427-58a0-424b-8c43-88e40de8be3e" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss_5b51ecc4-92b0-44eb-a048-4cd0c97c595c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAdjustmentOfWarrants_b1c9ea30-c583-4a19-b3b9-5c5846e52d57" 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_3998d427-58a0-424b-8c43-88e40de8be3e" xlink:to="loc_us-gaap_FairValueAdjustmentOfWarrants_b1c9ea30-c583-4a19-b3b9-5c5846e52d57" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationAmortizationAndAccretionNet_16168e45-2b9f-4301-841d-e8c2993efd7b" 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_3998d427-58a0-424b-8c43-88e40de8be3e" xlink:to="loc_us-gaap_DepreciationAmortizationAndAccretionNet_16168e45-2b9f-4301-841d-e8c2993efd7b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments_8f154906-36b3-4be4-bfc2-39231fae3f2d" 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_3998d427-58a0-424b-8c43-88e40de8be3e" xlink:to="loc_us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments_8f154906-36b3-4be4-bfc2-39231fae3f2d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AmortizationOfFinancingCostsAndDiscounts_53ec129a-8a55-4a9a-aca5-901e35ed4f2e" 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_3998d427-58a0-424b-8c43-88e40de8be3e" xlink:to="loc_us-gaap_AmortizationOfFinancingCostsAndDiscounts_53ec129a-8a55-4a9a-aca5-901e35ed4f2e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxesAndTaxCredits_5f73ea80-d4b1-4440-93b1-e8b37822a16f" 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_3998d427-58a0-424b-8c43-88e40de8be3e" xlink:to="loc_us-gaap_DeferredIncomeTaxesAndTaxCredits_5f73ea80-d4b1-4440-93b1-e8b37822a16f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensation_40beb0aa-119a-4156-973c-828e193eab64" 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_3998d427-58a0-424b-8c43-88e40de8be3e" xlink:to="loc_us-gaap_ShareBasedCompensation_40beb0aa-119a-4156-973c-828e193eab64" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInPremiumsReceivable_c08742cf-f62c-4853-9428-681767628437" 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_3998d427-58a0-424b-8c43-88e40de8be3e" xlink:to="loc_us-gaap_IncreaseDecreaseInPremiumsReceivable_c08742cf-f62c-4853-9428-681767628437" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable_5320774d-e5b6-40a5-9ec6-f0e60b33dfd6" 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_3998d427-58a0-424b-8c43-88e40de8be3e" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable_5320774d-e5b6-40a5-9ec6-f0e60b33dfd6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidExpense_05657478-48a2-49e1-8743-5f271cfc6179" 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_3998d427-58a0-424b-8c43-88e40de8be3e" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidExpense_05657478-48a2-49e1-8743-5f271cfc6179" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInDeferredPolicyAcquisitionCosts_f8a0de72-b299-4ab1-8cfa-d111274b3bef" 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_3998d427-58a0-424b-8c43-88e40de8be3e" xlink:to="loc_us-gaap_IncreaseDecreaseInDeferredPolicyAcquisitionCosts_f8a0de72-b299-4ab1-8cfa-d111274b3bef" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_abf3048b-e082-4f3b-9a0a-44c6cd2d6272" 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_3998d427-58a0-424b-8c43-88e40de8be3e" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_abf3048b-e082-4f3b-9a0a-44c6cd2d6272" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInUnearnedPremiums_53dc5321-8de2-49cc-9b94-89b0a3b64f51" 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_3998d427-58a0-424b-8c43-88e40de8be3e" xlink:to="loc_us-gaap_IncreaseDecreaseInUnearnedPremiums_53dc5321-8de2-49cc-9b94-89b0a3b64f51" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInLiabilityForClaimsAndClaimsAdjustmentExpenseReserve_13a1ec20-4012-433d-99f0-0427763b025e" 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_3998d427-58a0-424b-8c43-88e40de8be3e" xlink:to="loc_us-gaap_IncreaseDecreaseInLiabilityForClaimsAndClaimsAdjustmentExpenseReserve_13a1ec20-4012-433d-99f0-0427763b025e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_nmih_IncreaseDecreaseinReinsuranceAssetsandLiabilities_bce2ae6a-34e1-44db-b949-eea69ac4e033" xlink:href="nmih-20200630.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_3998d427-58a0-424b-8c43-88e40de8be3e" xlink:to="loc_nmih_IncreaseDecreaseinReinsuranceAssetsandLiabilities_bce2ae6a-34e1-44db-b949-eea69ac4e033" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_5e605c6e-8872-4c6b-a10b-10b3cc78da51" 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_3998d427-58a0-424b-8c43-88e40de8be3e" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_5e605c6e-8872-4c6b-a10b-10b3cc78da51" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInReinsuranceRecoverable_0c6527ec-6711-4c33-bf40-71308d011087" 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_3998d427-58a0-424b-8c43-88e40de8be3e" xlink:to="loc_us-gaap_IncreaseDecreaseInReinsuranceRecoverable_0c6527ec-6711-4c33-bf40-71308d011087" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_58bd3fa3-bc15-4fa1-8ede-e746d2969f4f" 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_88697627-bda2-4ddd-8812-b90d4a24785f" 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_58bd3fa3-bc15-4fa1-8ede-e746d2969f4f" xlink:to="loc_us-gaap_PaymentsToAcquireShortTermInvestments_88697627-bda2-4ddd-8812-b90d4a24785f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt_20685aee-9223-4432-b53f-27bad5b63be5" 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_58bd3fa3-bc15-4fa1-8ede-e746d2969f4f" xlink:to="loc_us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt_20685aee-9223-4432-b53f-27bad5b63be5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleOfShortTermInvestments_a669f6a1-6ec2-4308-a1e2-6a930835a670" 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_58bd3fa3-bc15-4fa1-8ede-e746d2969f4f" xlink:to="loc_us-gaap_ProceedsFromSaleOfShortTermInvestments_a669f6a1-6ec2-4308-a1e2-6a930835a670" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleAndMaturityOfAvailableForSaleSecurities_51574954-3ed5-4d57-88f6-4ee42bff8539" 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_58bd3fa3-bc15-4fa1-8ede-e746d2969f4f" xlink:to="loc_us-gaap_ProceedsFromSaleAndMaturityOfAvailableForSaleSecurities_51574954-3ed5-4d57-88f6-4ee42bff8539" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_583f0568-82b1-4254-abca-cd4096ca4749" 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_58bd3fa3-bc15-4fa1-8ede-e746d2969f4f" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_583f0568-82b1-4254-abca-cd4096ca4749" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_700f2d98-5251-4155-9bd2-20fbd5b3b415" 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_f29997b1-3967-40b2-9eed-8c705dd07245" 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_700f2d98-5251-4155-9bd2-20fbd5b3b415" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_f29997b1-3967-40b2-9eed-8c705dd07245" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_9e603ecd-afcc-4a94-aed1-84d553e99ea1" 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_700f2d98-5251-4155-9bd2-20fbd5b3b415" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_9e603ecd-afcc-4a94-aed1-84d553e99ea1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_ba5bcac9-65fd-471b-9ae9-1c601d00262e" 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_700f2d98-5251-4155-9bd2-20fbd5b3b415" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_ba5bcac9-65fd-471b-9ae9-1c601d00262e" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/OrganizationBasisofPresentationandSummaryofAccountingPrinciples" xlink:type="simple" xlink:href="nmih-20200630.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-20200630.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-20200630.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-20200630.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-20200630.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-20200630.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_bd2ea745-8fac-41bd-80e2-0ee5ae03f387" 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_cadbe247-30cc-47ed-907c-0b5bfa3f2500" 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_bd2ea745-8fac-41bd-80e2-0ee5ae03f387" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_cadbe247-30cc-47ed-907c-0b5bfa3f2500" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_e0ad6a20-6f09-4e2d-b544-a3f00b818c34" 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_bd2ea745-8fac-41bd-80e2-0ee5ae03f387" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_e0ad6a20-6f09-4e2d-b544-a3f00b818c34" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_d8dc6897-dab1-4a74-85d0-1d52089404b7" 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_bd2ea745-8fac-41bd-80e2-0ee5ae03f387" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_d8dc6897-dab1-4a74-85d0-1d52089404b7" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsCorporateDebtSecuritiesbyIndustryGroupDetails" xlink:type="simple" xlink:href="nmih-20200630.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-20200630.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-20200630.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_AvailableForSaleSecuritiesDebtSecurities_435eec7d-42ed-44c5-a219-dd07683512ad" 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_5c23bf6d-cea4-48d3-9962-6738baaf7f35" 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_435eec7d-42ed-44c5-a219-dd07683512ad" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearSixThroughTenFairValue_5c23bf6d-cea4-48d3-9962-6738baaf7f35" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesNextRollingTwelveMonthsFairValue_75a34e7b-1302-4515-b5a8-18ed72056d63" 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_435eec7d-42ed-44c5-a219-dd07683512ad" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesNextRollingTwelveMonthsFairValue_75a34e7b-1302-4515-b5a8-18ed72056d63" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearTwoThroughFiveFairValue_f29b2c22-f48e-411e-b84c-f046b0d310bf" 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_435eec7d-42ed-44c5-a219-dd07683512ad" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearTwoThroughFiveFairValue_f29b2c22-f48e-411e-b84c-f046b0d310bf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingAfterYearTenFairValue_337699df-bd35-4d9b-9faf-d0a3ee15acc3" 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_435eec7d-42ed-44c5-a219-dd07683512ad" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingAfterYearTenFairValue_337699df-bd35-4d9b-9faf-d0a3ee15acc3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue_d2c01c7d-cf78-4788-94ef-4758f2987c67" 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_435eec7d-42ed-44c5-a219-dd07683512ad" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue_d2c01c7d-cf78-4788-94ef-4758f2987c67" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_bbd18d21-279f-4022-9f26-6d8145aa95fe" 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_81855b99-1dd3-42f6-8cc8-254f58ffc7b1" 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_bbd18d21-279f-4022-9f26-6d8145aa95fe" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesNextRollingTwelveMonthsAmortizedCostBasis_81855b99-1dd3-42f6-8cc8-254f58ffc7b1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearSixThroughTenAmortizedCostBasis_580e5870-8a54-4960-8259-70a241632f77" 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_bbd18d21-279f-4022-9f26-6d8145aa95fe" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearSixThroughTenAmortizedCostBasis_580e5870-8a54-4960-8259-70a241632f77" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost_15447b4d-4b22-44c2-ae90-5db67c3a87d4" 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_bbd18d21-279f-4022-9f26-6d8145aa95fe" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost_15447b4d-4b22-44c2-ae90-5db67c3a87d4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearTwoThroughFiveAmortizedCostBasis_fe5afba9-00c9-43d0-9fd6-889dfe7b603a" 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_bbd18d21-279f-4022-9f26-6d8145aa95fe" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearTwoThroughFiveAmortizedCostBasis_fe5afba9-00c9-43d0-9fd6-889dfe7b603a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingAfterYearTenAmortizedCostBasis_1247a272-4b56-4be5-8e25-61a927ed4428" 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_bbd18d21-279f-4022-9f26-6d8145aa95fe" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingAfterYearTenAmortizedCostBasis_1247a272-4b56-4be5-8e25-61a927ed4428" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsAgingofUnrealizedLossesDetails" xlink:type="simple" xlink:href="nmih-20200630.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_DebtSecuritiesAvailableForSaleUnrealizedLossPosition_cfb788c4-0c2a-4acf-9654-f175ad61d559" 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_43412503-16b2-4353-b4bc-0d4a2dea7e00" 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_cfb788c4-0c2a-4acf-9654-f175ad61d559" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_43412503-16b2-4353-b4bc-0d4a2dea7e00" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_aaf2bb1c-15de-462c-93b3-dd8cf559a3db" 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_cfb788c4-0c2a-4acf-9654-f175ad61d559" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_aaf2bb1c-15de-462c-93b3-dd8cf559a3db" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss_9b2cba60-e25a-4b6e-ba42-02cad6452402" 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_1fe00676-de86-4545-a4a1-e1a0b7f3009e" 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_9b2cba60-e25a-4b6e-ba42-02cad6452402" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_1fe00676-de86-4545-a4a1-e1a0b7f3009e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_3d904c5d-ffb5-4300-aa37-ad0293108419" 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_9b2cba60-e25a-4b6e-ba42-02cad6452402" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_3d904c5d-ffb5-4300-aa37-ad0293108419" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionNumberOfPositions_5c507588-28b0-4d07-bd91-2252d596cbf7" 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_0e472b0c-85c5-4c9d-afac-b283eae182ca" 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_5c507588-28b0-4d07-bd91-2252d596cbf7" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsNumberOfPositions_0e472b0c-85c5-4c9d-afac-b283eae182ca" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions_84530dd9-80c1-437b-aa08-5ad816cfce20" 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_5c507588-28b0-4d07-bd91-2252d596cbf7" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions_84530dd9-80c1-437b-aa08-5ad816cfce20" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNetInvestmentIncomeDetails" xlink:type="simple" xlink:href="nmih-20200630.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_dd4d6354-8cf6-4da3-adb1-ef4f4485b93e" 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_7d9c46f7-fe98-4c66-ad7c-845d5834e74e" 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_dd4d6354-8cf6-4da3-adb1-ef4f4485b93e" xlink:to="loc_us-gaap_InvestmentIncomeInterestAndDividend_7d9c46f7-fe98-4c66-ad7c-845d5834e74e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeInvestmentExpense_3291acf7-8bb7-4159-8da6-f4c19110b0e1" 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_dd4d6354-8cf6-4da3-adb1-ef4f4485b93e" xlink:to="loc_us-gaap_InvestmentIncomeInvestmentExpense_3291acf7-8bb7-4159-8da6-f4c19110b0e1" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNetRealizedInvestmentGainsLossesDetails" xlink:type="simple" xlink:href="nmih-20200630.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_b51c203d-2306-4148-be18-654840934886" 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_382f97cf-ae3c-4df4-969a-d076ff627200" 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_b51c203d-2306-4148-be18-654840934886" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGain_382f97cf-ae3c-4df4-969a-d076ff627200" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedLoss_319882f3-0d71-4838-80fd-449223242adf" 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_b51c203d-2306-4148-be18-654840934886" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedLoss_319882f3-0d71-4838-80fd-449223242adf" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/FairValueofFinancialInstruments" xlink:type="simple" xlink:href="nmih-20200630.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-20200630.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-20200630.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_LiabilitiesFairValueDisclosure_7ac61e23-ce0b-48ef-b69f-80f41d303ad1" 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_40aef673-15df-43bf-83cb-3ef18238dec7" xlink:href="nmih-20200630.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_7ac61e23-ce0b-48ef-b69f-80f41d303ad1" xlink:to="loc_nmih_WarrantLiability_40aef673-15df-43bf-83cb-3ef18238dec7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsFairValueDisclosure_1799b80e-6868-4045-a5ea-a4cee15f4c65" 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_4e396a13-574f-409e-bdaa-7e866c4b9716" 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_1799b80e-6868-4045-a5ea-a4cee15f4c65" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_4e396a13-574f-409e-bdaa-7e866c4b9716" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsFairValueDisclosure_501325bf-9053-4076-8061-a58f906807aa" 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_1799b80e-6868-4045-a5ea-a4cee15f4c65" xlink:to="loc_us-gaap_CashAndCashEquivalentsFairValueDisclosure_501325bf-9053-4076-8061-a58f906807aa" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/FairValueofFinancialInstrumentsRollforwardofLevel3LiabilitiesDetails" xlink:type="simple" xlink:href="nmih-20200630.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-20200630.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-20200630.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-20200630.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-20200630.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-20200630.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-20200630.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-20200630.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_7fe5c5d6-262d-47a8-ba5d-3bfa688dda19" 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_e6257b6a-014a-4dc4-b096-9fa09a762d03" 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_7fe5c5d6-262d-47a8-ba5d-3bfa688dda19" xlink:to="loc_us-gaap_DirectPremiumsWritten_e6257b6a-014a-4dc4-b096-9fa09a762d03" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CededPremiumsWritten_d61ce5e8-03f2-4eed-8cba-faaa58ecfffb" 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_7fe5c5d6-262d-47a8-ba5d-3bfa688dda19" xlink:to="loc_us-gaap_CededPremiumsWritten_d61ce5e8-03f2-4eed-8cba-faaa58ecfffb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PremiumsEarnedNet_017c5d3c-1586-4462-bf5d-51783dc9ed66" 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_d7f7ab48-efdb-481a-843d-bdd6978d41a0" 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_017c5d3c-1586-4462-bf5d-51783dc9ed66" xlink:to="loc_us-gaap_DirectPremiumsEarned_d7f7ab48-efdb-481a-843d-bdd6978d41a0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CededPremiumsEarned_c34f82c8-006d-483f-9206-3cb155dbf0bc" 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_017c5d3c-1586-4462-bf5d-51783dc9ed66" xlink:to="loc_us-gaap_CededPremiumsEarned_c34f82c8-006d-483f-9206-3cb155dbf0bc" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReinsuranceNarrativeDetails" xlink:type="simple" xlink:href="nmih-20200630.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-20200630.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-20200630.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-20200630.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-20200630.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-20200630.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-20200630.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_1f8d19c2-1693-421d-9ce9-f5302627efcc" 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_52b4d1fd-273e-46da-a884-27b02e14a670" 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_1f8d19c2-1693-421d-9ce9-f5302627efcc" xlink:to="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_52b4d1fd-273e-46da-a884-27b02e14a670" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReinsuranceRecoverablesOnPaidAndUnpaidLosses_a3e19364-5277-4595-ac03-f32450cf9b5e" 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_1f8d19c2-1693-421d-9ce9-f5302627efcc" xlink:to="loc_us-gaap_ReinsuranceRecoverablesOnPaidAndUnpaidLosses_a3e19364-5277-4595-ac03-f32450cf9b5e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForLossesAndLossAdjustmentExpense_c458c51a-59b6-4206-be22-add1615b154f" 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_a3aff511-72ff-497d-8142-59347c2aaef8" 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_c458c51a-59b6-4206-be22-add1615b154f" xlink:to="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidCurrentYear1_a3aff511-72ff-497d-8142-59347c2aaef8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidPriorYears1_dc9f07a1-d077-4039-ba34-a7f5f14ca9bf" 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_c458c51a-59b6-4206-be22-add1615b154f" xlink:to="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidPriorYears1_dc9f07a1-d077-4039-ba34-a7f5f14ca9bf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_nmih_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidReinsuranceTerminations_738ee348-74b8-4c24-be6e-a28e13aace5d" xlink:href="nmih-20200630.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_c458c51a-59b6-4206-be22-add1615b154f" xlink:to="loc_nmih_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidReinsuranceTerminations_738ee348-74b8-4c24-be6e-a28e13aace5d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaims1_5118b946-ba6d-43a0-a17c-f30bdf7d952f" 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_1ea21c15-4b03-4d9a-89f2-cc56692a87bc" 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_5118b946-ba6d-43a0-a17c-f30bdf7d952f" xlink:to="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersCurrentYearClaimsAndClaimsAdjustmentExpense_1ea21c15-4b03-4d9a-89f2-cc56692a87bc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense_d278ac9d-ab54-4f13-bd09-6f78bb6b21ef" 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_5118b946-ba6d-43a0-a17c-f30bdf7d952f" xlink:to="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense_d278ac9d-ab54-4f13-bd09-6f78bb6b21ef" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/EarningsperShareEPS" xlink:type="simple" xlink:href="nmih-20200630.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-20200630.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-20200630.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_NetIncomeLossAttributableToParentDiluted_6f9ba8c4-a41b-4306-9d8a-5772deb8d012" 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_nmih_GainFromChangeinFairValueofWarrantLiability_f3e5222d-0879-40a1-939f-3d4f6930ca20" xlink:href="nmih-20200630.xsd#nmih_GainFromChangeinFairValueofWarrantLiability"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLossAttributableToParentDiluted_6f9ba8c4-a41b-4306-9d8a-5772deb8d012" xlink:to="loc_nmih_GainFromChangeinFairValueofWarrantLiability_f3e5222d-0879-40a1-939f-3d4f6930ca20" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_8562c73d-da12-4b9e-b07a-a8f72cab2906" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLossAttributableToParentDiluted_6f9ba8c4-a41b-4306-9d8a-5772deb8d012" xlink:to="loc_us-gaap_NetIncomeLoss_8562c73d-da12-4b9e-b07a-a8f72cab2906" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_12a57745-6aad-4ed5-ab99-e378055fa305" 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_dc2e2283-5dc8-44f5-b5c4-dc0fba4543a0" 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_12a57745-6aad-4ed5-ab99-e378055fa305" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_dc2e2283-5dc8-44f5-b5c4-dc0fba4543a0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment_c56c658c-6eaa-4cd5-9fb2-07c46a0440e9" 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_12a57745-6aad-4ed5-ab99-e378055fa305" xlink:to="loc_us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment_c56c658c-6eaa-4cd5-9fb2-07c46a0440e9" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/Warrants" xlink:type="simple" xlink:href="nmih-20200630.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-20200630.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-20200630.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-20200630.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-20200630.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-20200630.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-20200630.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-20200630.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-20200630.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-20200630.xsd#RegulatoryInformationScheduleofStatutorySurplusContingencyReserveandRTCRatioDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/RegulatoryInformationScheduleofStatutorySurplusContingencyReserveandRTCRatioDetails" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/RegulatoryInformationNarrativeDetails" xlink:type="simple" xlink:href="nmih-20200630.xsd#RegulatoryInformationNarrativeDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/RegulatoryInformationNarrativeDetails" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/COVID19DevelopmentsandCoronavirusAidReliefandEconomicSecurityCARESAct" xlink:type="simple" xlink:href="nmih-20200630.xsd#COVID19DevelopmentsandCoronavirusAidReliefandEconomicSecurityCARESAct"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/COVID19DevelopmentsandCoronavirusAidReliefandEconomicSecurityCARESAct" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/SubsequentEvent" xlink:type="simple" xlink:href="nmih-20200630.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-20200630.xsd#SubsequentEventDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/SubsequentEventDetails" xlink:type="extended"/>
</link:linkbase>
