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

<!--XBRL Document Created with Wdesk from Workiva-->
<!--Copyright 2020 Workiva-->
<!--r:daeb9427-4b1a-493c-a038-08a2587d1c08,g:d549b94d-3177-4c9a-916e-11753b6ba394-->
<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-20200331.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-20200331.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_Assets_e8934702-1a4f-490e-9ae3-adc2d1ff6ae2" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_Assets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_c801b616-6e50-457f-aeac-5105342d60b5" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_Assets_e8934702-1a4f-490e-9ae3-adc2d1ff6ae2" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_c801b616-6e50-457f-aeac-5105342d60b5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_85a61228-2230-4a0f-a30d-3037a7168ee2" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_e8934702-1a4f-490e-9ae3-adc2d1ff6ae2" xlink:to="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_85a61228-2230-4a0f-a30d-3037a7168ee2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PremiumsReceivableAtCarryingValue_a91fbc8f-68f0-4427-b835-7038ecb65877" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PremiumsReceivableAtCarryingValue"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_e8934702-1a4f-490e-9ae3-adc2d1ff6ae2" xlink:to="loc_us-gaap_PremiumsReceivableAtCarryingValue_a91fbc8f-68f0-4427-b835-7038ecb65877" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedInvestmentIncomeReceivable_92e550ba-f1ef-480e-882c-b34829f38357" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AccruedInvestmentIncomeReceivable"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_e8934702-1a4f-490e-9ae3-adc2d1ff6ae2" xlink:to="loc_us-gaap_AccruedInvestmentIncomeReceivable_92e550ba-f1ef-480e-882c-b34829f38357" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_8630926d-c0c9-4860-a663-fbdcee18199f" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_e8934702-1a4f-490e-9ae3-adc2d1ff6ae2" xlink:to="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_8630926d-c0c9-4860-a663-fbdcee18199f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredPolicyAcquisitionCosts_4e3beea1-d0b0-44d2-aeb1-17f62f97d36d" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_e8934702-1a4f-490e-9ae3-adc2d1ff6ae2" xlink:to="loc_us-gaap_DeferredPolicyAcquisitionCosts_4e3beea1-d0b0-44d2-aeb1-17f62f97d36d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_c01b0115-223c-4ad4-9563-ed4c2f6cbe85" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_e8934702-1a4f-490e-9ae3-adc2d1ff6ae2" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_c01b0115-223c-4ad4-9563-ed4c2f6cbe85" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetIncludingGoodwill_5547cf28-4e8f-4056-a47c-6ef5e0e672c8" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_e8934702-1a4f-490e-9ae3-adc2d1ff6ae2" xlink:to="loc_us-gaap_IntangibleAssetsNetIncludingGoodwill_5547cf28-4e8f-4056-a47c-6ef5e0e672c8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidReinsurancePremiums_ba397780-7e9f-4773-9574-9e47a32303ea" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_e8934702-1a4f-490e-9ae3-adc2d1ff6ae2" xlink:to="loc_us-gaap_PrepaidReinsurancePremiums_ba397780-7e9f-4773-9574-9e47a32303ea" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssets_f153d307-7ee3-4dfb-8bcd-9cb45602b4d0" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherAssets"/>
    <link:calculationArc order="10" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_e8934702-1a4f-490e-9ae3-adc2d1ff6ae2" xlink:to="loc_us-gaap_OtherAssets_f153d307-7ee3-4dfb-8bcd-9cb45602b4d0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_213c3f22-6c5a-4952-93b8-6f5512bb8eeb" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_Liabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebt_1f91600c-941c-4125-9692-f0ae274c4518" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LongTermDebt"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_213c3f22-6c5a-4952-93b8-6f5512bb8eeb" xlink:to="loc_us-gaap_LongTermDebt_1f91600c-941c-4125-9692-f0ae274c4518" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UnearnedPremiums_134b18e2-2190-437b-b830-ad1d91d25c55" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_UnearnedPremiums"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_213c3f22-6c5a-4952-93b8-6f5512bb8eeb" xlink:to="loc_us-gaap_UnearnedPremiums_134b18e2-2190-437b-b830-ad1d91d25c55" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent_cd63b4cd-e0ab-42d3-8269-c7971f3e732a" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_213c3f22-6c5a-4952-93b8-6f5512bb8eeb" xlink:to="loc_us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent_cd63b4cd-e0ab-42d3-8269-c7971f3e732a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_8d87c11a-4770-46ab-af29-ae758c680881" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_213c3f22-6c5a-4952-93b8-6f5512bb8eeb" xlink:to="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_8d87c11a-4770-46ab-af29-ae758c680881" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FundsHeldUnderReinsuranceAgreementsLiability_89c27f4e-43a6-4ce5-b8bd-1a6d22bf16a1" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_FundsHeldUnderReinsuranceAgreementsLiability"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_213c3f22-6c5a-4952-93b8-6f5512bb8eeb" xlink:to="loc_us-gaap_FundsHeldUnderReinsuranceAgreementsLiability_89c27f4e-43a6-4ce5-b8bd-1a6d22bf16a1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WarrantsAndRightsOutstanding_2c094355-ead5-4ba5-9ec0-aadfab279b59" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_WarrantsAndRightsOutstanding"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_213c3f22-6c5a-4952-93b8-6f5512bb8eeb" xlink:to="loc_us-gaap_WarrantsAndRightsOutstanding_2c094355-ead5-4ba5-9ec0-aadfab279b59" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_0baeb735-b65c-4873-b671-d730df477a76" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DeferredIncomeTaxLiabilitiesNet"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_213c3f22-6c5a-4952-93b8-6f5512bb8eeb" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_0baeb735-b65c-4873-b671-d730df477a76" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilities_53007ea6-78c6-4e56-bade-09273c67f77e" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherLiabilities"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_213c3f22-6c5a-4952-93b8-6f5512bb8eeb" xlink:to="loc_us-gaap_OtherLiabilities_53007ea6-78c6-4e56-bade-09273c67f77e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_90d90c70-23a0-43b9-876d-05bc2cf9897c" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_StockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValueOutstanding_00f71e33-3269-4047-8b7b-93fc535cd4e2" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_90d90c70-23a0-43b9-876d-05bc2cf9897c" xlink:to="loc_us-gaap_CommonStockValueOutstanding_00f71e33-3269-4047-8b7b-93fc535cd4e2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapital_a0ea479e-c9c8-413f-9b30-fbd61a567574" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_90d90c70-23a0-43b9-876d-05bc2cf9897c" xlink:to="loc_us-gaap_AdditionalPaidInCapital_a0ea479e-c9c8-413f-9b30-fbd61a567574" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_b2f3e9e1-9b45-4b08-a277-eff20892e97c" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_90d90c70-23a0-43b9-876d-05bc2cf9897c" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_b2f3e9e1-9b45-4b08-a277-eff20892e97c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_ee606719-2118-44ac-a47d-54efdd94756b" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_90d90c70-23a0-43b9-876d-05bc2cf9897c" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_ee606719-2118-44ac-a47d-54efdd94756b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_08f0b8ad-cb2c-45a7-8167-b8053bfd1b67" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommitmentsAndContingencies_0da85397-4030-448f-a9dc-badb6085e170" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_08f0b8ad-cb2c-45a7-8167-b8053bfd1b67" xlink:to="loc_us-gaap_CommitmentsAndContingencies_0da85397-4030-448f-a9dc-badb6085e170" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_dc382db1-27af-4687-b73c-cbfe5cec02dc" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_08f0b8ad-cb2c-45a7-8167-b8053bfd1b67" xlink:to="loc_us-gaap_Liabilities_dc382db1-27af-4687-b73c-cbfe5cec02dc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_4f188a2d-e0f5-426b-80b6-7a86d70c3ad6" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_08f0b8ad-cb2c-45a7-8167-b8053bfd1b67" xlink:to="loc_us-gaap_StockholdersEquity_4f188a2d-e0f5-426b-80b6-7a86d70c3ad6" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/CONDENSEDCONSOLIDATEDBALANCESHEETSUNAUDITEDParenthetical" xlink:type="simple" xlink:href="nmih-20200331.xsd#CONDENSEDCONSOLIDATEDBALANCESHEETSUNAUDITEDParenthetical"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CONDENSEDCONSOLIDATEDBALANCESHEETSUNAUDITEDParenthetical" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSANDCOMPREHENSIVEINCOMELOSSUNAUDITED" xlink:type="simple" xlink:href="nmih-20200331.xsd#CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSANDCOMPREHENSIVEINCOMELOSSUNAUDITED"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSANDCOMPREHENSIVEINCOMELOSSUNAUDITED" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_79748d99-8152-4bcd-82f4-19f4abb47b81" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ComprehensiveIncomeNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_14abbe44-39f9-4f9c-8648-46c64b20e59e" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_79748d99-8152-4bcd-82f4-19f4abb47b81" xlink:to="loc_us-gaap_NetIncomeLoss_14abbe44-39f9-4f9c-8648-46c64b20e59e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_8ccb0e67-f210-439f-8fe4-0780d173479a" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_79748d99-8152-4bcd-82f4-19f4abb47b81" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_8ccb0e67-f210-439f-8fe4-0780d173479a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_9e27c160-f521-4454-a1d8-2b14fa72b358" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NetIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_d2dac32e-9daf-4582-a1ef-e5415b6c659c" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_9e27c160-f521-4454-a1d8-2b14fa72b358" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_d2dac32e-9daf-4582-a1ef-e5415b6c659c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_896b6f2d-7c69-4f84-828c-c60873e63135" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_9e27c160-f521-4454-a1d8-2b14fa72b358" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_896b6f2d-7c69-4f84-828c-c60873e63135" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Revenues_04b4c99d-3a76-4a7e-9b27-aab4f38b42a9" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_Revenues"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PremiumsEarnedNet_08ff9e33-3d21-4691-a7a4-d4f7690d399b" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_04b4c99d-3a76-4a7e-9b27-aab4f38b42a9" xlink:to="loc_us-gaap_PremiumsEarnedNet_08ff9e33-3d21-4691-a7a4-d4f7690d399b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetInvestmentIncome_49ecb7fa-e2a1-408b-a91d-1c431eb9e0fa" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_04b4c99d-3a76-4a7e-9b27-aab4f38b42a9" xlink:to="loc_us-gaap_NetInvestmentIncome_49ecb7fa-e2a1-408b-a91d-1c431eb9e0fa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnInvestments_cf91dec5-3d2d-492c-aafd-f86430e3e17c" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_04b4c99d-3a76-4a7e-9b27-aab4f38b42a9" xlink:to="loc_us-gaap_GainLossOnInvestments_cf91dec5-3d2d-492c-aafd-f86430e3e17c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherIncome_ff25c01a-2261-4e1c-9ee6-ca11009c7537" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_04b4c99d-3a76-4a7e-9b27-aab4f38b42a9" xlink:to="loc_us-gaap_OtherIncome_ff25c01a-2261-4e1c-9ee6-ca11009c7537" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostsAndExpenses_568fa4e7-3977-4a13-980d-0a8efbe8d2c4" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CostsAndExpenses"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncurredClaimsPropertyCasualtyAndLiability_378e558e-4545-4c2e-bdc1-c58aae85c40a" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_568fa4e7-3977-4a13-980d-0a8efbe8d2c4" xlink:to="loc_us-gaap_IncurredClaimsPropertyCasualtyAndLiability_378e558e-4545-4c2e-bdc1-c58aae85c40a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherCostAndExpenseOperating_6973078d-780c-454a-8f6a-44f2bfc76ae0" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_568fa4e7-3977-4a13-980d-0a8efbe8d2c4" xlink:to="loc_us-gaap_OtherCostAndExpenseOperating_6973078d-780c-454a-8f6a-44f2bfc76ae0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingExpense_72eb92fa-8a90-4448-a366-66c41383acdc" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_568fa4e7-3977-4a13-980d-0a8efbe8d2c4" xlink:to="loc_us-gaap_OtherNonoperatingExpense_72eb92fa-8a90-4448-a366-66c41383acdc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_nmih_GainLossonChangeinFairValueofWarrantLiability_498e494d-967b-41ad-8c2c-2d26b43079c3" xlink:href="nmih-20200331.xsd#nmih_GainLossonChangeinFairValueofWarrantLiability"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_568fa4e7-3977-4a13-980d-0a8efbe8d2c4" xlink:to="loc_nmih_GainLossonChangeinFairValueofWarrantLiability_498e494d-967b-41ad-8c2c-2d26b43079c3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpense_53d7a50e-d155-48f1-af95-f6a8b2a67f35" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_InterestExpense"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_568fa4e7-3977-4a13-980d-0a8efbe8d2c4" xlink:to="loc_us-gaap_InterestExpense_53d7a50e-d155-48f1-af95-f6a8b2a67f35" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_5f37cc28-479b-4c6b-93d3-4ea05c4a211b" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Revenues_9fe2e31b-2a34-447a-81c2-92c6fc24d184" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_5f37cc28-479b-4c6b-93d3-4ea05c4a211b" xlink:to="loc_us-gaap_Revenues_9fe2e31b-2a34-447a-81c2-92c6fc24d184" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostsAndExpenses_ae4423cd-cb54-4712-b998-45b53c04279a" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_5f37cc28-479b-4c6b-93d3-4ea05c4a211b" xlink:to="loc_us-gaap_CostsAndExpenses_ae4423cd-cb54-4712-b998-45b53c04279a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_21d9afeb-3dfe-4006-8f9c-0d678e216b73" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax_1cffe0b9-b42b-4843-940c-b60169fbb847" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_21d9afeb-3dfe-4006-8f9c-0d678e216b73" xlink:to="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax_1cffe0b9-b42b-4843-940c-b60169fbb847" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax_fe833cef-3a4f-4ba1-833d-5634a8938c7b" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_21d9afeb-3dfe-4006-8f9c-0d678e216b73" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax_fe833cef-3a4f-4ba1-833d-5634a8938c7b" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSANDCOMPREHENSIVEINCOMELOSSUNAUDITEDParenthetical" xlink:type="simple" xlink:href="nmih-20200331.xsd#CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSANDCOMPREHENSIVEINCOMELOSSUNAUDITEDParenthetical"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSANDCOMPREHENSIVEINCOMELOSSUNAUDITEDParenthetical" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCHANGESINSHAREHOLDERSEQUITYUNAUDITED" xlink:type="simple" xlink:href="nmih-20200331.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-20200331.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-20200331.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_NetCashProvidedByUsedInOperatingActivities_d421e0bc-b0ec-4d4c-bfb9-bd5beb5d6cb2" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_30dfb1ef-2dca-419e-9f09-8b646446e833" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_d421e0bc-b0ec-4d4c-bfb9-bd5beb5d6cb2" xlink:to="loc_us-gaap_NetIncomeLoss_30dfb1ef-2dca-419e-9f09-8b646446e833" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss_6d61b896-ba94-4b56-86bb-8e13a8172ff0" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_d421e0bc-b0ec-4d4c-bfb9-bd5beb5d6cb2" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss_6d61b896-ba94-4b56-86bb-8e13a8172ff0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAdjustmentOfWarrants_556caa2d-bd51-46ea-8c0f-83c7b0e08a18" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_d421e0bc-b0ec-4d4c-bfb9-bd5beb5d6cb2" xlink:to="loc_us-gaap_FairValueAdjustmentOfWarrants_556caa2d-bd51-46ea-8c0f-83c7b0e08a18" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationAmortizationAndAccretionNet_670aff7b-fd40-4f15-97cf-2587f65be601" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_d421e0bc-b0ec-4d4c-bfb9-bd5beb5d6cb2" xlink:to="loc_us-gaap_DepreciationAmortizationAndAccretionNet_670aff7b-fd40-4f15-97cf-2587f65be601" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments_811e6510-6106-4cbc-929a-19d69f2dccbc" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_d421e0bc-b0ec-4d4c-bfb9-bd5beb5d6cb2" xlink:to="loc_us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments_811e6510-6106-4cbc-929a-19d69f2dccbc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AmortizationOfFinancingCostsAndDiscounts_01ef3bd1-3e56-44c4-bdf2-a2a2ecca038d" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_d421e0bc-b0ec-4d4c-bfb9-bd5beb5d6cb2" xlink:to="loc_us-gaap_AmortizationOfFinancingCostsAndDiscounts_01ef3bd1-3e56-44c4-bdf2-a2a2ecca038d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxesAndTaxCredits_2fbd6363-465e-4c9d-8949-a7f57d2115b2" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_d421e0bc-b0ec-4d4c-bfb9-bd5beb5d6cb2" xlink:to="loc_us-gaap_DeferredIncomeTaxesAndTaxCredits_2fbd6363-465e-4c9d-8949-a7f57d2115b2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensation_0acfcb8a-f9bc-407c-b5f6-eb286e97aff1" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_d421e0bc-b0ec-4d4c-bfb9-bd5beb5d6cb2" xlink:to="loc_us-gaap_ShareBasedCompensation_0acfcb8a-f9bc-407c-b5f6-eb286e97aff1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInPremiumsReceivable_20ba7f3c-0ef8-4d7d-bf94-215bd5076d7f" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_d421e0bc-b0ec-4d4c-bfb9-bd5beb5d6cb2" xlink:to="loc_us-gaap_IncreaseDecreaseInPremiumsReceivable_20ba7f3c-0ef8-4d7d-bf94-215bd5076d7f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable_7f5f0df9-3075-4ca9-9417-d350f6950033" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_d421e0bc-b0ec-4d4c-bfb9-bd5beb5d6cb2" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable_7f5f0df9-3075-4ca9-9417-d350f6950033" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidExpense_bb657645-36da-4f72-9ed7-44549e327b9d" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_d421e0bc-b0ec-4d4c-bfb9-bd5beb5d6cb2" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidExpense_bb657645-36da-4f72-9ed7-44549e327b9d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInDeferredPolicyAcquisitionCosts_bb8154f4-6fde-49f9-b106-ba406b483e2e" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_d421e0bc-b0ec-4d4c-bfb9-bd5beb5d6cb2" xlink:to="loc_us-gaap_IncreaseDecreaseInDeferredPolicyAcquisitionCosts_bb8154f4-6fde-49f9-b106-ba406b483e2e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_5854a0fa-0dfb-42b9-bff3-f11fcb272596" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_d421e0bc-b0ec-4d4c-bfb9-bd5beb5d6cb2" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_5854a0fa-0dfb-42b9-bff3-f11fcb272596" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInUnearnedPremiums_9197c8bb-0a68-4a1d-9969-a61d1090ce9f" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_d421e0bc-b0ec-4d4c-bfb9-bd5beb5d6cb2" xlink:to="loc_us-gaap_IncreaseDecreaseInUnearnedPremiums_9197c8bb-0a68-4a1d-9969-a61d1090ce9f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInLiabilityForClaimsAndClaimsAdjustmentExpenseReserve_b0d548e3-f633-4417-88e0-20ef50fca2b9" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_d421e0bc-b0ec-4d4c-bfb9-bd5beb5d6cb2" xlink:to="loc_us-gaap_IncreaseDecreaseInLiabilityForClaimsAndClaimsAdjustmentExpenseReserve_b0d548e3-f633-4417-88e0-20ef50fca2b9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_nmih_IncreaseDecreaseinReinsuranceAssetsandLiabilities_b46dc1fc-7511-4cfe-9678-d45445cd18a5" xlink:href="nmih-20200331.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_d421e0bc-b0ec-4d4c-bfb9-bd5beb5d6cb2" xlink:to="loc_nmih_IncreaseDecreaseinReinsuranceAssetsandLiabilities_b46dc1fc-7511-4cfe-9678-d45445cd18a5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_2693234b-4777-4060-9c44-9c9dccc29ee4" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_d421e0bc-b0ec-4d4c-bfb9-bd5beb5d6cb2" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_2693234b-4777-4060-9c44-9c9dccc29ee4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_803d9914-a253-4778-88d4-c09bba8a574f" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_6bae4f29-c472-4e2f-86d5-1405e6b1aac8" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_803d9914-a253-4778-88d4-c09bba8a574f" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_6bae4f29-c472-4e2f-86d5-1405e6b1aac8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_e3bb5500-8263-43d2-9a75-f0d8fda11db2" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_803d9914-a253-4778-88d4-c09bba8a574f" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_e3bb5500-8263-43d2-9a75-f0d8fda11db2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_88fc3688-3328-41f7-9f0f-a9802f2fdb7f" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_803d9914-a253-4778-88d4-c09bba8a574f" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_88fc3688-3328-41f7-9f0f-a9802f2fdb7f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1f3a0ea3-79c9-4d0f-80b3-dc6b4fe749a5" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlansIncludingStockOptions_26a23589-42f5-40a0-97e0-c12f5bf1e09a" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlansIncludingStockOptions"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1f3a0ea3-79c9-4d0f-80b3-dc6b4fe749a5" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlansIncludingStockOptions_26a23589-42f5-40a0-97e0-c12f5bf1e09a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_e435793f-fa49-48ce-95b8-e94ce77f06d7" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1f3a0ea3-79c9-4d0f-80b3-dc6b4fe749a5" xlink:to="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_e435793f-fa49-48ce-95b8-e94ce77f06d7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfLongTermDebt_de27fb63-635e-4966-a649-42c2730c2899" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_RepaymentsOfLongTermDebt"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1f3a0ea3-79c9-4d0f-80b3-dc6b4fe749a5" xlink:to="loc_us-gaap_RepaymentsOfLongTermDebt_de27fb63-635e-4966-a649-42c2730c2899" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsOfDebtIssuanceCosts_478890c2-030f-4466-b5ed-4453b0c23402" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PaymentsOfDebtIssuanceCosts"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1f3a0ea3-79c9-4d0f-80b3-dc6b4fe749a5" xlink:to="loc_us-gaap_PaymentsOfDebtIssuanceCosts_478890c2-030f-4466-b5ed-4453b0c23402" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_51068396-8e05-4b97-ab69-112eee6e18df" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireShortTermInvestments_90117b53-5a0b-4ac4-b90d-b90436e69acc" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_51068396-8e05-4b97-ab69-112eee6e18df" xlink:to="loc_us-gaap_PaymentsToAcquireShortTermInvestments_90117b53-5a0b-4ac4-b90d-b90436e69acc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt_9cb62a20-c211-4def-8777-b85e3a38dabb" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_51068396-8e05-4b97-ab69-112eee6e18df" xlink:to="loc_us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt_9cb62a20-c211-4def-8777-b85e3a38dabb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleOfShortTermInvestments_287ad846-68b4-4036-a27b-8d506a6daffa" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_51068396-8e05-4b97-ab69-112eee6e18df" xlink:to="loc_us-gaap_ProceedsFromSaleOfShortTermInvestments_287ad846-68b4-4036-a27b-8d506a6daffa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleAndMaturityOfAvailableForSaleSecurities_fb957b6c-7dcf-4ea5-827e-9593ab1d65cb" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_51068396-8e05-4b97-ab69-112eee6e18df" xlink:to="loc_us-gaap_ProceedsFromSaleAndMaturityOfAvailableForSaleSecurities_fb957b6c-7dcf-4ea5-827e-9593ab1d65cb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_26dad176-f13d-44a8-bea7-c215cc068d34" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_51068396-8e05-4b97-ab69-112eee6e18df" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_26dad176-f13d-44a8-bea7-c215cc068d34" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/OrganizationBasisofPresentationandSummaryofAccountingPrinciples" xlink:type="simple" xlink:href="nmih-20200331.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-20200331.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-20200331.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-20200331.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-20200331.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-20200331.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_8f36b0ed-2e92-4b0f-852f-67e7cdd35b39" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_67454258-5de1-4b63-9111-8a9667ec2263" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_8f36b0ed-2e92-4b0f-852f-67e7cdd35b39" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_67454258-5de1-4b63-9111-8a9667ec2263" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_2bf396da-08a3-43b0-bb0b-d9b314361225" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_8f36b0ed-2e92-4b0f-852f-67e7cdd35b39" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_2bf396da-08a3-43b0-bb0b-d9b314361225" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_bf8f1418-ffd3-4630-a15f-6907964c5b9e" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_8f36b0ed-2e92-4b0f-852f-67e7cdd35b39" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_bf8f1418-ffd3-4630-a15f-6907964c5b9e" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsCorporateDebtSecuritiesbyIndustryGroupDetails" xlink:type="simple" xlink:href="nmih-20200331.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-20200331.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-20200331.xsd#InvestmentsScheduledMaturitiesDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsScheduledMaturitiesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_984a2d38-55b6-40c8-b1c4-2990ac021789" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost_ca9e5be4-4b15-40ca-879c-b0599d7a2d53" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_984a2d38-55b6-40c8-b1c4-2990ac021789" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost_ca9e5be4-4b15-40ca-879c-b0599d7a2d53" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost_d9cde033-64c3-4a52-aa3a-3f01d3a72dbd" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_984a2d38-55b6-40c8-b1c4-2990ac021789" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost_d9cde033-64c3-4a52-aa3a-3f01d3a72dbd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost_79569d75-fff5-4401-8b7b-ffb581f1deb9" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_984a2d38-55b6-40c8-b1c4-2990ac021789" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost_79569d75-fff5-4401-8b7b-ffb581f1deb9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost_97f2709e-6eea-4e1e-b80e-b564fdcdbc2f" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_984a2d38-55b6-40c8-b1c4-2990ac021789" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost_97f2709e-6eea-4e1e-b80e-b564fdcdbc2f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost_e0e376e9-3add-496f-b460-641869d9e60d" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_984a2d38-55b6-40c8-b1c4-2990ac021789" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost_e0e376e9-3add-496f-b460-641869d9e60d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_67ea5311-eb1a-41c6-a058-1c237f9aceed" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_bf26553c-58c0-4aca-a13a-04fe02a073bc" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_67ea5311-eb1a-41c6-a058-1c237f9aceed" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_bf26553c-58c0-4aca-a13a-04fe02a073bc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_b9f362cd-8915-43eb-8463-73fed3408904" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_67ea5311-eb1a-41c6-a058-1c237f9aceed" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_b9f362cd-8915-43eb-8463-73fed3408904" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_1d0ff4ed-556c-40e2-8052-783ab8f65748" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_67ea5311-eb1a-41c6-a058-1c237f9aceed" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_1d0ff4ed-556c-40e2-8052-783ab8f65748" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue_f2d4ce6e-fea4-4e02-9f14-0886bd275c5c" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_67ea5311-eb1a-41c6-a058-1c237f9aceed" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue_f2d4ce6e-fea4-4e02-9f14-0886bd275c5c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue_ceb922c5-5f9b-4417-8c1b-14fadadd8935" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_67ea5311-eb1a-41c6-a058-1c237f9aceed" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue_ceb922c5-5f9b-4417-8c1b-14fadadd8935" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsAgingofUnrealizedLossesDetails" xlink:type="simple" xlink:href="nmih-20200331.xsd#InvestmentsAgingofUnrealizedLossesDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsAgingofUnrealizedLossesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionNumberOfPositions_49b90a0b-8779-4c70-815a-45eb336ee259" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionNumberOfPositions"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsNumberOfPositions_acecb48a-3d13-40ab-b271-93483a61ef61" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_49b90a0b-8779-4c70-815a-45eb336ee259" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsNumberOfPositions_acecb48a-3d13-40ab-b271-93483a61ef61" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions_d0041902-2681-470b-a13b-5d58c708cf69" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_49b90a0b-8779-4c70-815a-45eb336ee259" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions_d0041902-2681-470b-a13b-5d58c708cf69" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition_bd50bd7e-5f36-4e1b-88c7-30158082d203" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_bb51844f-172b-47d5-bb5b-f3022df15138" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_bd50bd7e-5f36-4e1b-88c7-30158082d203" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_bb51844f-172b-47d5-bb5b-f3022df15138" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_51dd12c5-7f9e-497b-b07e-73c225ba71f4" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_bd50bd7e-5f36-4e1b-88c7-30158082d203" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_51dd12c5-7f9e-497b-b07e-73c225ba71f4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss_7340c6f0-86fe-4854-8d6f-0e70a243b65d" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_0f42b9fc-e295-4852-8fd1-83ce786f74ac" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_7340c6f0-86fe-4854-8d6f-0e70a243b65d" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_0f42b9fc-e295-4852-8fd1-83ce786f74ac" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_45930d8b-d888-40fe-9c29-8c95575be69b" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_7340c6f0-86fe-4854-8d6f-0e70a243b65d" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_45930d8b-d888-40fe-9c29-8c95575be69b" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNetInvestmentIncomeDetails" xlink:type="simple" xlink:href="nmih-20200331.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_138ac978-4087-4e0e-bd82-61acd7e10bbc" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_InvestmentIncomeNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeInterestAndDividend_7343b824-aec3-493f-9eeb-18efabc8f887" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_138ac978-4087-4e0e-bd82-61acd7e10bbc" xlink:to="loc_us-gaap_InvestmentIncomeInterestAndDividend_7343b824-aec3-493f-9eeb-18efabc8f887" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeInvestmentExpense_1d36af16-8a46-49ab-937c-ccadf15a0730" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_138ac978-4087-4e0e-bd82-61acd7e10bbc" xlink:to="loc_us-gaap_InvestmentIncomeInvestmentExpense_1d36af16-8a46-49ab-937c-ccadf15a0730" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNetRealizedInvestmentGainsLossesDetails" xlink:type="simple" xlink:href="nmih-20200331.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_780660fb-f466-4e11-888d-081c8811fe97" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGain_f3c53e05-3777-41bd-b71d-a2a0f01eb82a" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_780660fb-f466-4e11-888d-081c8811fe97" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGain_f3c53e05-3777-41bd-b71d-a2a0f01eb82a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedLoss_57685619-c773-4dc2-aab0-a1a24d1a90b3" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_780660fb-f466-4e11-888d-081c8811fe97" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedLoss_57685619-c773-4dc2-aab0-a1a24d1a90b3" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/FairValueofFinancialInstruments" xlink:type="simple" xlink:href="nmih-20200331.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-20200331.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-20200331.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_687aadcb-c8f1-4f06-a9c3-9f9ec03daad7" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LiabilitiesFairValueDisclosure"/>
    <link:loc xlink:type="locator" xlink:label="loc_nmih_WarrantLiability_70d6f558-7e3b-48d3-9c72-82bc6c56d268" xlink:href="nmih-20200331.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_687aadcb-c8f1-4f06-a9c3-9f9ec03daad7" xlink:to="loc_nmih_WarrantLiability_70d6f558-7e3b-48d3-9c72-82bc6c56d268" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsFairValueDisclosure_9956f247-aa4c-4c41-ba5f-22302887f7c9" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AssetsFairValueDisclosure"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_5aa4b2df-69bf-4a2e-835f-886136efcf3a" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_9956f247-aa4c-4c41-ba5f-22302887f7c9" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_5aa4b2df-69bf-4a2e-835f-886136efcf3a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsFairValueDisclosure_0015d346-14aa-4637-b90c-c960d52a5839" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_9956f247-aa4c-4c41-ba5f-22302887f7c9" xlink:to="loc_us-gaap_CashAndCashEquivalentsFairValueDisclosure_0015d346-14aa-4637-b90c-c960d52a5839" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/FairValueofFinancialInstrumentsRollforwardofLevel3LiabilitiesDetails" xlink:type="simple" xlink:href="nmih-20200331.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-20200331.xsd#FairValueofFinancialInstrumentsValuationAssumptionsforWarrantLiabilitiesDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/FairValueofFinancialInstrumentsValuationAssumptionsforWarrantLiabilitiesDetails" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/Debt" xlink:type="simple" xlink:href="nmih-20200331.xsd#Debt"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/Debt" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/DebtTables" xlink:type="simple" xlink:href="nmih-20200331.xsd#DebtTables"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/DebtTables" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/DebtNarrativeDetails" xlink:type="simple" xlink:href="nmih-20200331.xsd#DebtNarrativeDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/DebtNarrativeDetails" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/DebtScheduleofFuturePrincipalPaymentsDetails" xlink:type="simple" xlink:href="nmih-20200331.xsd#DebtScheduleofFuturePrincipalPaymentsDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/DebtScheduleofFuturePrincipalPaymentsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentCarryingAmount_1e8430f5-4280-45cd-8e8b-c85ba2a8deef" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtInstrumentCarryingAmount"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalRemainderOfFiscalYear_8afd7c3e-7a54-499b-8685-211ac14af51f" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalRemainderOfFiscalYear"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtInstrumentCarryingAmount_1e8430f5-4280-45cd-8e8b-c85ba2a8deef" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalRemainderOfFiscalYear_8afd7c3e-7a54-499b-8685-211ac14af51f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_dffedfc7-1b6e-40ca-8ab5-c6cbc19d91dc" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtInstrumentCarryingAmount_1e8430f5-4280-45cd-8e8b-c85ba2a8deef" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_dffedfc7-1b6e-40ca-8ab5-c6cbc19d91dc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_984d0bcb-c654-432a-a23c-e4c369e0ce58" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtInstrumentCarryingAmount_1e8430f5-4280-45cd-8e8b-c85ba2a8deef" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_984d0bcb-c654-432a-a23c-e4c369e0ce58" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour_982703e2-94f1-42a8-9606-5c17ce53de5e" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtInstrumentCarryingAmount_1e8430f5-4280-45cd-8e8b-c85ba2a8deef" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour_982703e2-94f1-42a8-9606-5c17ce53de5e" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/Reinsurance" xlink:type="simple" xlink:href="nmih-20200331.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-20200331.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-20200331.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_1b6438c5-4157-44f9-9f40-85e6b166933e" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PremiumsWrittenNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DirectPremiumsWritten_dabfc46e-5a98-49cd-95dd-cb9e3442162c" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_1b6438c5-4157-44f9-9f40-85e6b166933e" xlink:to="loc_us-gaap_DirectPremiumsWritten_dabfc46e-5a98-49cd-95dd-cb9e3442162c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CededPremiumsWritten_85228a16-c711-46ef-ab71-f239842b3934" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_1b6438c5-4157-44f9-9f40-85e6b166933e" xlink:to="loc_us-gaap_CededPremiumsWritten_85228a16-c711-46ef-ab71-f239842b3934" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PremiumsEarnedNet_6bdaba2d-ba40-4101-8bdd-af7456e4a672" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PremiumsEarnedNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DirectPremiumsEarned_0af94def-6032-44ff-a566-3b8c92bfbd63" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_6bdaba2d-ba40-4101-8bdd-af7456e4a672" xlink:to="loc_us-gaap_DirectPremiumsEarned_0af94def-6032-44ff-a566-3b8c92bfbd63" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CededPremiumsEarned_716c1198-c0ac-4d28-9f2c-82e768d28b83" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_6bdaba2d-ba40-4101-8bdd-af7456e4a672" xlink:to="loc_us-gaap_CededPremiumsEarned_716c1198-c0ac-4d28-9f2c-82e768d28b83" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReinsuranceNarrativeDetails" xlink:type="simple" xlink:href="nmih-20200331.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-20200331.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-20200331.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-20200331.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-20200331.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-20200331.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-20200331.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_PaymentsForLossesAndLossAdjustmentExpense_082b461e-3339-4319-a13d-6f69c6376659" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PaymentsForLossesAndLossAdjustmentExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidCurrentYear1_376fcdb7-cda6-4bf2-82e0-02d76e0715d8" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_082b461e-3339-4319-a13d-6f69c6376659" xlink:to="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidCurrentYear1_376fcdb7-cda6-4bf2-82e0-02d76e0715d8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidPriorYears1_01da0728-1114-44e0-9fad-142119948862" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_082b461e-3339-4319-a13d-6f69c6376659" xlink:to="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidPriorYears1_01da0728-1114-44e0-9fad-142119948862" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseNet_c127bbb7-1dd1-4f3c-98e6-65f24873323f" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_fc846a3d-305c-4c6e-a4fe-c7cbd86aa8aa" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_c127bbb7-1dd1-4f3c-98e6-65f24873323f" xlink:to="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_fc846a3d-305c-4c6e-a4fe-c7cbd86aa8aa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReinsuranceRecoverablesOnPaidAndUnpaidLosses_9689eac9-dd04-4367-b20f-d6b92d71e102" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_c127bbb7-1dd1-4f3c-98e6-65f24873323f" xlink:to="loc_us-gaap_ReinsuranceRecoverablesOnPaidAndUnpaidLosses_9689eac9-dd04-4367-b20f-d6b92d71e102" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaims1_adc495d0-737c-4590-82cb-c3730259ff74" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaims1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersCurrentYearClaimsAndClaimsAdjustmentExpense_89e530e5-bddc-42fe-9c8c-97b74310f6b3" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_adc495d0-737c-4590-82cb-c3730259ff74" xlink:to="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersCurrentYearClaimsAndClaimsAdjustmentExpense_89e530e5-bddc-42fe-9c8c-97b74310f6b3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense_b5f6047e-dcc5-48d9-ae91-ead866ecd2f7" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_adc495d0-737c-4590-82cb-c3730259ff74" xlink:to="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense_b5f6047e-dcc5-48d9-ae91-ead866ecd2f7" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/EarningsperShareEPS" xlink:type="simple" xlink:href="nmih-20200331.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-20200331.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-20200331.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_bd54fc26-df3b-4fa8-8492-a43cf6b9f387" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NetIncomeLossAttributableToParentDiluted"/>
    <link:loc xlink:type="locator" xlink:label="loc_nmih_GainFromChangeinFairValueofWarrantLiability_4ff71483-bf51-4aa8-afd7-bc667085ca97" xlink:href="nmih-20200331.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_bd54fc26-df3b-4fa8-8492-a43cf6b9f387" xlink:to="loc_nmih_GainFromChangeinFairValueofWarrantLiability_4ff71483-bf51-4aa8-afd7-bc667085ca97" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_e106cef6-edcd-4d44-bfa6-a4dcf701d197" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_bd54fc26-df3b-4fa8-8492-a43cf6b9f387" xlink:to="loc_us-gaap_NetIncomeLoss_e106cef6-edcd-4d44-bfa6-a4dcf701d197" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_8c492caa-ceb3-4d5e-9ce3-8c2f0b702560" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_65b94540-f777-466f-aa69-4480ac5c8e00" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_8c492caa-ceb3-4d5e-9ce3-8c2f0b702560" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_65b94540-f777-466f-aa69-4480ac5c8e00" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment_a9f25000-c700-4e9c-aa69-2d93e423f97d" xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-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_8c492caa-ceb3-4d5e-9ce3-8c2f0b702560" xlink:to="loc_us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment_a9f25000-c700-4e9c-aa69-2d93e423f97d" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.nationalmi.com/role/Warrants" xlink:type="simple" xlink:href="nmih-20200331.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-20200331.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-20200331.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-20200331.xsd#IncomeTaxesDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/IncomeTaxesDetails" xlink:type="extended"/>
  <link:roleRef roleURI="http://www.nationalmi.com/role/RegulatoryInformation" xlink:type="simple" xlink:href="nmih-20200331.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-20200331.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-20200331.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-20200331.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-20200331.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-20200331.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-20200331.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-20200331.xsd#SubsequentEventDetails"/>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/SubsequentEventDetails" xlink:type="extended"/>
</link:linkbase>
