<?xml version="1.0" encoding="US-ASCII"?>
<!--XBRL Document Created with Wdesk from Workiva-->
<!-- -->
<link:linkbase xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd" 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">
  <link:roleRef roleURI="http://www.nationalmi.com/role/CommonStockOfferings" xlink:href="nmih-20180930.xsd#CommonStockOfferings" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/CommonStockOfferingsNarrativeDetails" xlink:href="nmih-20180930.xsd#CommonStockOfferingsNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/CondensedConsolidatedBalanceSheetsUnaudited" xlink:href="nmih-20180930.xsd#CondensedConsolidatedBalanceSheetsUnaudited" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/CondensedConsolidatedBalanceSheetsUnauditedParenthetical" xlink:href="nmih-20180930.xsd#CondensedConsolidatedBalanceSheetsUnauditedParenthetical" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfCashFlowsUnaudited" xlink:href="nmih-20180930.xsd#CondensedConsolidatedStatementsOfCashFlowsUnaudited" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfChangesInShareholdersEquityUnaudited" xlink:href="nmih-20180930.xsd#CondensedConsolidatedStatementsOfChangesInShareholdersEquityUnaudited" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfChangesInShareholdersEquityUnauditedParenthetical" xlink:href="nmih-20180930.xsd#CondensedConsolidatedStatementsOfChangesInShareholdersEquityUnauditedParenthetical" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfOperationsAndComprehensiveIncomeUnaudited" xlink:href="nmih-20180930.xsd#CondensedConsolidatedStatementsOfOperationsAndComprehensiveIncomeUnaudited" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfOperationsAndComprehensiveIncomeUnauditedParenthetical" xlink:href="nmih-20180930.xsd#CondensedConsolidatedStatementsOfOperationsAndComprehensiveIncomeUnauditedParenthetical" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/DebtObligations" xlink:href="nmih-20180930.xsd#DebtObligations" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/DebtObligationsNarrativeDetails" xlink:href="nmih-20180930.xsd#DebtObligationsNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/DebtObligationsScheduleOfFuturePrincipalPaymentsDetails" xlink:href="nmih-20180930.xsd#DebtObligationsScheduleOfFuturePrincipalPaymentsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/DebtObligationsTables" xlink:href="nmih-20180930.xsd#DebtObligationsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/DocumentAndEntityInformation" xlink:href="nmih-20180930.xsd#DocumentAndEntityInformation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/EarningsPerShareEps" xlink:href="nmih-20180930.xsd#EarningsPerShareEps" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/EarningsPerShareEpsComputationOfBasicAndDilutedEarningsLossPerShareDetails" xlink:href="nmih-20180930.xsd#EarningsPerShareEpsComputationOfBasicAndDilutedEarningsLossPerShareDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/EarningsPerShareEpsTables" xlink:href="nmih-20180930.xsd#EarningsPerShareEpsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstruments" xlink:href="nmih-20180930.xsd#FairValueOfFinancialInstruments" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsAssetsAndLiabilitiesAtFairValueDetails" xlink:href="nmih-20180930.xsd#FairValueOfFinancialInstrumentsAssetsAndLiabilitiesAtFairValueDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsRollforwardOfLevel3LiabilitiesDetails" xlink:href="nmih-20180930.xsd#FairValueOfFinancialInstrumentsRollforwardOfLevel3LiabilitiesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsTables" xlink:href="nmih-20180930.xsd#FairValueOfFinancialInstrumentsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsValuationAssumptionsForWarrantLiabilitiesDetails" xlink:href="nmih-20180930.xsd#FairValueOfFinancialInstrumentsValuationAssumptionsForWarrantLiabilitiesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxes" xlink:href="nmih-20180930.xsd#IncomeTaxes" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxesNarrativeDetails" xlink:href="nmih-20180930.xsd#IncomeTaxesNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/Investments" xlink:href="nmih-20180930.xsd#Investments" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsAgingOfUnrealizedLossesDetails" xlink:href="nmih-20180930.xsd#InvestmentsAgingOfUnrealizedLossesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsFairValuesAndGrossUnrealizedGainsAndLossesDetails" xlink:href="nmih-20180930.xsd#InvestmentsFairValuesAndGrossUnrealizedGainsAndLossesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNarrativeDetails" xlink:href="nmih-20180930.xsd#InvestmentsNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNetInvestmentIncomeDetails" xlink:href="nmih-20180930.xsd#InvestmentsNetInvestmentIncomeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNetRealizedInvestmentGainsLossesDetails" xlink:href="nmih-20180930.xsd#InvestmentsNetRealizedInvestmentGainsLossesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsScheduledMaturitiesDetails" xlink:href="nmih-20180930.xsd#InvestmentsScheduledMaturitiesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsTables" xlink:href="nmih-20180930.xsd#InvestmentsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/OrganizationBasisOfPresentationAndSummaryOfAccountingPrinciples" xlink:href="nmih-20180930.xsd#OrganizationBasisOfPresentationAndSummaryOfAccountingPrinciples" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/OrganizationBasisOfPresentationAndSummaryOfAccountingPrinciplesNarrativeDetails" xlink:href="nmih-20180930.xsd#OrganizationBasisOfPresentationAndSummaryOfAccountingPrinciplesNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/OrganizationBasisOfPresentationAndSummaryOfAccountingPrinciplesPolicies" xlink:href="nmih-20180930.xsd#OrganizationBasisOfPresentationAndSummaryOfAccountingPrinciplesPolicies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/OrganizationBasisOfPresentationAndSummaryOfAccountingPrinciplesRecentAccountingPronouncementsDetails" xlink:href="nmih-20180930.xsd#OrganizationBasisOfPresentationAndSummaryOfAccountingPrinciplesRecentAccountingPronouncementsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/RegulatoryInformation" xlink:href="nmih-20180930.xsd#RegulatoryInformation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/RegulatoryInformationScheduleOfStatutorySurplusContingencyReserveAndRtcRatioDetails" xlink:href="nmih-20180930.xsd#RegulatoryInformationScheduleOfStatutorySurplusContingencyReserveAndRtcRatioDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/RegulatoryInformationStatutoryNetIncomeLossDetails" xlink:href="nmih-20180930.xsd#RegulatoryInformationStatutoryNetIncomeLossDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/RegulatoryInformationTables" xlink:href="nmih-20180930.xsd#RegulatoryInformationTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/Reinsurance" xlink:href="nmih-20180930.xsd#Reinsurance" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReinsuranceAmountsCededRelatedToQsrTransactionsDetails" xlink:href="nmih-20180930.xsd#ReinsuranceAmountsCededRelatedToQsrTransactionsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReinsuranceEffectOfReinsuranceOnNetPremiumsWrittenAndEarnedDetails" xlink:href="nmih-20180930.xsd#ReinsuranceEffectOfReinsuranceOnNetPremiumsWrittenAndEarnedDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReinsuranceNarrativeDetails" xlink:href="nmih-20180930.xsd#ReinsuranceNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReinsuranceTables" xlink:href="nmih-20180930.xsd#ReinsuranceTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpenses" xlink:href="nmih-20180930.xsd#ReservesForInsuranceClaimsAndClaimExpenses" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesNarrativeDetails" xlink:href="nmih-20180930.xsd#ReservesForInsuranceClaimsAndClaimExpensesNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesReconciliationOfReserveBalancesForInsuranceClaimsExpenseDetails" xlink:href="nmih-20180930.xsd#ReservesForInsuranceClaimsAndClaimExpensesReconciliationOfReserveBalancesForInsuranceClaimsExpenseDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesTables" xlink:href="nmih-20180930.xsd#ReservesForInsuranceClaimsAndClaimExpensesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/Warrants" xlink:href="nmih-20180930.xsd#Warrants" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/WarrantsNarrativeDetails" xlink:href="nmih-20180930.xsd#WarrantsNarrativeDetails" xlink:type="simple" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CommonStockOfferings" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CommonStockOfferingsNarrativeDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CondensedConsolidatedBalanceSheetsUnaudited" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilitiesAndStockholdersEquity" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_63817d40-f759-fa9c-45a5-8bbbb36ed5c9" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CommitmentsAndContingencies" xlink:label="loc_us-gaap_CommitmentsAndContingencies_f0c68f4f-7ec1-d447-8ba7-0f2766abbe67" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_63817d40-f759-fa9c-45a5-8bbbb36ed5c9" xlink:to="loc_us-gaap_CommitmentsAndContingencies_f0c68f4f-7ec1-d447-8ba7-0f2766abbe67" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Liabilities" xlink:label="loc_us-gaap_Liabilities_066608da-f041-4af6-3da0-95354b640e11" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_63817d40-f759-fa9c-45a5-8bbbb36ed5c9" xlink:to="loc_us-gaap_Liabilities_066608da-f041-4af6-3da0-95354b640e11" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LongTermDebt" xlink:label="loc_us-gaap_LongTermDebt_80dca0ba-44dc-8565-fb9b-c2edfc8c357d" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_066608da-f041-4af6-3da0-95354b640e11" xlink:to="loc_us-gaap_LongTermDebt_80dca0ba-44dc-8565-fb9b-c2edfc8c357d" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_UnearnedPremiums" xlink:label="loc_us-gaap_UnearnedPremiums_971afb55-74d6-e86a-b335-58921428ee57" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_066608da-f041-4af6-3da0-95354b640e11" xlink:to="loc_us-gaap_UnearnedPremiums_971afb55-74d6-e86a-b335-58921428ee57" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent" xlink:label="loc_us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent_7295b0b0-7ba8-8b4e-d5aa-1b0ae51fb151" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_066608da-f041-4af6-3da0-95354b640e11" xlink:to="loc_us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent_7295b0b0-7ba8-8b4e-d5aa-1b0ae51fb151" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense" xlink:label="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_0e9cc685-b5db-2672-c796-f60383eb4f21" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_066608da-f041-4af6-3da0-95354b640e11" xlink:to="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_0e9cc685-b5db-2672-c796-f60383eb4f21" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FundsHeldUnderReinsuranceAgreementsLiability" xlink:label="loc_us-gaap_FundsHeldUnderReinsuranceAgreementsLiability_edc26944-ce43-3c1a-e042-200ea26eeb4a" xlink:type="locator" />
    <link:calculationArc order="5" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_066608da-f041-4af6-3da0-95354b640e11" xlink:to="loc_us-gaap_FundsHeldUnderReinsuranceAgreementsLiability_edc26944-ce43-3c1a-e042-200ea26eeb4a" xlink:type="arc" />
    <link:loc xlink:href="nmih-20180930.xsd#nmih_DeferredCedingCommission" xlink:label="loc_nmih_DeferredCedingCommission_BC0E0B1BCD9F83F99FAEC178A3DD1C42" xlink:type="locator" />
    <link:calculationArc order="6" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_066608da-f041-4af6-3da0-95354b640e11" xlink:to="loc_nmih_DeferredCedingCommission_BC0E0B1BCD9F83F99FAEC178A3DD1C42" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_WarrantsAndRightsOutstanding" xlink:label="loc_us-gaap_WarrantsAndRightsOutstanding_e955c293-6e20-6623-80a7-235affaf2074" xlink:type="locator" />
    <link:calculationArc order="7" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_066608da-f041-4af6-3da0-95354b640e11" xlink:to="loc_us-gaap_WarrantsAndRightsOutstanding_e955c293-6e20-6623-80a7-235affaf2074" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StockholdersEquity" xlink:label="loc_us-gaap_StockholdersEquity_6765f135-8c69-bebc-a116-d59a52a5b2f2" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_63817d40-f759-fa9c-45a5-8bbbb36ed5c9" xlink:to="loc_us-gaap_StockholdersEquity_6765f135-8c69-bebc-a116-d59a52a5b2f2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CommonStockValueOutstanding" xlink:label="loc_us-gaap_CommonStockValueOutstanding_55fda19b-3ba6-61b5-220d-6f7ed397180a" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_6765f135-8c69-bebc-a116-d59a52a5b2f2" xlink:to="loc_us-gaap_CommonStockValueOutstanding_55fda19b-3ba6-61b5-220d-6f7ed397180a" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AdditionalPaidInCapital" xlink:label="loc_us-gaap_AdditionalPaidInCapital_6dca832a-861c-478d-b1a0-396533beb40d" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_6765f135-8c69-bebc-a116-d59a52a5b2f2" xlink:to="loc_us-gaap_AdditionalPaidInCapital_6dca832a-861c-478d-b1a0-396533beb40d" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_798442bf-12e1-d944-3fa1-8b797b67482e" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_6765f135-8c69-bebc-a116-d59a52a5b2f2" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_798442bf-12e1-d944-3fa1-8b797b67482e" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RetainedEarningsAccumulatedDeficit" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_a59bc5ae-63a0-c9bc-32f7-e2bd9f32bd26" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_6765f135-8c69-bebc-a116-d59a52a5b2f2" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_a59bc5ae-63a0-c9bc-32f7-e2bd9f32bd26" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Assets" xlink:label="loc_us-gaap_Assets_96dd7052-744e-d270-4e77-67944ec39152" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_5ab305fa-195a-59cf-c0de-4b5d05fc9de4" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_96dd7052-744e-d270-4e77-67944ec39152" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_5ab305fa-195a-59cf-c0de-4b5d05fc9de4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_1ce4b89e-fa52-7101-5bea-622168a4559a" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_96dd7052-744e-d270-4e77-67944ec39152" xlink:to="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_1ce4b89e-fa52-7101-5bea-622168a4559a" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PremiumsReceivableAtCarryingValue" xlink:label="loc_us-gaap_PremiumsReceivableAtCarryingValue_e19db919-1b7c-3d09-e85d-b435fc46840b" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_96dd7052-744e-d270-4e77-67944ec39152" xlink:to="loc_us-gaap_PremiumsReceivableAtCarryingValue_e19db919-1b7c-3d09-e85d-b435fc46840b" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccruedInvestmentIncomeReceivable" xlink:label="loc_us-gaap_AccruedInvestmentIncomeReceivable_5194a9fc-115c-f59a-adef-21b602d3ebcc" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_96dd7052-744e-d270-4e77-67944ec39152" xlink:to="loc_us-gaap_AccruedInvestmentIncomeReceivable_5194a9fc-115c-f59a-adef-21b602d3ebcc" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PrepaidExpenseCurrentAndNoncurrent" xlink:label="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_6576f39d-8ad7-c1e1-0d5f-2a115ee0b7d5" xlink:type="locator" />
    <link:calculationArc order="5" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_96dd7052-744e-d270-4e77-67944ec39152" xlink:to="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_6576f39d-8ad7-c1e1-0d5f-2a115ee0b7d5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredPolicyAcquisitionCosts" xlink:label="loc_us-gaap_DeferredPolicyAcquisitionCosts_b2fc55ab-ba41-790f-5ddd-d985dc995676" xlink:type="locator" />
    <link:calculationArc order="6" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_96dd7052-744e-d270-4e77-67944ec39152" xlink:to="loc_us-gaap_DeferredPolicyAcquisitionCosts_b2fc55ab-ba41-790f-5ddd-d985dc995676" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_f37ad080-c77a-efc5-c936-389b16abc420" xlink:type="locator" />
    <link:calculationArc order="7" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_96dd7052-744e-d270-4e77-67944ec39152" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_f37ad080-c77a-efc5-c936-389b16abc420" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IntangibleAssetsNetIncludingGoodwill" xlink:label="loc_us-gaap_IntangibleAssetsNetIncludingGoodwill_cb59c411-be61-59fa-38c9-6346bc0b7f01" xlink:type="locator" />
    <link:calculationArc order="8" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_96dd7052-744e-d270-4e77-67944ec39152" xlink:to="loc_us-gaap_IntangibleAssetsNetIncludingGoodwill_cb59c411-be61-59fa-38c9-6346bc0b7f01" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PrepaidReinsurancePremiums" xlink:label="loc_us-gaap_PrepaidReinsurancePremiums_2f120656-cfe3-d8bd-00ae-0dcdda2f1993" xlink:type="locator" />
    <link:calculationArc order="9" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_96dd7052-744e-d270-4e77-67944ec39152" xlink:to="loc_us-gaap_PrepaidReinsurancePremiums_2f120656-cfe3-d8bd-00ae-0dcdda2f1993" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredIncomeTaxAssetsNet" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_6544a746-9524-1b61-e235-04d48d39f116" xlink:type="locator" />
    <link:calculationArc order="10" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_96dd7052-744e-d270-4e77-67944ec39152" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_6544a746-9524-1b61-e235-04d48d39f116" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherAssets" xlink:label="loc_us-gaap_OtherAssets_806083e9-63fa-5acf-a0c8-803a67715508" xlink:type="locator" />
    <link:calculationArc order="11" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_96dd7052-744e-d270-4e77-67944ec39152" xlink:to="loc_us-gaap_OtherAssets_806083e9-63fa-5acf-a0c8-803a67715508" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CondensedConsolidatedBalanceSheetsUnauditedParenthetical" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfCashFlowsUnaudited" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_9743d583-dfae-6ae9-f133-a1e331df792c" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_1bd0bd4e-4a6f-b052-029c-0ecb0c520251" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_9743d583-dfae-6ae9-f133-a1e331df792c" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_1bd0bd4e-4a6f-b052-029c-0ecb0c520251" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_a10eea14-f4db-3125-d183-77bb54500e95" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_1bd0bd4e-4a6f-b052-029c-0ecb0c520251" xlink:to="loc_us-gaap_NetIncomeLoss_a10eea14-f4db-3125-d183-77bb54500e95" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss_8eff9c0e-c63c-929d-b4a0-4ab6acadc24d" xlink:type="locator" />
    <link:calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_1bd0bd4e-4a6f-b052-029c-0ecb0c520251" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss_8eff9c0e-c63c-929d-b4a0-4ab6acadc24d" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FairValueAdjustmentOfWarrants" xlink:label="loc_us-gaap_FairValueAdjustmentOfWarrants_2d563f7c-9c66-4ccb-995c-599c680a5434" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_1bd0bd4e-4a6f-b052-029c-0ecb0c520251" xlink:to="loc_us-gaap_FairValueAdjustmentOfWarrants_2d563f7c-9c66-4ccb-995c-599c680a5434" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DepreciationAmortizationAndAccretionNet" xlink:label="loc_us-gaap_DepreciationAmortizationAndAccretionNet_eb909908-629e-b0dc-c0ba-a7cb50bec143" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_1bd0bd4e-4a6f-b052-029c-0ecb0c520251" xlink:to="loc_us-gaap_DepreciationAmortizationAndAccretionNet_eb909908-629e-b0dc-c0ba-a7cb50bec143" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments" xlink:label="loc_us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments_4f3832d5-e2fd-470b-5e04-ece38e7ab02d" xlink:type="locator" />
    <link:calculationArc order="5" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_1bd0bd4e-4a6f-b052-029c-0ecb0c520251" xlink:to="loc_us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments_4f3832d5-e2fd-470b-5e04-ece38e7ab02d" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AmortizationOfFinancingCostsAndDiscounts" xlink:label="loc_us-gaap_AmortizationOfFinancingCostsAndDiscounts_1b3da715-8d28-869a-fc9e-cb75bcd8d652" xlink:type="locator" />
    <link:calculationArc order="6" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_1bd0bd4e-4a6f-b052-029c-0ecb0c520251" xlink:to="loc_us-gaap_AmortizationOfFinancingCostsAndDiscounts_1b3da715-8d28-869a-fc9e-cb75bcd8d652" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensation" xlink:label="loc_us-gaap_ShareBasedCompensation_90cbc3ab-f555-6407-b3b4-b2bfa84c9f18" xlink:type="locator" />
    <link:calculationArc order="7" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_1bd0bd4e-4a6f-b052-029c-0ecb0c520251" xlink:to="loc_us-gaap_ShareBasedCompensation_90cbc3ab-f555-6407-b3b4-b2bfa84c9f18" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredIncomeTaxesAndTaxCredits" xlink:label="loc_us-gaap_DeferredIncomeTaxesAndTaxCredits_d346b6a0-4ddf-16a5-9e91-c8c6b50db7a6" xlink:type="locator" />
    <link:calculationArc order="8" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_1bd0bd4e-4a6f-b052-029c-0ecb0c520251" xlink:to="loc_us-gaap_DeferredIncomeTaxesAndTaxCredits_d346b6a0-4ddf-16a5-9e91-c8c6b50db7a6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInPremiumsReceivable" xlink:label="loc_us-gaap_IncreaseDecreaseInPremiumsReceivable_ce3a343e-fc6f-6f05-00b3-65e559640765" xlink:type="locator" />
    <link:calculationArc order="9" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_1bd0bd4e-4a6f-b052-029c-0ecb0c520251" xlink:to="loc_us-gaap_IncreaseDecreaseInPremiumsReceivable_ce3a343e-fc6f-6f05-00b3-65e559640765" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable_20e8f9c6-f3c8-30ae-5ab6-0f885744eb73" xlink:type="locator" />
    <link:calculationArc order="10" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_1bd0bd4e-4a6f-b052-029c-0ecb0c520251" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable_20e8f9c6-f3c8-30ae-5ab6-0f885744eb73" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInPrepaidExpense" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidExpense_f2f5c0d1-023d-ee70-251c-234ad5970f07" xlink:type="locator" />
    <link:calculationArc order="11" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_1bd0bd4e-4a6f-b052-029c-0ecb0c520251" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidExpense_f2f5c0d1-023d-ee70-251c-234ad5970f07" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInDeferredPolicyAcquisitionCosts" xlink:label="loc_us-gaap_IncreaseDecreaseInDeferredPolicyAcquisitionCosts_346aec64-9c0e-b181-4b91-d2db72baf819" xlink:type="locator" />
    <link:calculationArc order="12" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_1bd0bd4e-4a6f-b052-029c-0ecb0c520251" xlink:to="loc_us-gaap_IncreaseDecreaseInDeferredPolicyAcquisitionCosts_346aec64-9c0e-b181-4b91-d2db72baf819" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_0e4168a9-901d-abb5-15c0-3622e9e2c070" xlink:type="locator" />
    <link:calculationArc order="13" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_1bd0bd4e-4a6f-b052-029c-0ecb0c520251" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_0e4168a9-901d-abb5-15c0-3622e9e2c070" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInUnearnedPremiums" xlink:label="loc_us-gaap_IncreaseDecreaseInUnearnedPremiums_d8c1edf4-8d8f-6ac8-a6ab-d3f29cd38681" xlink:type="locator" />
    <link:calculationArc order="14" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_1bd0bd4e-4a6f-b052-029c-0ecb0c520251" xlink:to="loc_us-gaap_IncreaseDecreaseInUnearnedPremiums_d8c1edf4-8d8f-6ac8-a6ab-d3f29cd38681" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInLiabilityForClaimsAndClaimsAdjustmentExpenseReserve" xlink:label="loc_us-gaap_IncreaseDecreaseInLiabilityForClaimsAndClaimsAdjustmentExpenseReserve_d5425a7a-b1dd-a787-4ad5-45caecd4da69" xlink:type="locator" />
    <link:calculationArc order="15" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_1bd0bd4e-4a6f-b052-029c-0ecb0c520251" xlink:to="loc_us-gaap_IncreaseDecreaseInLiabilityForClaimsAndClaimsAdjustmentExpenseReserve_d5425a7a-b1dd-a787-4ad5-45caecd4da69" xlink:type="arc" />
    <link:loc xlink:href="nmih-20180930.xsd#nmih_IncreaseDecreaseinReinsuranceAssetsandLiabilities" xlink:label="loc_nmih_IncreaseDecreaseinReinsuranceAssetsandLiabilities_080a9cbc-1c85-1c9d-3799-f2e551041eca" xlink:type="locator" />
    <link:calculationArc order="16" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_1bd0bd4e-4a6f-b052-029c-0ecb0c520251" xlink:to="loc_nmih_IncreaseDecreaseinReinsuranceAssetsandLiabilities_080a9cbc-1c85-1c9d-3799-f2e551041eca" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_91c354d1-d18f-051e-80cb-f13c01058b9d" xlink:type="locator" />
    <link:calculationArc order="17" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_1bd0bd4e-4a6f-b052-029c-0ecb0c520251" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_91c354d1-d18f-051e-80cb-f13c01058b9d" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_28655e34-499f-b7bf-c54f-5de0990d0c65" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_9743d583-dfae-6ae9-f133-a1e331df792c" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_28655e34-499f-b7bf-c54f-5de0990d0c65" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsToAcquireShortTermInvestments" xlink:label="loc_us-gaap_PaymentsToAcquireShortTermInvestments_be1e089d-7248-1092-ce64-fb2f29251191" xlink:type="locator" />
    <link:calculationArc order="1" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_28655e34-499f-b7bf-c54f-5de0990d0c65" xlink:to="loc_us-gaap_PaymentsToAcquireShortTermInvestments_be1e089d-7248-1092-ce64-fb2f29251191" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt" xlink:label="loc_us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt_5a6cca43-79c5-34f3-6172-5859b13486b1" xlink:type="locator" />
    <link:calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_28655e34-499f-b7bf-c54f-5de0990d0c65" xlink:to="loc_us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt_5a6cca43-79c5-34f3-6172-5859b13486b1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromSaleOfShortTermInvestments" xlink:label="loc_us-gaap_ProceedsFromSaleOfShortTermInvestments_770a1311-e7a6-f51d-9210-badc4db6ccdb" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_28655e34-499f-b7bf-c54f-5de0990d0c65" xlink:to="loc_us-gaap_ProceedsFromSaleOfShortTermInvestments_770a1311-e7a6-f51d-9210-badc4db6ccdb" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromSaleAndMaturityOfAvailableForSaleSecurities" xlink:label="loc_us-gaap_ProceedsFromSaleAndMaturityOfAvailableForSaleSecurities_c4aa0718-f1b7-8481-8382-216f94e41c89" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_28655e34-499f-b7bf-c54f-5de0990d0c65" xlink:to="loc_us-gaap_ProceedsFromSaleAndMaturityOfAvailableForSaleSecurities_c4aa0718-f1b7-8481-8382-216f94e41c89" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsToAcquirePropertyPlantAndEquipment" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_6d89f221-3ede-36b2-fcad-4a4ce1606f6a" xlink:type="locator" />
    <link:calculationArc order="5" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_28655e34-499f-b7bf-c54f-5de0990d0c65" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_6d89f221-3ede-36b2-fcad-4a4ce1606f6a" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_d8917e24-06dd-060d-a290-e426c7895e54" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_9743d583-dfae-6ae9-f133-a1e331df792c" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_d8917e24-06dd-060d-a290-e426c7895e54" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromIssuanceOfCommonStock" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_6ec8bc8e-bcd9-36ad-d8ae-2c2fa1dfd920" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_d8917e24-06dd-060d-a290-e426c7895e54" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_6ec8bc8e-bcd9-36ad-d8ae-2c2fa1dfd920" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlansIncludingStockOptions" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlansIncludingStockOptions_ee462479-f066-2ef4-feb4-a24474e585e7" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_d8917e24-06dd-060d-a290-e426c7895e54" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlansIncludingStockOptions_ee462479-f066-2ef4-feb4-a24474e585e7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromWarrantExercises" xlink:label="loc_us-gaap_ProceedsFromWarrantExercises_29fc0ccf-d68e-39c1-8f4d-25c014f2bb16" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_d8917e24-06dd-060d-a290-e426c7895e54" xlink:to="loc_us-gaap_ProceedsFromWarrantExercises_29fc0ccf-d68e-39c1-8f4d-25c014f2bb16" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation" xlink:label="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_43305c85-41ff-3d0f-c464-dc8983363bce" xlink:type="locator" />
    <link:calculationArc order="4" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_d8917e24-06dd-060d-a290-e426c7895e54" xlink:to="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_43305c85-41ff-3d0f-c464-dc8983363bce" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromIssuanceOfSeniorLongTermDebt" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfSeniorLongTermDebt_c8c43132-aa8a-b4ee-0a5f-e68cf7aa621d" xlink:type="locator" />
    <link:calculationArc order="5" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_d8917e24-06dd-060d-a290-e426c7895e54" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfSeniorLongTermDebt_c8c43132-aa8a-b4ee-0a5f-e68cf7aa621d" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RepaymentsOfLongTermDebt" xlink:label="loc_us-gaap_RepaymentsOfLongTermDebt_cfa1e746-5920-c3b5-33ed-a7dee018f26c" xlink:type="locator" />
    <link:calculationArc order="6" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_d8917e24-06dd-060d-a290-e426c7895e54" xlink:to="loc_us-gaap_RepaymentsOfLongTermDebt_cfa1e746-5920-c3b5-33ed-a7dee018f26c" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsOfDebtIssuanceCosts" xlink:label="loc_us-gaap_PaymentsOfDebtIssuanceCosts_6accd1a2-f190-7888-29dd-29802af49bdc" xlink:type="locator" />
    <link:calculationArc order="7" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_d8917e24-06dd-060d-a290-e426c7895e54" xlink:to="loc_us-gaap_PaymentsOfDebtIssuanceCosts_6accd1a2-f190-7888-29dd-29802af49bdc" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfChangesInShareholdersEquityUnaudited" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfChangesInShareholdersEquityUnauditedParenthetical" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfOperationsAndComprehensiveIncomeUnaudited" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ComprehensiveIncomeNetOfTax" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_cf605d39-9067-2f07-a6b5-7dfa6481009e" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_a10eea14-f4db-3125-d183-77bb54500e95" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_cf605d39-9067-2f07-a6b5-7dfa6481009e" xlink:to="loc_us-gaap_NetIncomeLoss_a10eea14-f4db-3125-d183-77bb54500e95" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_4d8b6d19-6a54-06aa-2077-c10380bd20d1" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_a10eea14-f4db-3125-d183-77bb54500e95" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_4d8b6d19-6a54-06aa-2077-c10380bd20d1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Revenues" xlink:label="loc_us-gaap_Revenues_435f940b-a471-4122-5132-a245458f6913" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_4d8b6d19-6a54-06aa-2077-c10380bd20d1" xlink:to="loc_us-gaap_Revenues_435f940b-a471-4122-5132-a245458f6913" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PremiumsEarnedNet" xlink:label="loc_us-gaap_PremiumsEarnedNet_2443e898-efcc-6a58-8d5f-3a8e06da999a" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Revenues_435f940b-a471-4122-5132-a245458f6913" xlink:to="loc_us-gaap_PremiumsEarnedNet_2443e898-efcc-6a58-8d5f-3a8e06da999a" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetInvestmentIncome" xlink:label="loc_us-gaap_NetInvestmentIncome_0779cbb1-ab49-dff5-459c-82b1cf8f776c" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Revenues_435f940b-a471-4122-5132-a245458f6913" xlink:to="loc_us-gaap_NetInvestmentIncome_0779cbb1-ab49-dff5-459c-82b1cf8f776c" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GainLossOnInvestments" xlink:label="loc_us-gaap_GainLossOnInvestments_7b996bea-e1a6-f08b-4e6b-a307dfbe0ae3" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Revenues_435f940b-a471-4122-5132-a245458f6913" xlink:to="loc_us-gaap_GainLossOnInvestments_7b996bea-e1a6-f08b-4e6b-a307dfbe0ae3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherIncome" xlink:label="loc_us-gaap_OtherIncome_bb610d99-851f-be70-f405-1d0649f0a727" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Revenues_435f940b-a471-4122-5132-a245458f6913" xlink:to="loc_us-gaap_OtherIncome_bb610d99-851f-be70-f405-1d0649f0a727" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CostsAndExpenses" xlink:label="loc_us-gaap_CostsAndExpenses_8823ccfd-55af-348e-39a2-91433072d2c9" xlink:type="locator" />
    <link:calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_4d8b6d19-6a54-06aa-2077-c10380bd20d1" xlink:to="loc_us-gaap_CostsAndExpenses_8823ccfd-55af-348e-39a2-91433072d2c9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncurredClaimsPropertyCasualtyAndLiability" xlink:label="loc_us-gaap_IncurredClaimsPropertyCasualtyAndLiability_c9eaffca-bbcd-c9c3-7972-ea134c535e66" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_8823ccfd-55af-348e-39a2-91433072d2c9" xlink:to="loc_us-gaap_IncurredClaimsPropertyCasualtyAndLiability_c9eaffca-bbcd-c9c3-7972-ea134c535e66" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherCostAndExpenseOperating" xlink:label="loc_us-gaap_OtherCostAndExpenseOperating_93000e3a-91b4-7752-a2af-ee913adc84f8" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_8823ccfd-55af-348e-39a2-91433072d2c9" xlink:to="loc_us-gaap_OtherCostAndExpenseOperating_93000e3a-91b4-7752-a2af-ee913adc84f8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherNonoperatingIncomeExpense" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_41e96f8d-e499-8de8-69a8-27f1c7d4df6e" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_4d8b6d19-6a54-06aa-2077-c10380bd20d1" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_41e96f8d-e499-8de8-69a8-27f1c7d4df6e" xlink:type="arc" />
    <link:loc xlink:href="nmih-20180930.xsd#nmih_GainLossonChangeinFairValueofWarrantLiability" xlink:label="loc_nmih_GainLossonChangeinFairValueofWarrantLiability_7c81e388-a4da-166f-9302-f2e551a976d9" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherNonoperatingIncomeExpense_41e96f8d-e499-8de8-69a8-27f1c7d4df6e" xlink:to="loc_nmih_GainLossonChangeinFairValueofWarrantLiability_7c81e388-a4da-166f-9302-f2e551a976d9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InterestExpense" xlink:label="loc_us-gaap_InterestExpense_a56b34b7-57ab-a07c-7f03-8366849a14f0" xlink:type="locator" />
    <link:calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherNonoperatingIncomeExpense_41e96f8d-e499-8de8-69a8-27f1c7d4df6e" xlink:to="loc_us-gaap_InterestExpense_a56b34b7-57ab-a07c-7f03-8366849a14f0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_97bbae57-7f84-4da9-acab-610e56204929" xlink:type="locator" />
    <link:calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_a10eea14-f4db-3125-d183-77bb54500e95" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_97bbae57-7f84-4da9-acab-610e56204929" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_59645a08-ce25-9000-2f65-e4bfddb1182e" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_cf605d39-9067-2f07-a6b5-7dfa6481009e" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_59645a08-ce25-9000-2f65-e4bfddb1182e" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax_6df44786-4260-4fa4-e123-591abd5e882d" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_59645a08-ce25-9000-2f65-e4bfddb1182e" xlink:to="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax_6df44786-4260-4fa4-e123-591abd5e882d" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax_5018ac42-f22a-8f01-2030-b43a520a4ea1" xlink:type="locator" />
    <link:calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_59645a08-ce25-9000-2f65-e4bfddb1182e" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax_5018ac42-f22a-8f01-2030-b43a520a4ea1" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfOperationsAndComprehensiveIncomeUnauditedParenthetical" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/DebtObligations" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/DebtObligationsNarrativeDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/DebtObligationsScheduleOfFuturePrincipalPaymentsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtInstrumentCarryingAmount" xlink:label="loc_us-gaap_DebtInstrumentCarryingAmount_88b8f1df-ff6f-5cd6-e45f-5878f70c11d5" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalRemainderOfFiscalYear" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalRemainderOfFiscalYear_e46af42d-23ea-a83b-9ce7-b8a6424fb942" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtInstrumentCarryingAmount_88b8f1df-ff6f-5cd6-e45f-5878f70c11d5" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalRemainderOfFiscalYear_e46af42d-23ea-a83b-9ce7-b8a6424fb942" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_53634569-cdf7-3d1b-42b0-596cb4175c67" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtInstrumentCarryingAmount_88b8f1df-ff6f-5cd6-e45f-5878f70c11d5" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_53634569-cdf7-3d1b-42b0-596cb4175c67" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_c4573bf7-1f66-8dfe-59b9-b6903f55406f" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtInstrumentCarryingAmount_88b8f1df-ff6f-5cd6-e45f-5878f70c11d5" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_c4573bf7-1f66-8dfe-59b9-b6903f55406f" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour_e00da32d-ed06-bb21-8b28-7e7ede769972" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtInstrumentCarryingAmount_88b8f1df-ff6f-5cd6-e45f-5878f70c11d5" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour_e00da32d-ed06-bb21-8b28-7e7ede769972" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive_89018c92-f86f-28e7-853c-438f4a34e1f6" xlink:type="locator" />
    <link:calculationArc order="5" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtInstrumentCarryingAmount_88b8f1df-ff6f-5cd6-e45f-5878f70c11d5" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive_89018c92-f86f-28e7-853c-438f4a34e1f6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalAfterYearFive" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalAfterYearFive_3b793654-c1ac-69c9-9cf3-81e6dfe102d7" xlink:type="locator" />
    <link:calculationArc order="6" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtInstrumentCarryingAmount_88b8f1df-ff6f-5cd6-e45f-5878f70c11d5" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalAfterYearFive_3b793654-c1ac-69c9-9cf3-81e6dfe102d7" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/DebtObligationsTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/DocumentAndEntityInformation" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/EarningsPerShareEps" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/EarningsPerShareEpsComputationOfBasicAndDilutedEarningsLossPerShareDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding" xlink:label="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_21ce4f2f-397c-6c02-8635-7c94146a06a0" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingBasic" xlink:label="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_2dd9a981-e559-d141-f1c2-4db79f71a7ef" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_21ce4f2f-397c-6c02-8635-7c94146a06a0" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_2dd9a981-e559-d141-f1c2-4db79f71a7ef" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment" xlink:label="loc_us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment_d342f32b-4cc6-0bef-3743-616005090121" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_21ce4f2f-397c-6c02-8635-7c94146a06a0" xlink:to="loc_us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment_d342f32b-4cc6-0bef-3743-616005090121" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetIncomeLossAttributableToParentDiluted" xlink:label="loc_us-gaap_NetIncomeLossAttributableToParentDiluted_7f3b45f5-ee47-e9ef-4774-36c43be6e89d" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_a10eea14-f4db-3125-d183-77bb54500e95" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLossAttributableToParentDiluted_7f3b45f5-ee47-e9ef-4774-36c43be6e89d" xlink:to="loc_us-gaap_NetIncomeLoss_a10eea14-f4db-3125-d183-77bb54500e95" xlink:type="arc" />
    <link:loc xlink:href="nmih-20180930.xsd#nmih_AmountOfDilutiveSecuritiesWarrants" xlink:label="loc_nmih_AmountOfDilutiveSecuritiesWarrants_a0093aa7-67d9-7373-9974-f2e551c63ac4" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLossAttributableToParentDiluted_7f3b45f5-ee47-e9ef-4774-36c43be6e89d" xlink:to="loc_nmih_AmountOfDilutiveSecuritiesWarrants_a0093aa7-67d9-7373-9974-f2e551c63ac4" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/EarningsPerShareEpsTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/FairValueOfFinancialInstruments" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsAssetsAndLiabilitiesAtFairValueDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilitiesFairValueDisclosure" xlink:label="loc_us-gaap_LiabilitiesFairValueDisclosure_6bae24fb-c89c-2c1d-91e1-c77efe1775f1" xlink:type="locator" />
    <link:loc xlink:href="nmih-20180930.xsd#nmih_WarrantLiability" xlink:label="loc_nmih_WarrantLiability_67765a35-c93a-36d3-a30b-f2e5520c3114" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesFairValueDisclosure_6bae24fb-c89c-2c1d-91e1-c77efe1775f1" xlink:to="loc_nmih_WarrantLiability_67765a35-c93a-36d3-a30b-f2e5520c3114" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AssetsFairValueDisclosure" xlink:label="loc_us-gaap_AssetsFairValueDisclosure_4f2d2e40-e149-3246-b591-f2ca332c7df6" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_5ab305fa-195a-59cf-c0de-4b5d05fc9de4" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsFairValueDisclosure_4f2d2e40-e149-3246-b591-f2ca332c7df6" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_5ab305fa-195a-59cf-c0de-4b5d05fc9de4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CashAndCashEquivalentsFairValueDisclosure" xlink:label="loc_us-gaap_CashAndCashEquivalentsFairValueDisclosure_67a1f3e7-c91e-d9a1-0253-362c8d727f2d" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsFairValueDisclosure_4f2d2e40-e149-3246-b591-f2ca332c7df6" xlink:to="loc_us-gaap_CashAndCashEquivalentsFairValueDisclosure_67a1f3e7-c91e-d9a1-0253-362c8d727f2d" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsRollforwardOfLevel3LiabilitiesDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsValuationAssumptionsForWarrantLiabilitiesDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/IncomeTaxes" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/IncomeTaxesNarrativeDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/Investments" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsAgingOfUnrealizedLossesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss_5ad2bd9a-8a3d-b589-f487-66423fdb193d" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_97b62833-0a42-058f-3886-4b4d65c49079" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss_5ad2bd9a-8a3d-b589-f487-66423fdb193d" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_97b62833-0a42-058f-3886-4b4d65c49079" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_db9e5922-2e70-406b-1ac3-0318ebdc102f" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss_5ad2bd9a-8a3d-b589-f487-66423fdb193d" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_db9e5922-2e70-406b-1ac3-0318ebdc102f" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition_5fba5b8c-f33f-c8fe-316d-96157b5eaddf" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_9dc7d38b-d1f1-ee4c-83ca-bf0de39ac02c" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition_5fba5b8c-f33f-c8fe-316d-96157b5eaddf" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_9dc7d38b-d1f1-ee4c-83ca-bf0de39ac02c" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_540feb58-a104-9e2c-e527-965521238e74" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition_5fba5b8c-f33f-c8fe-316d-96157b5eaddf" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_540feb58-a104-9e2c-e527-965521238e74" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionNumberOfPositions" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionNumberOfPositions_99f55a45-a6bc-b921-d4ee-7d928bf7d546" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsNumberOfPositions" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsNumberOfPositions_21f87cbf-af9e-df21-f76f-7692a7af3eb3" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionNumberOfPositions_99f55a45-a6bc-b921-d4ee-7d928bf7d546" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsNumberOfPositions_21f87cbf-af9e-df21-f76f-7692a7af3eb3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions_a2e9bf04-3954-09b3-99a9-75955aca8acb" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionNumberOfPositions_99f55a45-a6bc-b921-d4ee-7d928bf7d546" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions_a2e9bf04-3954-09b3-99a9-75955aca8acb" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsFairValuesAndGrossUnrealizedGainsAndLossesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_f0bf2241-14f8-6ef1-e8d7-f724d52ad9c1" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_5d23fa7e-7f76-6507-b72f-382f81b88e34" xlink:type="locator" />
    <link:calculationArc order="1" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_f0bf2241-14f8-6ef1-e8d7-f724d52ad9c1" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_5d23fa7e-7f76-6507-b72f-382f81b88e34" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_e0f935d0-20e2-15fc-55a1-79c116fbc07c" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_f0bf2241-14f8-6ef1-e8d7-f724d52ad9c1" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_e0f935d0-20e2-15fc-55a1-79c116fbc07c" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_5ab305fa-195a-59cf-c0de-4b5d05fc9de4" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_f0bf2241-14f8-6ef1-e8d7-f724d52ad9c1" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_5ab305fa-195a-59cf-c0de-4b5d05fc9de4" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsNarrativeDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsNetInvestmentIncomeDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InvestmentIncomeNet" xlink:label="loc_us-gaap_InvestmentIncomeNet_4f5bad86-488c-1b1d-6a90-50ab7a9f4014" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InvestmentIncomeInterestAndDividend" xlink:label="loc_us-gaap_InvestmentIncomeInterestAndDividend_7267cf96-41e4-1138-f484-44ab662a687e" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InvestmentIncomeNet_4f5bad86-488c-1b1d-6a90-50ab7a9f4014" xlink:to="loc_us-gaap_InvestmentIncomeInterestAndDividend_7267cf96-41e4-1138-f484-44ab662a687e" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InvestmentIncomeInvestmentExpense" xlink:label="loc_us-gaap_InvestmentIncomeInvestmentExpense_160c31b5-6ea9-cf10-11f2-7bf68d2e5684" xlink:type="locator" />
    <link:calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InvestmentIncomeNet_4f5bad86-488c-1b1d-6a90-50ab7a9f4014" xlink:to="loc_us-gaap_InvestmentIncomeInvestmentExpense_160c31b5-6ea9-cf10-11f2-7bf68d2e5684" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsNetRealizedInvestmentGainsLossesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss_8eff9c0e-c63c-929d-b4a0-4ab6acadc24d" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleRealizedGain" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGain_8d287183-6757-87ff-f881-d370d24697b6" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss_8eff9c0e-c63c-929d-b4a0-4ab6acadc24d" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGain_8d287183-6757-87ff-f881-d370d24697b6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleRealizedLoss" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedLoss_a3df2500-7a45-401b-5420-aaf807ffe4db" xlink:type="locator" />
    <link:calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss_8eff9c0e-c63c-929d-b4a0-4ab6acadc24d" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedLoss_a3df2500-7a45-401b-5420-aaf807ffe4db" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsScheduledMaturitiesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_5ab305fa-195a-59cf-c0de-4b5d05fc9de4" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_329a232f-6b5a-4dfb-de74-33d6f53aa8f1" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_5ab305fa-195a-59cf-c0de-4b5d05fc9de4" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_329a232f-6b5a-4dfb-de74-33d6f53aa8f1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_bb6f3730-d49d-30bc-8e52-6eba94f7dba4" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_5ab305fa-195a-59cf-c0de-4b5d05fc9de4" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_bb6f3730-d49d-30bc-8e52-6eba94f7dba4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_1f4f4376-806c-dd72-8312-c94d523600df" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_5ab305fa-195a-59cf-c0de-4b5d05fc9de4" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_1f4f4376-806c-dd72-8312-c94d523600df" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue_d316f11c-0e79-8624-0aa3-665874b29cb1" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_5ab305fa-195a-59cf-c0de-4b5d05fc9de4" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue_d316f11c-0e79-8624-0aa3-665874b29cb1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue_d0d81d71-d959-6725-f49b-6fc6754d6937" xlink:type="locator" />
    <link:calculationArc order="5" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_5ab305fa-195a-59cf-c0de-4b5d05fc9de4" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue_d0d81d71-d959-6725-f49b-6fc6754d6937" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_f0bf2241-14f8-6ef1-e8d7-f724d52ad9c1" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost_a97722c4-c88e-0258-6d8c-8f5c45929660" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_f0bf2241-14f8-6ef1-e8d7-f724d52ad9c1" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost_a97722c4-c88e-0258-6d8c-8f5c45929660" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost_ad47d869-5bf7-62ba-8427-e58f9319b050" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_f0bf2241-14f8-6ef1-e8d7-f724d52ad9c1" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost_ad47d869-5bf7-62ba-8427-e58f9319b050" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost_e50aac2c-ef64-4942-acff-fb35c69b9a7d" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_f0bf2241-14f8-6ef1-e8d7-f724d52ad9c1" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost_e50aac2c-ef64-4942-acff-fb35c69b9a7d" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost_74070219-b8a4-ccaf-5a43-c0049bc918af" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_f0bf2241-14f8-6ef1-e8d7-f724d52ad9c1" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost_74070219-b8a4-ccaf-5a43-c0049bc918af" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost_152a2ce4-8a79-ff5d-50f5-18c3f26ceb17" xlink:type="locator" />
    <link:calculationArc order="5" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_f0bf2241-14f8-6ef1-e8d7-f724d52ad9c1" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost_152a2ce4-8a79-ff5d-50f5-18c3f26ceb17" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/OrganizationBasisOfPresentationAndSummaryOfAccountingPrinciples" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/OrganizationBasisOfPresentationAndSummaryOfAccountingPrinciplesNarrativeDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/OrganizationBasisOfPresentationAndSummaryOfAccountingPrinciplesPolicies" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/OrganizationBasisOfPresentationAndSummaryOfAccountingPrinciplesRecentAccountingPronouncementsDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/RegulatoryInformation" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/RegulatoryInformationScheduleOfStatutorySurplusContingencyReserveAndRtcRatioDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/RegulatoryInformationStatutoryNetIncomeLossDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/RegulatoryInformationTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/Reinsurance" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ReinsuranceAmountsCededRelatedToQsrTransactionsDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ReinsuranceEffectOfReinsuranceOnNetPremiumsWrittenAndEarnedDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PremiumsEarnedNet" xlink:label="loc_us-gaap_PremiumsEarnedNet_2443e898-efcc-6a58-8d5f-3a8e06da999a" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DirectPremiumsEarned" xlink:label="loc_us-gaap_DirectPremiumsEarned_6cb76504-3ddd-6d77-8ba2-e493c254e9e4" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PremiumsEarnedNet_2443e898-efcc-6a58-8d5f-3a8e06da999a" xlink:to="loc_us-gaap_DirectPremiumsEarned_6cb76504-3ddd-6d77-8ba2-e493c254e9e4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CededPremiumsEarned" xlink:label="loc_us-gaap_CededPremiumsEarned_83bd4591-1d1e-5c14-8160-dec7df16677b" xlink:type="locator" />
    <link:calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PremiumsEarnedNet_2443e898-efcc-6a58-8d5f-3a8e06da999a" xlink:to="loc_us-gaap_CededPremiumsEarned_83bd4591-1d1e-5c14-8160-dec7df16677b" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PremiumsWrittenNet" xlink:label="loc_us-gaap_PremiumsWrittenNet_e9cea52c-a2c5-6430-debb-e333afcd51a6" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DirectPremiumsWritten" xlink:label="loc_us-gaap_DirectPremiumsWritten_88027b9f-96de-6ef2-caef-ff9b3db51c7e" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PremiumsWrittenNet_e9cea52c-a2c5-6430-debb-e333afcd51a6" xlink:to="loc_us-gaap_DirectPremiumsWritten_88027b9f-96de-6ef2-caef-ff9b3db51c7e" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CededPremiumsWritten" xlink:label="loc_us-gaap_CededPremiumsWritten_36302374-c4e0-c6fe-bb5e-7a5d53835072" xlink:type="locator" />
    <link:calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PremiumsWrittenNet_e9cea52c-a2c5-6430-debb-e333afcd51a6" xlink:to="loc_us-gaap_CededPremiumsWritten_36302374-c4e0-c6fe-bb5e-7a5d53835072" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ReinsuranceNarrativeDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ReinsuranceTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpenses" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesNarrativeDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesReconciliationOfReserveBalancesForInsuranceClaimsExpenseDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaims1" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaims1_4bd6ac69-a045-9d4a-a474-d3e60f7fb7ae" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersCurrentYearClaimsAndClaimsAdjustmentExpense" xlink:label="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersCurrentYearClaimsAndClaimsAdjustmentExpense_e1654c95-0453-d306-6d93-6fb157059391" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaims1_4bd6ac69-a045-9d4a-a474-d3e60f7fb7ae" xlink:to="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersCurrentYearClaimsAndClaimsAdjustmentExpense_e1654c95-0453-d306-6d93-6fb157059391" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense" xlink:label="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense_866a077b-1f2f-46b8-016d-d00efac10b2e" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaims1_4bd6ac69-a045-9d4a-a474-d3e60f7fb7ae" xlink:to="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense_866a077b-1f2f-46b8-016d-d00efac10b2e" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseNet" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseNet_411a034f-4729-8571-a9ef-16b4d5326896" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense" xlink:label="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_0e9cc685-b5db-2672-c796-f60383eb4f21" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseNet_411a034f-4729-8571-a9ef-16b4d5326896" xlink:to="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_0e9cc685-b5db-2672-c796-f60383eb4f21" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ReinsuranceRecoverablesOnPaidAndUnpaidLosses" xlink:label="loc_us-gaap_ReinsuranceRecoverablesOnPaidAndUnpaidLosses_c9e70c94-0cda-1a69-f0d9-f8a07005169a" xlink:type="locator" />
    <link:calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseNet_411a034f-4729-8571-a9ef-16b4d5326896" xlink:to="loc_us-gaap_ReinsuranceRecoverablesOnPaidAndUnpaidLosses_c9e70c94-0cda-1a69-f0d9-f8a07005169a" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsForLossesAndLossAdjustmentExpense" xlink:label="loc_us-gaap_PaymentsForLossesAndLossAdjustmentExpense_2995a92a-252e-d025-f1c3-e44038eeba6f" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidCurrentYear1" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidCurrentYear1_f2734f39-f4b2-a6a5-a721-eb4606b57b5b" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PaymentsForLossesAndLossAdjustmentExpense_2995a92a-252e-d025-f1c3-e44038eeba6f" xlink:to="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidCurrentYear1_f2734f39-f4b2-a6a5-a721-eb4606b57b5b" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidPriorYears1" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidPriorYears1_4c3caea1-a354-b518-f3fe-2f7c3a1dbd74" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PaymentsForLossesAndLossAdjustmentExpense_2995a92a-252e-d025-f1c3-e44038eeba6f" xlink:to="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidPriorYears1_4c3caea1-a354-b518-f3fe-2f7c3a1dbd74" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/Warrants" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/WarrantsNarrativeDetails" xlink:type="extended" />
</link:linkbase>
