<?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/CommitmentsAndContingencies" xlink:href="nmih-20191231.xsd#CommitmentsAndContingencies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails" xlink:href="nmih-20191231.xsd#CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/CommitmentsAndContingenciesFuturePaymentDueUnderOperatingLeasesDetails" xlink:href="nmih-20191231.xsd#CommitmentsAndContingenciesFuturePaymentDueUnderOperatingLeasesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/CommitmentsAndContingenciesFuturePaymentDueUnderOperatingLeasesDetailsCalc2" xlink:href="nmih-20191231.xsd#CommitmentsAndContingenciesFuturePaymentDueUnderOperatingLeasesDetailsCalc2" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/CommitmentsAndContingenciesNarrativeDetails" xlink:href="nmih-20191231.xsd#CommitmentsAndContingenciesNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/CommitmentsAndContingenciesRightOfUseAssetAndLeaseLiabilityAssumptionsDetails" xlink:href="nmih-20191231.xsd#CommitmentsAndContingenciesRightOfUseAssetAndLeaseLiabilityAssumptionsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/CommitmentsAndContingenciesTables" xlink:href="nmih-20191231.xsd#CommitmentsAndContingenciesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/CommonStock" xlink:href="nmih-20191231.xsd#CommonStock" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/CommonStockNarrativeDetails" xlink:href="nmih-20191231.xsd#CommonStockNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ConsolidatedBalanceSheets" xlink:href="nmih-20191231.xsd#ConsolidatedBalanceSheets" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ConsolidatedBalanceSheetsParenthetical" xlink:href="nmih-20191231.xsd#ConsolidatedBalanceSheetsParenthetical" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ConsolidatedStatementsOfCashFlows" xlink:href="nmih-20191231.xsd#ConsolidatedStatementsOfCashFlows" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ConsolidatedStatementsOfChangesInShareholdersEquity" xlink:href="nmih-20191231.xsd#ConsolidatedStatementsOfChangesInShareholdersEquity" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ConsolidatedStatementsOfChangesInShareholdersEquityParenthetical" xlink:href="nmih-20191231.xsd#ConsolidatedStatementsOfChangesInShareholdersEquityParenthetical" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ConsolidatedStatementsOfOperationsAndComprehensiveIncome" xlink:href="nmih-20191231.xsd#ConsolidatedStatementsOfOperationsAndComprehensiveIncome" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ConsolidatedStatementsOfOperationsAndComprehensiveIncomeParenthetical" xlink:href="nmih-20191231.xsd#ConsolidatedStatementsOfOperationsAndComprehensiveIncomeParenthetical" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/CoverPage" xlink:href="nmih-20191231.xsd#CoverPage" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/Debt" xlink:href="nmih-20191231.xsd#Debt" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/DebtNarrativeDetails" xlink:href="nmih-20191231.xsd#DebtNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/DebtScheduleOfFuturePrincipalPaymentsDetails" xlink:href="nmih-20191231.xsd#DebtScheduleOfFuturePrincipalPaymentsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/DebtTables" xlink:href="nmih-20191231.xsd#DebtTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/EarningsPerShare" xlink:href="nmih-20191231.xsd#EarningsPerShare" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/EarningsPerShareDetails" xlink:href="nmih-20191231.xsd#EarningsPerShareDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/EarningsPerShareTables" xlink:href="nmih-20191231.xsd#EarningsPerShareTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstruments" xlink:href="nmih-20191231.xsd#FairValueOfFinancialInstruments" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsAssetsAndLiabilitiesAtFairValueDetails" xlink:href="nmih-20191231.xsd#FairValueOfFinancialInstrumentsAssetsAndLiabilitiesAtFairValueDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsNarrativeDetails" xlink:href="nmih-20191231.xsd#FairValueOfFinancialInstrumentsNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsRollfowardOfLevel3LiabilitiesDetails" xlink:href="nmih-20191231.xsd#FairValueOfFinancialInstrumentsRollfowardOfLevel3LiabilitiesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsTables" xlink:href="nmih-20191231.xsd#FairValueOfFinancialInstrumentsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsValuationAssumptionsForWarrantLiabilitiesDetails" xlink:href="nmih-20191231.xsd#FairValueOfFinancialInstrumentsValuationAssumptionsForWarrantLiabilitiesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxes" xlink:href="nmih-20191231.xsd#IncomeTaxes" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxesComponentsOfIncomeTaxExpenseBenefitDetails" xlink:href="nmih-20191231.xsd#IncomeTaxesComponentsOfIncomeTaxExpenseBenefitDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxesDeferredTaxAssetAndLiabilitiesDetails" xlink:href="nmih-20191231.xsd#IncomeTaxesDeferredTaxAssetAndLiabilitiesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxesEffectiveIncomeTaxRateReconciliationDetails" xlink:href="nmih-20191231.xsd#IncomeTaxesEffectiveIncomeTaxRateReconciliationDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxesNarrativeDetails" xlink:href="nmih-20191231.xsd#IncomeTaxesNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxesTables" xlink:href="nmih-20191231.xsd#IncomeTaxesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwill" xlink:href="nmih-20191231.xsd#IntangibleAssetsAndGoodwill" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwillDetails" xlink:href="nmih-20191231.xsd#IntangibleAssetsAndGoodwillDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwillTables" xlink:href="nmih-20191231.xsd#IntangibleAssetsAndGoodwillTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/Investments" xlink:href="nmih-20191231.xsd#Investments" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsAgingOfUnrealizedLossesDetails" xlink:href="nmih-20191231.xsd#InvestmentsAgingOfUnrealizedLossesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsCorporateDebtSecuritiesByIndustryGroupDetails" xlink:href="nmih-20191231.xsd#InvestmentsCorporateDebtSecuritiesByIndustryGroupDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsFairValuesAndGrossUnrealizedGainsAndLossesDetails" xlink:href="nmih-20191231.xsd#InvestmentsFairValuesAndGrossUnrealizedGainsAndLossesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNarrativeDetails" xlink:href="nmih-20191231.xsd#InvestmentsNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNetInvestmentIncomeDetails" xlink:href="nmih-20191231.xsd#InvestmentsNetInvestmentIncomeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNetRealizedInvestmentsGainsLossesDetails" xlink:href="nmih-20191231.xsd#InvestmentsNetRealizedInvestmentsGainsLossesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsScheduledMaturitiesDetails" xlink:href="nmih-20191231.xsd#InvestmentsScheduledMaturitiesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsTables" xlink:href="nmih-20191231.xsd#InvestmentsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/OrganizationAndBasisOfPresentation" xlink:href="nmih-20191231.xsd#OrganizationAndBasisOfPresentation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/OrganizationAndBasisOfPresentationDetails" xlink:href="nmih-20191231.xsd#OrganizationAndBasisOfPresentationDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/QuarterlyFinancialDataUnaudited" xlink:href="nmih-20191231.xsd#QuarterlyFinancialDataUnaudited" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/QuarterlyFinancialDataUnauditedDetails" xlink:href="nmih-20191231.xsd#QuarterlyFinancialDataUnauditedDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/QuarterlyFinancialDataUnauditedTables" xlink:href="nmih-20191231.xsd#QuarterlyFinancialDataUnauditedTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/RegulatoryInformation" xlink:href="nmih-20191231.xsd#RegulatoryInformation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/RegulatoryInformationNarrativeDetails" xlink:href="nmih-20191231.xsd#RegulatoryInformationNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/RegulatoryInformationScheduleOfCombinedStatutoryNetLossStatutorySurplusContingencyReserveAndRtcRatiosDetails" xlink:href="nmih-20191231.xsd#RegulatoryInformationScheduleOfCombinedStatutoryNetLossStatutorySurplusContingencyReserveAndRtcRatiosDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/RegulatoryInformationTables" xlink:href="nmih-20191231.xsd#RegulatoryInformationTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/Reinsurance" xlink:href="nmih-20191231.xsd#Reinsurance" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReinsuranceAmountsCededRelatedToQsrTransactionsDetails" xlink:href="nmih-20191231.xsd#ReinsuranceAmountsCededRelatedToQsrTransactionsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReinsuranceEffectOfReinsuranceAgreementsOnPremiumsWrittenAndEarnedDetails" xlink:href="nmih-20191231.xsd#ReinsuranceEffectOfReinsuranceAgreementsOnPremiumsWrittenAndEarnedDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReinsuranceIlnTransactionsDetails" xlink:href="nmih-20191231.xsd#ReinsuranceIlnTransactionsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReinsuranceNarrativeDetails" xlink:href="nmih-20191231.xsd#ReinsuranceNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReinsuranceTables" xlink:href="nmih-20191231.xsd#ReinsuranceTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReserveForInsuranceClaimsAndClaimExpenses" xlink:href="nmih-20191231.xsd#ReserveForInsuranceClaimsAndClaimExpenses" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesAverageAnnualPercentagePayoutOfIncurredClaimsByAgeNetOfReinsuranceDetails" xlink:href="nmih-20191231.xsd#ReservesForInsuranceClaimsAndClaimExpensesAverageAnnualPercentagePayoutOfIncurredClaimsByAgeNetOfReinsuranceDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesClaimDevelopmentByAccidentYearAndReconciliationOfReserveForInsuranceClaimsAndClaimsExpenseDetails" xlink:href="nmih-20191231.xsd#ReservesForInsuranceClaimsAndClaimExpensesClaimDevelopmentByAccidentYearAndReconciliationOfReserveForInsuranceClaimsAndClaimsExpenseDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesNarrativeDetails" xlink:href="nmih-20191231.xsd#ReservesForInsuranceClaimsAndClaimExpensesNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesReconciliationOfDisclosureOfIncurredAndPaidClaimsDevelopmentToLiabilityForUnpaidClaimsAndClaimsAdjustmentExpensesDetails" xlink:href="nmih-20191231.xsd#ReservesForInsuranceClaimsAndClaimExpensesReconciliationOfDisclosureOfIncurredAndPaidClaimsDevelopmentToLiabilityForUnpaidClaimsAndClaimsAdjustmentExpensesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesReconciliationOfReserveBalancesForInsuranceClaimsExpensesDetails" xlink:href="nmih-20191231.xsd#ReservesForInsuranceClaimsAndClaimExpensesReconciliationOfReserveBalancesForInsuranceClaimsExpensesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesTables" xlink:href="nmih-20191231.xsd#ReservesForInsuranceClaimsAndClaimExpensesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ScheduleISummaryOfInvestmentsOtherThanInvestmentsInRelatedParties" xlink:href="nmih-20191231.xsd#ScheduleISummaryOfInvestmentsOtherThanInvestmentsInRelatedParties" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ScheduleISummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesDetails" xlink:href="nmih-20191231.xsd#ScheduleISummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnly" xlink:href="nmih-20191231.xsd#ScheduleIiFinancialInformationOfRegistrantParentCompanyOnly" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyBalanceSheetsAdditionalInformationParentCompanyOnlyDetails" xlink:href="nmih-20191231.xsd#ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyBalanceSheetsAdditionalInformationParentCompanyOnlyDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyBalanceSheetsParentCompanyOnlyDetails" xlink:href="nmih-20191231.xsd#ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyBalanceSheetsParentCompanyOnlyDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyStatementOfOperationsAdditionalInformationParentCompanyOnlyDetails" xlink:href="nmih-20191231.xsd#ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyStatementOfOperationsAdditionalInformationParentCompanyOnlyDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyStatementOfOperationsParentCompanyOnlyDetails" xlink:href="nmih-20191231.xsd#ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyStatementOfOperationsParentCompanyOnlyDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyStatementsOfCashFlowsParentCompanyOnlyDetails" xlink:href="nmih-20191231.xsd#ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyStatementsOfCashFlowsParentCompanyOnlyDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlySupplementalNotesParentCompanyOnlyDetails" xlink:href="nmih-20191231.xsd#ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlySupplementalNotesParentCompanyOnlyDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ScheduleIvFinancialInformationOfRegistrantReinsurance" xlink:href="nmih-20191231.xsd#ScheduleIvFinancialInformationOfRegistrantReinsurance" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ScheduleIvFinancialInformationOfRegistrantReinsuranceDetails" xlink:href="nmih-20191231.xsd#ScheduleIvFinancialInformationOfRegistrantReinsuranceDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensation" xlink:href="nmih-20191231.xsd#ShareBasedCompensation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensationNarrativeDetails" xlink:href="nmih-20191231.xsd#ShareBasedCompensationNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensationRestrictedStockUnitsActivityDetails" xlink:href="nmih-20191231.xsd#ShareBasedCompensationRestrictedStockUnitsActivityDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensationStockOptionActivityDetails" xlink:href="nmih-20191231.xsd#ShareBasedCompensationStockOptionActivityDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensationStockOptionValuationAssumptionsDetails" xlink:href="nmih-20191231.xsd#ShareBasedCompensationStockOptionValuationAssumptionsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensationTables" xlink:href="nmih-20191231.xsd#ShareBasedCompensationTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/SoftwareAndEquipment" xlink:href="nmih-20191231.xsd#SoftwareAndEquipment" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/SoftwareAndEquipmentNarrativeDetails" xlink:href="nmih-20191231.xsd#SoftwareAndEquipmentNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/SoftwareAndEquipmentNetBalancesDetails" xlink:href="nmih-20191231.xsd#SoftwareAndEquipmentNetBalancesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/SoftwareAndEquipmentTables" xlink:href="nmih-20191231.xsd#SoftwareAndEquipmentTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/SummaryOfAccountingPolicies" xlink:href="nmih-20191231.xsd#SummaryOfAccountingPolicies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/SummaryOfAccountingPoliciesDetails" xlink:href="nmih-20191231.xsd#SummaryOfAccountingPoliciesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/SummaryOfAccountingPoliciesPolicies" xlink:href="nmih-20191231.xsd#SummaryOfAccountingPoliciesPolicies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/Warrants" xlink:href="nmih-20191231.xsd#Warrants" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/WarrantsDetails" xlink:href="nmih-20191231.xsd#WarrantsDetails" xlink:type="simple" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CommitmentsAndContingencies" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDue" xlink:label="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDue_acfb1bbb-4a5b-18c4-ab71-d62ae0aecfa0" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDueCurrent" xlink:label="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDueCurrent_4cf71329-74d6-54f3-cadb-acb7f1063f36" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDue_acfb1bbb-4a5b-18c4-ab71-d62ae0aecfa0" xlink:to="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDueCurrent_4cf71329-74d6-54f3-cadb-acb7f1063f36" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDueInTwoYears" xlink:label="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDueInTwoYears_f2a573e7-27e5-db11-63c6-c460733b5ea3" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDue_acfb1bbb-4a5b-18c4-ab71-d62ae0aecfa0" xlink:to="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDueInTwoYears_f2a573e7-27e5-db11-63c6-c460733b5ea3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDueInThreeYears" xlink:label="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDueInThreeYears_398384fb-b756-b11a-1ea4-5a5cd4372c82" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDue_acfb1bbb-4a5b-18c4-ab71-d62ae0aecfa0" xlink:to="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDueInThreeYears_398384fb-b756-b11a-1ea4-5a5cd4372c82" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFourYears" xlink:label="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFourYears_832fb73d-9886-a0dd-5905-8e2ec54304d6" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDue_acfb1bbb-4a5b-18c4-ab71-d62ae0aecfa0" xlink:to="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFourYears_832fb73d-9886-a0dd-5905-8e2ec54304d6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFiveYears" xlink:label="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFiveYears_1f2c68db-a374-1412-5f1f-4edca1431bbb" xlink:type="locator" />
    <link:calculationArc order="5" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDue_acfb1bbb-4a5b-18c4-ab71-d62ae0aecfa0" xlink:to="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFiveYears_1f2c68db-a374-1412-5f1f-4edca1431bbb" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CommitmentsAndContingenciesFuturePaymentDueUnderOperatingLeasesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_1c2cd15f-6a97-015f-b126-1d0a0750698b" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount_07815ffa-512a-3133-dcbb-38e09d2626b9" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_1c2cd15f-6a97-015f-b126-1d0a0750698b" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount_07815ffa-512a-3133-dcbb-38e09d2626b9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OperatingLeaseLiability" xlink:label="loc_us-gaap_OperatingLeaseLiability_b983c2d8-8318-0a7e-1a5c-6ab2933f7be5" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_1c2cd15f-6a97-015f-b126-1d0a0750698b" xlink:to="loc_us-gaap_OperatingLeaseLiability_b983c2d8-8318-0a7e-1a5c-6ab2933f7be5" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CommitmentsAndContingenciesFuturePaymentDueUnderOperatingLeasesDetailsCalc2" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_EDAB5575FE889DB3AE5A3AA1568AFFEA_1c2cd15f-6a97-015f-b126-1d0a0750698b" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_EDAB5575FE889DB3AE5A3AA1568AFFEA_5ad4ca01-bc52-b198-b1fd-3cded668d167" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_EDAB5575FE889DB3AE5A3AA1568AFFEA_1c2cd15f-6a97-015f-b126-1d0a0750698b" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_EDAB5575FE889DB3AE5A3AA1568AFFEA_5ad4ca01-bc52-b198-b1fd-3cded668d167" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_EDAB5575FE889DB3AE5A3AA1568AFFEA_9b040bc1-f43c-735d-05f7-679f319d2bb6" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_EDAB5575FE889DB3AE5A3AA1568AFFEA_1c2cd15f-6a97-015f-b126-1d0a0750698b" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_EDAB5575FE889DB3AE5A3AA1568AFFEA_9b040bc1-f43c-735d-05f7-679f319d2bb6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_EDAB5575FE889DB3AE5A3AA1568AFFEA_2f0ec234-4f20-7099-efb3-3c0ab4d024dd" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_EDAB5575FE889DB3AE5A3AA1568AFFEA_1c2cd15f-6a97-015f-b126-1d0a0750698b" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_EDAB5575FE889DB3AE5A3AA1568AFFEA_2f0ec234-4f20-7099-efb3-3c0ab4d024dd" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_EDAB5575FE889DB3AE5A3AA1568AFFEA_1ed751b1-5f94-4f6f-41e9-ef873c9f2bab" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_EDAB5575FE889DB3AE5A3AA1568AFFEA_1c2cd15f-6a97-015f-b126-1d0a0750698b" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_EDAB5575FE889DB3AE5A3AA1568AFFEA_1ed751b1-5f94-4f6f-41e9-ef873c9f2bab" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CommitmentsAndContingenciesNarrativeDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CommitmentsAndContingenciesRightOfUseAssetAndLeaseLiabilityAssumptionsDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CommitmentsAndContingenciesTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CommonStock" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CommonStockNarrativeDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ConsolidatedBalanceSheets" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LiabilitiesAndStockholdersEquity" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_d7f1ad03-6ed4-706a-15fc-eae794dee33a" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_Liabilities" xlink:label="loc_us-gaap_Liabilities_44863786-cbc4-bac4-e070-0a1f19314584" 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_d7f1ad03-6ed4-706a-15fc-eae794dee33a" xlink:to="loc_us-gaap_Liabilities_44863786-cbc4-bac4-e070-0a1f19314584" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LongTermDebt" xlink:label="loc_us-gaap_LongTermDebt_a2f199ce-3001-c200-d488-633bc54206dc" 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_44863786-cbc4-bac4-e070-0a1f19314584" xlink:to="loc_us-gaap_LongTermDebt_a2f199ce-3001-c200-d488-633bc54206dc" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_UnearnedPremiums" xlink:label="loc_us-gaap_UnearnedPremiums_1f6f3cde-87b1-2c7b-c8d1-cd12a39b021a" 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_44863786-cbc4-bac4-e070-0a1f19314584" xlink:to="loc_us-gaap_UnearnedPremiums_1f6f3cde-87b1-2c7b-c8d1-cd12a39b021a" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent" xlink:label="loc_us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent_efa64cef-5110-33cd-b428-f0367bd538b9" 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_44863786-cbc4-bac4-e070-0a1f19314584" xlink:to="loc_us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent_efa64cef-5110-33cd-b428-f0367bd538b9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense" xlink:label="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_abd16f49-26bc-4cce-6af2-35474b4f0a92" 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_44863786-cbc4-bac4-e070-0a1f19314584" xlink:to="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_abd16f49-26bc-4cce-6af2-35474b4f0a92" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_FundsHeldUnderReinsuranceAgreementsLiability" xlink:label="loc_us-gaap_FundsHeldUnderReinsuranceAgreementsLiability_20810e9e-f74e-314e-cb36-bffb63028076" 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_44863786-cbc4-bac4-e070-0a1f19314584" xlink:to="loc_us-gaap_FundsHeldUnderReinsuranceAgreementsLiability_20810e9e-f74e-314e-cb36-bffb63028076" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_WarrantsAndRightsOutstanding" xlink:label="loc_us-gaap_WarrantsAndRightsOutstanding_d3b228b2-7eb9-f739-11a1-2268f8c30c19" 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_44863786-cbc4-bac4-e070-0a1f19314584" xlink:to="loc_us-gaap_WarrantsAndRightsOutstanding_d3b228b2-7eb9-f739-11a1-2268f8c30c19" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DeferredIncomeTaxLiabilitiesNet" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_64993a75-9b0c-349a-1011-cc5a81c58412" 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_44863786-cbc4-bac4-e070-0a1f19314584" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_64993a75-9b0c-349a-1011-cc5a81c58412" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherLiabilities" xlink:label="loc_us-gaap_OtherLiabilities_ff0e0b1b-b140-8889-cbc7-6f0d76651556" xlink:type="locator" />
    <link:calculationArc order="8" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_44863786-cbc4-bac4-e070-0a1f19314584" xlink:to="loc_us-gaap_OtherLiabilities_ff0e0b1b-b140-8889-cbc7-6f0d76651556" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CommitmentsAndContingencies" xlink:label="loc_us-gaap_CommitmentsAndContingencies_4d934b0d-59bc-ae5c-ffb9-b6ced82ff9f8" 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_d7f1ad03-6ed4-706a-15fc-eae794dee33a" xlink:to="loc_us-gaap_CommitmentsAndContingencies_4d934b0d-59bc-ae5c-ffb9-b6ced82ff9f8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_StockholdersEquity" xlink:label="loc_us-gaap_StockholdersEquity_4b9904d8-8624-0dbb-a949-29ff2cf808a8" 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_d7f1ad03-6ed4-706a-15fc-eae794dee33a" xlink:to="loc_us-gaap_StockholdersEquity_4b9904d8-8624-0dbb-a949-29ff2cf808a8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CommonStockValueOutstanding" xlink:label="loc_us-gaap_CommonStockValueOutstanding_294c6946-9048-096a-8276-56aec7d04572" 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_4b9904d8-8624-0dbb-a949-29ff2cf808a8" xlink:to="loc_us-gaap_CommonStockValueOutstanding_294c6946-9048-096a-8276-56aec7d04572" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AdditionalPaidInCapital" xlink:label="loc_us-gaap_AdditionalPaidInCapital_3d5a0ca6-0f59-67e6-adb5-6aecd22b693b" 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_4b9904d8-8624-0dbb-a949-29ff2cf808a8" xlink:to="loc_us-gaap_AdditionalPaidInCapital_3d5a0ca6-0f59-67e6-adb5-6aecd22b693b" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_988c1346-b444-a867-fe80-f3aec1443d54" 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_4b9904d8-8624-0dbb-a949-29ff2cf808a8" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_988c1346-b444-a867-fe80-f3aec1443d54" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_RetainedEarningsAccumulatedDeficit" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_62305d8f-d807-0fe8-d0ab-f2c2b3d03011" 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_4b9904d8-8624-0dbb-a949-29ff2cf808a8" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_62305d8f-d807-0fe8-d0ab-f2c2b3d03011" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_Assets" xlink:label="loc_us-gaap_Assets_17ef3f41-42f7-52c0-cba1-93e7e0e1116a" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_e562c48b-3e99-2c57-8e96-c3b81056b58c" 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_17ef3f41-42f7-52c0-cba1-93e7e0e1116a" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_e562c48b-3e99-2c57-8e96-c3b81056b58c" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_21c019f0-62e8-3b20-07d1-495695054dce" 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_17ef3f41-42f7-52c0-cba1-93e7e0e1116a" xlink:to="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_21c019f0-62e8-3b20-07d1-495695054dce" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PremiumsReceivableAtCarryingValue" xlink:label="loc_us-gaap_PremiumsReceivableAtCarryingValue_82058bad-06da-019a-216a-114ac6e1abf8" 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_17ef3f41-42f7-52c0-cba1-93e7e0e1116a" xlink:to="loc_us-gaap_PremiumsReceivableAtCarryingValue_82058bad-06da-019a-216a-114ac6e1abf8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AccruedInvestmentIncomeReceivable" xlink:label="loc_us-gaap_AccruedInvestmentIncomeReceivable_bfbf3cab-2654-5a6a-253b-82bbababe3ce" 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_17ef3f41-42f7-52c0-cba1-93e7e0e1116a" xlink:to="loc_us-gaap_AccruedInvestmentIncomeReceivable_bfbf3cab-2654-5a6a-253b-82bbababe3ce" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PrepaidExpenseCurrentAndNoncurrent" xlink:label="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_17b4da49-994e-06fa-b9be-170b91b04689" 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_17ef3f41-42f7-52c0-cba1-93e7e0e1116a" xlink:to="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_17b4da49-994e-06fa-b9be-170b91b04689" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DeferredPolicyAcquisitionCosts" xlink:label="loc_us-gaap_DeferredPolicyAcquisitionCosts_73b0729e-31ca-4e5a-414b-f49774aa79ba" 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_17ef3f41-42f7-52c0-cba1-93e7e0e1116a" xlink:to="loc_us-gaap_DeferredPolicyAcquisitionCosts_73b0729e-31ca-4e5a-414b-f49774aa79ba" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_4246ec24-1a4c-19dd-57c9-32d4a8e0cbaa" 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_17ef3f41-42f7-52c0-cba1-93e7e0e1116a" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_4246ec24-1a4c-19dd-57c9-32d4a8e0cbaa" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IntangibleAssetsNetIncludingGoodwill" xlink:label="loc_us-gaap_IntangibleAssetsNetIncludingGoodwill_0572c4a5-7251-883f-b3a9-f968acd71b9b" 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_17ef3f41-42f7-52c0-cba1-93e7e0e1116a" xlink:to="loc_us-gaap_IntangibleAssetsNetIncludingGoodwill_0572c4a5-7251-883f-b3a9-f968acd71b9b" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PrepaidReinsurancePremiums" xlink:label="loc_us-gaap_PrepaidReinsurancePremiums_83169329-6715-22ed-9b09-d303c5de8b33" 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_17ef3f41-42f7-52c0-cba1-93e7e0e1116a" xlink:to="loc_us-gaap_PrepaidReinsurancePremiums_83169329-6715-22ed-9b09-d303c5de8b33" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherAssets" xlink:label="loc_us-gaap_OtherAssets_53a34e15-d375-c4e0-c5cf-68e055eee5e5" 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_17ef3f41-42f7-52c0-cba1-93e7e0e1116a" xlink:to="loc_us-gaap_OtherAssets_53a34e15-d375-c4e0-c5cf-68e055eee5e5" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ConsolidatedBalanceSheetsParenthetical" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ConsolidatedStatementsOfCashFlows" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_50231013-f048-89e7-0e20-ba139224c5f7" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ce0d7b63-a366-bc9b-79e1-780981e428fe" 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_50231013-f048-89e7-0e20-ba139224c5f7" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_e170ce1e-c3a8-e8ee-88b0-37e8dd7b1d11" 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_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_NetIncomeLoss_e170ce1e-c3a8-e8ee-88b0-37e8dd7b1d11" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss_70a92108-04c8-ea13-dcdc-b3b1e3a5458e" 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_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss_70a92108-04c8-ea13-dcdc-b3b1e3a5458e" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_FairValueAdjustmentOfWarrants" xlink:label="loc_us-gaap_FairValueAdjustmentOfWarrants_dcf39713-2bbe-ebf2-2d75-3bc1c2f5ba99" 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_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_FairValueAdjustmentOfWarrants_dcf39713-2bbe-ebf2-2d75-3bc1c2f5ba99" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DepreciationAmortizationAndAccretionNet" xlink:label="loc_us-gaap_DepreciationAmortizationAndAccretionNet_f8d3390c-1850-b76f-7062-99d566a4ad4a" 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_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_DepreciationAmortizationAndAccretionNet_f8d3390c-1850-b76f-7062-99d566a4ad4a" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments" xlink:label="loc_us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments_94f5ae99-7bd8-4f8c-5311-9522abc2f1bd" 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_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments_94f5ae99-7bd8-4f8c-5311-9522abc2f1bd" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AmortizationOfFinancingCostsAndDiscounts" xlink:label="loc_us-gaap_AmortizationOfFinancingCostsAndDiscounts_c839a0d8-dfea-e1a5-fc91-ef95e7aed9cb" 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_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_AmortizationOfFinancingCostsAndDiscounts_c839a0d8-dfea-e1a5-fc91-ef95e7aed9cb" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DeferredIncomeTaxesAndTaxCredits" xlink:label="loc_us-gaap_DeferredIncomeTaxesAndTaxCredits_9a5dd9a5-8471-2942-da95-5c0a29bbe3b1" 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_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_DeferredIncomeTaxesAndTaxCredits_9a5dd9a5-8471-2942-da95-5c0a29bbe3b1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ShareBasedCompensation" xlink:label="loc_us-gaap_ShareBasedCompensation_f0b9d825-b0b9-37fd-4d25-9294a8598890" 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_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_ShareBasedCompensation_f0b9d825-b0b9-37fd-4d25-9294a8598890" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncreaseDecreaseInPremiumsReceivable" xlink:label="loc_us-gaap_IncreaseDecreaseInPremiumsReceivable_bb351048-5c87-9f71-683e-f5c53f3165f5" 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_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_IncreaseDecreaseInPremiumsReceivable_bb351048-5c87-9f71-683e-f5c53f3165f5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable_3f8a9c34-c392-f7e7-663b-e1187aad8041" 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_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable_3f8a9c34-c392-f7e7-663b-e1187aad8041" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncreaseDecreaseInPrepaidExpense" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidExpense_41a534b8-a087-ee21-d2ee-012c298680b5" 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_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidExpense_41a534b8-a087-ee21-d2ee-012c298680b5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncreaseDecreaseInDeferredPolicyAcquisitionCosts" xlink:label="loc_us-gaap_IncreaseDecreaseInDeferredPolicyAcquisitionCosts_360094d4-9387-1e15-c2a3-cc1b6baa796a" 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_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_IncreaseDecreaseInDeferredPolicyAcquisitionCosts_360094d4-9387-1e15-c2a3-cc1b6baa796a" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_dfcbd6f7-83fa-00c2-bd9e-6c5c1de7d890" 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_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_dfcbd6f7-83fa-00c2-bd9e-6c5c1de7d890" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncreaseDecreaseInUnearnedPremiums" xlink:label="loc_us-gaap_IncreaseDecreaseInUnearnedPremiums_4b8e0c22-9d9b-d21a-c00c-d04959f9a9ff" 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_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_IncreaseDecreaseInUnearnedPremiums_4b8e0c22-9d9b-d21a-c00c-d04959f9a9ff" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncreaseDecreaseInLiabilityForClaimsAndClaimsAdjustmentExpenseReserve" xlink:label="loc_us-gaap_IncreaseDecreaseInLiabilityForClaimsAndClaimsAdjustmentExpenseReserve_af942e6d-d845-d466-ef57-a6a88c58b9c6" 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_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_IncreaseDecreaseInLiabilityForClaimsAndClaimsAdjustmentExpenseReserve_af942e6d-d845-d466-ef57-a6a88c58b9c6" xlink:type="arc" />
    <link:loc xlink:href="nmih-20191231.xsd#nmih_IncreaseDecreaseinReinsuranceAssetsandLiabilities" xlink:label="loc_nmih_IncreaseDecreaseinReinsuranceAssetsandLiabilities_8f7895d5-f0ac-4d5b-666e-df89419015f1" 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_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_nmih_IncreaseDecreaseinReinsuranceAssetsandLiabilities_8f7895d5-f0ac-4d5b-666e-df89419015f1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_7c1c3153-d95c-50b8-10ed-a75d1f3d7a68" 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_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_7c1c3153-d95c-50b8-10ed-a75d1f3d7a68" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_0f07a806-a2da-6d18-a7a9-d734fad1f3b0" 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_50231013-f048-89e7-0e20-ba139224c5f7" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_0f07a806-a2da-6d18-a7a9-d734fad1f3b0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1efd93c0-bb90-2a64-a997-3a70afaa3faa" 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_50231013-f048-89e7-0e20-ba139224c5f7" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1efd93c0-bb90-2a64-a997-3a70afaa3faa" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ProceedsFromIssuanceOfCommonStock" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_0f0975d6-8500-76a0-c74f-5d2f0ed8b620" 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_1efd93c0-bb90-2a64-a997-3a70afaa3faa" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_0f0975d6-8500-76a0-c74f-5d2f0ed8b620" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlansIncludingStockOptions" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlansIncludingStockOptions_3b304564-1a0d-03c8-a331-770e72d1f6fc" 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_1efd93c0-bb90-2a64-a997-3a70afaa3faa" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlansIncludingStockOptions_3b304564-1a0d-03c8-a331-770e72d1f6fc" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ProceedsFromWarrantExercises" xlink:label="loc_us-gaap_ProceedsFromWarrantExercises_a88ea9da-fe15-25d5-e7ed-084f1843cf38" 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_1efd93c0-bb90-2a64-a997-3a70afaa3faa" xlink:to="loc_us-gaap_ProceedsFromWarrantExercises_a88ea9da-fe15-25d5-e7ed-084f1843cf38" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation" xlink:label="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_07e50027-f2db-6d1b-93ed-b22d6bd39351" 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_1efd93c0-bb90-2a64-a997-3a70afaa3faa" xlink:to="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_07e50027-f2db-6d1b-93ed-b22d6bd39351" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ProceedsFromIssuanceOfLongTermDebt" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfLongTermDebt_f58bb86e-8b52-c30f-7b3a-554d3e73586f" 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_1efd93c0-bb90-2a64-a997-3a70afaa3faa" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfLongTermDebt_f58bb86e-8b52-c30f-7b3a-554d3e73586f" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_RepaymentsOfLongTermDebt" xlink:label="loc_us-gaap_RepaymentsOfLongTermDebt_50c96d39-6558-6bd8-b3d6-7ed1c558807e" 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_1efd93c0-bb90-2a64-a997-3a70afaa3faa" xlink:to="loc_us-gaap_RepaymentsOfLongTermDebt_50c96d39-6558-6bd8-b3d6-7ed1c558807e" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PaymentsOfDebtIssuanceCosts" xlink:label="loc_us-gaap_PaymentsOfDebtIssuanceCosts_d03b640f-8d2c-4108-a1c4-1354103a7ee2" 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_1efd93c0-bb90-2a64-a997-3a70afaa3faa" xlink:to="loc_us-gaap_PaymentsOfDebtIssuanceCosts_d03b640f-8d2c-4108-a1c4-1354103a7ee2" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ConsolidatedStatementsOfChangesInShareholdersEquity" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ConsolidatedStatementsOfChangesInShareholdersEquityParenthetical" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ConsolidatedStatementsOfOperationsAndComprehensiveIncome" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ComprehensiveIncomeNetOfTax" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_5c8b3520-1ca2-0a91-0912-70d62831826c" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_e170ce1e-c3a8-e8ee-88b0-37e8dd7b1d11" 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_5c8b3520-1ca2-0a91-0912-70d62831826c" xlink:to="loc_us-gaap_NetIncomeLoss_e170ce1e-c3a8-e8ee-88b0-37e8dd7b1d11" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_489b61b6-7c39-240c-7f68-1c1675bca3b7" 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_e170ce1e-c3a8-e8ee-88b0-37e8dd7b1d11" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_489b61b6-7c39-240c-7f68-1c1675bca3b7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_666ca9f0-28f1-b21a-025e-36222808a6c3" 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_e170ce1e-c3a8-e8ee-88b0-37e8dd7b1d11" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_666ca9f0-28f1-b21a-025e-36222808a6c3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_5e0cb0dc-b25c-aaae-62f8-cb90f31a16a1" 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_5c8b3520-1ca2-0a91-0912-70d62831826c" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_5e0cb0dc-b25c-aaae-62f8-cb90f31a16a1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CostsAndExpenses" xlink:label="loc_us-gaap_CostsAndExpenses_76d25f63-60a6-4deb-1fd0-84a3d98fe881" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncurredClaimsPropertyCasualtyAndLiability" xlink:label="loc_us-gaap_IncurredClaimsPropertyCasualtyAndLiability_20d006d6-9433-0726-c9f2-14c4cf6a5e1a" 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_76d25f63-60a6-4deb-1fd0-84a3d98fe881" xlink:to="loc_us-gaap_IncurredClaimsPropertyCasualtyAndLiability_20d006d6-9433-0726-c9f2-14c4cf6a5e1a" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherCostAndExpenseOperating" xlink:label="loc_us-gaap_OtherCostAndExpenseOperating_fdd3a041-a733-299c-016d-efa8e43f811b" 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_76d25f63-60a6-4deb-1fd0-84a3d98fe881" xlink:to="loc_us-gaap_OtherCostAndExpenseOperating_fdd3a041-a733-299c-016d-efa8e43f811b" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherNonoperatingExpense" xlink:label="loc_us-gaap_OtherNonoperatingExpense_9f06c7bc-4106-680b-3080-fca52676bad5" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_76d25f63-60a6-4deb-1fd0-84a3d98fe881" xlink:to="loc_us-gaap_OtherNonoperatingExpense_9f06c7bc-4106-680b-3080-fca52676bad5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_InterestExpense" xlink:label="loc_us-gaap_InterestExpense_16e9f6a6-5524-a7b1-7e7c-73ee97610ec6" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_76d25f63-60a6-4deb-1fd0-84a3d98fe881" xlink:to="loc_us-gaap_InterestExpense_16e9f6a6-5524-a7b1-7e7c-73ee97610ec6" xlink:type="arc" />
    <link:loc xlink:href="nmih-20191231.xsd#nmih_GainLossonChangeinFairValueofWarrantLiability" xlink:label="loc_nmih_GainLossonChangeinFairValueofWarrantLiability_1a7b86c8-485c-25c0-c26f-df89415dc771" xlink:type="locator" />
    <link:calculationArc order="5" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_76d25f63-60a6-4deb-1fd0-84a3d98fe881" xlink:to="loc_nmih_GainLossonChangeinFairValueofWarrantLiability_1a7b86c8-485c-25c0-c26f-df89415dc771" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_Revenues" xlink:label="loc_us-gaap_Revenues_425ada39-f194-a279-47ac-dd09cf899fb1" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PremiumsEarnedNet" xlink:label="loc_us-gaap_PremiumsEarnedNet_88dba276-a88f-9f62-bf2f-2675783c9e0a" 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_425ada39-f194-a279-47ac-dd09cf899fb1" xlink:to="loc_us-gaap_PremiumsEarnedNet_88dba276-a88f-9f62-bf2f-2675783c9e0a" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NetInvestmentIncome" xlink:label="loc_us-gaap_NetInvestmentIncome_a9a877fc-5ca4-60d6-236e-1fd7da5874f2" 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_425ada39-f194-a279-47ac-dd09cf899fb1" xlink:to="loc_us-gaap_NetInvestmentIncome_a9a877fc-5ca4-60d6-236e-1fd7da5874f2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_GainLossOnInvestments" xlink:label="loc_us-gaap_GainLossOnInvestments_f36be4b0-50ba-fdde-d8c3-1df343692d30" 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_425ada39-f194-a279-47ac-dd09cf899fb1" xlink:to="loc_us-gaap_GainLossOnInvestments_f36be4b0-50ba-fdde-d8c3-1df343692d30" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherIncome" xlink:label="loc_us-gaap_OtherIncome_b36cbb9c-3cb7-e834-cb02-aac35e8dbc1b" 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_425ada39-f194-a279-47ac-dd09cf899fb1" xlink:to="loc_us-gaap_OtherIncome_b36cbb9c-3cb7-e834-cb02-aac35e8dbc1b" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ConsolidatedStatementsOfOperationsAndComprehensiveIncomeParenthetical" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CoverPage" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/Debt" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/DebtNarrativeDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/DebtScheduleOfFuturePrincipalPaymentsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtInstrumentCarryingAmount" xlink:label="loc_us-gaap_DebtInstrumentCarryingAmount_b5390da0-4b10-f083-5d88-d4657fa5b028" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_ce3ac95b-761b-7fbc-3779-1bdfd056c71f" 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_b5390da0-4b10-f083-5d88-d4657fa5b028" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_ce3ac95b-761b-7fbc-3779-1bdfd056c71f" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_d39bb101-f79f-a162-9929-01083e9d64b5" 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_b5390da0-4b10-f083-5d88-d4657fa5b028" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_d39bb101-f79f-a162-9929-01083e9d64b5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour_73238937-86a2-9126-69f0-c70629155ebe" 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_b5390da0-4b10-f083-5d88-d4657fa5b028" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour_73238937-86a2-9126-69f0-c70629155ebe" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths_b14a8305-c528-44ac-6db7-45b0f6f6ddc6" 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_b5390da0-4b10-f083-5d88-d4657fa5b028" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths_b14a8305-c528-44ac-6db7-45b0f6f6ddc6" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/DebtTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/EarningsPerShare" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/EarningsPerShareDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding" xlink:label="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_8c9389ea-1fbb-7e45-ce1f-5a1d89572c0d" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingBasic" xlink:label="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_fbdbb03d-8583-701f-d6e2-69f8229c6051" 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_8c9389ea-1fbb-7e45-ce1f-5a1d89572c0d" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_fbdbb03d-8583-701f-d6e2-69f8229c6051" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment" xlink:label="loc_us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment_72ad9ebf-e829-cc37-8382-628e47c585ab" 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_8c9389ea-1fbb-7e45-ce1f-5a1d89572c0d" xlink:to="loc_us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment_72ad9ebf-e829-cc37-8382-628e47c585ab" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NetIncomeLossAttributableToParentDiluted" xlink:label="loc_us-gaap_NetIncomeLossAttributableToParentDiluted_e003bed2-f3d2-880e-39b4-aeec7427a5b3" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_e170ce1e-c3a8-e8ee-88b0-37e8dd7b1d11" 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_e003bed2-f3d2-880e-39b4-aeec7427a5b3" xlink:to="loc_us-gaap_NetIncomeLoss_e170ce1e-c3a8-e8ee-88b0-37e8dd7b1d11" xlink:type="arc" />
    <link:loc xlink:href="nmih-20191231.xsd#nmih_GainFromChangeinFairValueofWarrantLiability" xlink:label="loc_nmih_GainFromChangeinFairValueofWarrantLiability_6CFA40F51D252B12413924ADAF1199EA" 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_e003bed2-f3d2-880e-39b4-aeec7427a5b3" xlink:to="loc_nmih_GainFromChangeinFairValueofWarrantLiability_6CFA40F51D252B12413924ADAF1199EA" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/EarningsPerShareTables" 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/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AssetsFairValueDisclosure" xlink:label="loc_us-gaap_AssetsFairValueDisclosure_a0a5801b-c8ce-1793-dd5f-edbcde4cc5a3" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_e562c48b-3e99-2c57-8e96-c3b81056b58c" 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_a0a5801b-c8ce-1793-dd5f-edbcde4cc5a3" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_e562c48b-3e99-2c57-8e96-c3b81056b58c" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CashAndCashEquivalentsFairValueDisclosure" xlink:label="loc_us-gaap_CashAndCashEquivalentsFairValueDisclosure_554f95d2-cb4f-eb2c-68b3-7e12c8578a72" 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_a0a5801b-c8ce-1793-dd5f-edbcde4cc5a3" xlink:to="loc_us-gaap_CashAndCashEquivalentsFairValueDisclosure_554f95d2-cb4f-eb2c-68b3-7e12c8578a72" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LiabilitiesFairValueDisclosure" xlink:label="loc_us-gaap_LiabilitiesFairValueDisclosure_d2b58163-9b70-93d8-8da6-4d47d94fdd3f" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DerivativeLiabilities" xlink:label="loc_us-gaap_DerivativeLiabilities_c498d065-e002-c8b0-aba8-6aaec8302ba7" 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_d2b58163-9b70-93d8-8da6-4d47d94fdd3f" xlink:to="loc_us-gaap_DerivativeLiabilities_c498d065-e002-c8b0-aba8-6aaec8302ba7" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsNarrativeDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsRollfowardOfLevel3LiabilitiesDetails" 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/IncomeTaxesComponentsOfIncomeTaxExpenseBenefitDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_666ca9f0-28f1-b21a-025e-36222808a6c3" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CurrentIncomeTaxExpenseBenefit" xlink:label="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_ad87dc87-7206-5d76-a1ae-6cecdf90521c" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_666ca9f0-28f1-b21a-025e-36222808a6c3" xlink:to="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_ad87dc87-7206-5d76-a1ae-6cecdf90521c" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit" xlink:label="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_3421bed6-296e-da4e-f0e9-a2a8fa1f6d19" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_666ca9f0-28f1-b21a-025e-36222808a6c3" xlink:to="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_3421bed6-296e-da4e-f0e9-a2a8fa1f6d19" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/IncomeTaxesDeferredTaxAssetAndLiabilitiesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DeferredTaxLiabilities" xlink:label="loc_us-gaap_DeferredTaxLiabilities_f31cb66e-0de8-54fb-4788-53b3cde0ec2f" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DeferredIncomeTaxLiabilities" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilities_15e17ec2-d527-455f-b2cd-0be7f92a9fd5" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxLiabilities_f31cb66e-0de8-54fb-4788-53b3cde0ec2f" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilities_15e17ec2-d527-455f-b2cd-0be7f92a9fd5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DeferredTaxLiabilitiesDeferredExpenseReservesAndAccruals" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesDeferredExpenseReservesAndAccruals_a2b1c679-4acb-297c-815a-b0ef520bf4aa" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_15e17ec2-d527-455f-b2cd-0be7f92a9fd5" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesDeferredExpenseReservesAndAccruals_a2b1c679-4acb-297c-815a-b0ef520bf4aa" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DeferredTaxLiabilitiesDeferredExpenseDeferredPolicyAcquisitionCost" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesDeferredExpenseDeferredPolicyAcquisitionCost_37ba3ec7-f460-d5be-936d-6459464ec351" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_15e17ec2-d527-455f-b2cd-0be7f92a9fd5" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesDeferredExpenseDeferredPolicyAcquisitionCost_37ba3ec7-f460-d5be-936d-6459464ec351" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DeferredTaxLiabilitiesInvestments" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesInvestments_d32b5808-6302-9eb2-57e7-34c6a5d9450c" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_15e17ec2-d527-455f-b2cd-0be7f92a9fd5" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesInvestments_d32b5808-6302-9eb2-57e7-34c6a5d9450c" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DeferredTaxLiabilitiesDeferredExpenseCapitalizedSoftware" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesDeferredExpenseCapitalizedSoftware_b1090bf8-23f6-e05e-5ba7-b7bf16f3a394" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_15e17ec2-d527-455f-b2cd-0be7f92a9fd5" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesDeferredExpenseCapitalizedSoftware_b1090bf8-23f6-e05e-5ba7-b7bf16f3a394" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DeferredTaxLiabilitiesGoodwillAndIntangibleAssetsIntangibleAssets" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesGoodwillAndIntangibleAssetsIntangibleAssets_5da8fd5a-89f1-3049-e781-200c2d180554" xlink:type="locator" />
    <link:calculationArc order="5" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_15e17ec2-d527-455f-b2cd-0be7f92a9fd5" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesGoodwillAndIntangibleAssetsIntangibleAssets_5da8fd5a-89f1-3049-e781-200c2d180554" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DeferredTaxLiabilitiesOther" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesOther_4c5a1085-469a-cd6c-e26f-53287b62aa26" xlink:type="locator" />
    <link:calculationArc order="6" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_15e17ec2-d527-455f-b2cd-0be7f92a9fd5" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesOther_4c5a1085-469a-cd6c-e26f-53287b62aa26" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DeferredTaxAssetsNet" xlink:label="loc_us-gaap_DeferredTaxAssetsNet_e6f5d9f5-2430-5e17-896c-5e4d69815366" xlink:type="locator" />
    <link:calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxLiabilities_f31cb66e-0de8-54fb-4788-53b3cde0ec2f" xlink:to="loc_us-gaap_DeferredTaxAssetsNet_e6f5d9f5-2430-5e17-896c-5e4d69815366" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DeferredTaxAssetsGross" xlink:label="loc_us-gaap_DeferredTaxAssetsGross_e54f6543-25d5-ceb9-ff71-ca6ba1b37623" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_e6f5d9f5-2430-5e17-896c-5e4d69815366" xlink:to="loc_us-gaap_DeferredTaxAssetsGross_e54f6543-25d5-ceb9-ff71-ca6ba1b37623" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DeferredTaxAssetsOperatingLossCarryforwards" xlink:label="loc_us-gaap_DeferredTaxAssetsOperatingLossCarryforwards_bc5d002e-802f-bf1e-7d7d-9f1d1a7551a7" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_e54f6543-25d5-ceb9-ff71-ca6ba1b37623" xlink:to="loc_us-gaap_DeferredTaxAssetsOperatingLossCarryforwards_bc5d002e-802f-bf1e-7d7d-9f1d1a7551a7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost_de5e795f-0165-d088-d22e-d01ff8d44317" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_e54f6543-25d5-ceb9-ff71-ca6ba1b37623" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost_de5e795f-0165-d088-d22e-d01ff8d44317" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsUnearnedPremiumsReserve" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsUnearnedPremiumsReserve_adf64cd9-9445-4a08-7e0c-a5890bcab60d" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_e54f6543-25d5-ceb9-ff71-ca6ba1b37623" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsUnearnedPremiumsReserve_adf64cd9-9445-4a08-7e0c-a5890bcab60d" xlink:type="arc" />
    <link:loc xlink:href="nmih-20191231.xsd#nmih_DeferredTaxAssetsTaxDeferredExpenseStartupCosts" xlink:label="loc_nmih_DeferredTaxAssetsTaxDeferredExpenseStartupCosts_2e74e0c2-c302-5d0d-95a8-34bce0b659c9" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_e54f6543-25d5-ceb9-ff71-ca6ba1b37623" xlink:to="loc_nmih_DeferredTaxAssetsTaxDeferredExpenseStartupCosts_2e74e0c2-c302-5d0d-95a8-34bce0b659c9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DeferredTaxAssetsInvestments" xlink:label="loc_us-gaap_DeferredTaxAssetsInvestments_8238b72a-9466-2c8c-af2e-800965722912" xlink:type="locator" />
    <link:calculationArc order="5" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_e54f6543-25d5-ceb9-ff71-ca6ba1b37623" xlink:to="loc_us-gaap_DeferredTaxAssetsInvestments_8238b72a-9466-2c8c-af2e-800965722912" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DeferredTaxAssetsOther" xlink:label="loc_us-gaap_DeferredTaxAssetsOther_a87b79d6-1ed8-a71d-1843-5c0769713f28" xlink:type="locator" />
    <link:calculationArc order="6" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_e54f6543-25d5-ceb9-ff71-ca6ba1b37623" xlink:to="loc_us-gaap_DeferredTaxAssetsOther_a87b79d6-1ed8-a71d-1843-5c0769713f28" xlink:type="arc" />
    <link:loc xlink:href="nmih-20191231.xsd#nmih_DeferredTaxAssetsDeferredCedingCommissions" xlink:label="loc_nmih_DeferredTaxAssetsDeferredCedingCommissions_7e2d81e5-4ba8-63da-7d26-34bce0aec5a2" xlink:type="locator" />
    <link:calculationArc order="7" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_e54f6543-25d5-ceb9-ff71-ca6ba1b37623" xlink:to="loc_nmih_DeferredTaxAssetsDeferredCedingCommissions_7e2d81e5-4ba8-63da-7d26-34bce0aec5a2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsOther" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsOther_1add1f0b-0dab-17fb-48dc-cbdae374835d" xlink:type="locator" />
    <link:calculationArc order="8" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_e54f6543-25d5-ceb9-ff71-ca6ba1b37623" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsOther_1add1f0b-0dab-17fb-48dc-cbdae374835d" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DeferredTaxAssetsValuationAllowance" xlink:label="loc_us-gaap_DeferredTaxAssetsValuationAllowance_55b78dfc-faa8-3c71-752a-e6857318d516" xlink:type="locator" />
    <link:calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_e6f5d9f5-2430-5e17-896c-5e4d69815366" xlink:to="loc_us-gaap_DeferredTaxAssetsValuationAllowance_55b78dfc-faa8-3c71-752a-e6857318d516" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/IncomeTaxesEffectiveIncomeTaxRateReconciliationDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_EffectiveIncomeTaxRateContinuingOperations" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_aa9fb8cf-e50d-6d5b-0236-a084fee29894" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate_5ef0c8c5-04c5-1c10-a59e-3eaa9cf923b4" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_aa9fb8cf-e50d-6d5b-0236-a084fee29894" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate_5ef0c8c5-04c5-1c10-a59e-3eaa9cf923b4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationStateAndLocalIncomeTaxes" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationStateAndLocalIncomeTaxes_fa285cf0-c43f-6ef0-a0f2-c37d958f2fe4" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_aa9fb8cf-e50d-6d5b-0236-a084fee29894" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationStateAndLocalIncomeTaxes_fa285cf0-c43f-6ef0-a0f2-c37d958f2fe4" xlink:type="arc" />
    <link:loc xlink:href="nmih-20191231.xsd#nmih_EffectiveIncomeTaxRateReconciliationCompensationShareBasedAndOtherPercent" xlink:label="loc_nmih_EffectiveIncomeTaxRateReconciliationCompensationShareBasedAndOtherPercent_3274c770-ee7d-5459-cafc-34bce0882862" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_aa9fb8cf-e50d-6d5b-0236-a084fee29894" xlink:to="loc_nmih_EffectiveIncomeTaxRateReconciliationCompensationShareBasedAndOtherPercent_3274c770-ee7d-5459-cafc-34bce0882862" xlink:type="arc" />
    <link:loc xlink:href="nmih-20191231.xsd#nmih_EffectiveIncomeTaxRateReconciliationWarrantGainLossPercent" xlink:label="loc_nmih_EffectiveIncomeTaxRateReconciliationWarrantGainLossPercent_4f1b6857-9c36-3a14-f200-34bce06d1acd" xlink:type="locator" />
    <link:calculationArc order="4" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_aa9fb8cf-e50d-6d5b-0236-a084fee29894" xlink:to="loc_nmih_EffectiveIncomeTaxRateReconciliationWarrantGainLossPercent_4f1b6857-9c36-3a14-f200-34bce06d1acd" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationOtherAdjustments" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationOtherAdjustments_c16a0eb3-02da-6ea0-91e7-3203372f71fd" xlink:type="locator" />
    <link:calculationArc order="5" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_aa9fb8cf-e50d-6d5b-0236-a084fee29894" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationOtherAdjustments_c16a0eb3-02da-6ea0-91e7-3203372f71fd" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationChangeInEnactedTaxRate" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationChangeInEnactedTaxRate_dde8ff73-3704-2d19-f167-45cf9c0efbb7" xlink:type="locator" />
    <link:calculationArc order="6" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_aa9fb8cf-e50d-6d5b-0236-a084fee29894" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationChangeInEnactedTaxRate_dde8ff73-3704-2d19-f167-45cf9c0efbb7" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/IncomeTaxesNarrativeDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/IncomeTaxesTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwill" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwillDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IntangibleAssetsNetIncludingGoodwill" xlink:label="loc_us-gaap_IntangibleAssetsNetIncludingGoodwill_0572c4a5-7251-883f-b3a9-f968acd71b9b" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_Goodwill" xlink:label="loc_us-gaap_Goodwill_37b440e2-656c-b624-0688-b7cf681bf981" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IntangibleAssetsNetIncludingGoodwill_0572c4a5-7251-883f-b3a9-f968acd71b9b" xlink:to="loc_us-gaap_Goodwill_37b440e2-656c-b624-0688-b7cf681bf981" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwill" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwill_cb3c969e-ecfd-d862-86d5-39c41aa964cb" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IntangibleAssetsNetIncludingGoodwill_0572c4a5-7251-883f-b3a9-f968acd71b9b" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwill_cb3c969e-ecfd-d862-86d5-39c41aa964cb" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwillTables" 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/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionNumberOfPositions" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionNumberOfPositions_cd7cecd0-abe5-e076-ee63-cc97a9f215e0" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions_071eb5dc-108b-e1f6-5081-93e2d81bdbdd" 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_cd7cecd0-abe5-e076-ee63-cc97a9f215e0" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions_071eb5dc-108b-e1f6-5081-93e2d81bdbdd" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsNumberOfPositions" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsNumberOfPositions_9664c380-acfd-21d6-9c76-e3d5cd21f78d" 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_cd7cecd0-abe5-e076-ee63-cc97a9f215e0" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsNumberOfPositions_9664c380-acfd-21d6-9c76-e3d5cd21f78d" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss_447294e8-f4eb-2b40-51a5-60fa019f8c40" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_44b817b0-a9ec-08a0-e6d5-8738955fbd29" 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_447294e8-f4eb-2b40-51a5-60fa019f8c40" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_44b817b0-a9ec-08a0-e6d5-8738955fbd29" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_f50bd4fe-0acd-ab98-c92a-d313822079c5" 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_447294e8-f4eb-2b40-51a5-60fa019f8c40" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_f50bd4fe-0acd-ab98-c92a-d313822079c5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition_bd4abe0a-6fe6-2d88-cf98-52c493407bcd" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_7d2f9305-3a51-279b-17e9-0a8bec7eba1b" 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_bd4abe0a-6fe6-2d88-cf98-52c493407bcd" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_7d2f9305-3a51-279b-17e9-0a8bec7eba1b" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_fe6fe2fb-1c28-638d-7c2f-bc065610ad60" 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_bd4abe0a-6fe6-2d88-cf98-52c493407bcd" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_fe6fe2fb-1c28-638d-7c2f-bc065610ad60" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsCorporateDebtSecuritiesByIndustryGroupDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsFairValuesAndGrossUnrealizedGainsAndLossesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_27940abc-0cb4-eab4-8ef0-df4a4c0bb415" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_9fbaf9cb-468f-3b91-9cf2-18d26152173d" 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_27940abc-0cb4-eab4-8ef0-df4a4c0bb415" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_9fbaf9cb-468f-3b91-9cf2-18d26152173d" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_a23ab896-034e-8e96-1a84-63ffb40e496e" 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_27940abc-0cb4-eab4-8ef0-df4a4c0bb415" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_a23ab896-034e-8e96-1a84-63ffb40e496e" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_e562c48b-3e99-2c57-8e96-c3b81056b58c" 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_27940abc-0cb4-eab4-8ef0-df4a4c0bb415" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_e562c48b-3e99-2c57-8e96-c3b81056b58c" 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/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_InvestmentIncomeNet" xlink:label="loc_us-gaap_InvestmentIncomeNet_b6bcc6f9-d6bd-b7ec-6d33-5c8babf7b60a" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_InvestmentIncomeInvestmentExpense" xlink:label="loc_us-gaap_InvestmentIncomeInvestmentExpense_75f6e90c-804d-3c5a-4e2a-ebedcbc3934c" 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_b6bcc6f9-d6bd-b7ec-6d33-5c8babf7b60a" xlink:to="loc_us-gaap_InvestmentIncomeInvestmentExpense_75f6e90c-804d-3c5a-4e2a-ebedcbc3934c" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_InvestmentIncomeInterestAndDividend" xlink:label="loc_us-gaap_InvestmentIncomeInterestAndDividend_8bf33cd8-6d81-d18c-6aee-0dd114eb97b4" 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_b6bcc6f9-d6bd-b7ec-6d33-5c8babf7b60a" xlink:to="loc_us-gaap_InvestmentIncomeInterestAndDividend_8bf33cd8-6d81-d18c-6aee-0dd114eb97b4" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsNetRealizedInvestmentsGainsLossesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss_70a92108-04c8-ea13-dcdc-b3b1e3a5458e" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleRealizedGain" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGain_bf959114-1fbc-5fda-8c0b-dc77a3be947c" 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_70a92108-04c8-ea13-dcdc-b3b1e3a5458e" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGain_bf959114-1fbc-5fda-8c0b-dc77a3be947c" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleRealizedLoss" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedLoss_ffa1d70b-a245-36db-5216-ebca5e8dfa6d" 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_70a92108-04c8-ea13-dcdc-b3b1e3a5458e" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedLoss_ffa1d70b-a245-36db-5216-ebca5e8dfa6d" 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/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_27940abc-0cb4-eab4-8ef0-df4a4c0bb415" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost_2689b18d-c088-f9d0-8533-bbbc6703e3ca" 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_27940abc-0cb4-eab4-8ef0-df4a4c0bb415" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost_2689b18d-c088-f9d0-8533-bbbc6703e3ca" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost_ec915ab0-b06c-8246-6113-1ffd431b1e4b" 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_27940abc-0cb4-eab4-8ef0-df4a4c0bb415" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost_ec915ab0-b06c-8246-6113-1ffd431b1e4b" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost_685bf464-cfee-568e-f726-7f96d378e9e1" 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_27940abc-0cb4-eab4-8ef0-df4a4c0bb415" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost_685bf464-cfee-568e-f726-7f96d378e9e1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost_5fa99027-0ebb-5ffa-2596-c5d8d96d1a7f" 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_27940abc-0cb4-eab4-8ef0-df4a4c0bb415" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost_5fa99027-0ebb-5ffa-2596-c5d8d96d1a7f" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost_9b50574a-bd0a-875f-522f-a761ea309a42" 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_27940abc-0cb4-eab4-8ef0-df4a4c0bb415" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost_9b50574a-bd0a-875f-522f-a761ea309a42" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_e562c48b-3e99-2c57-8e96-c3b81056b58c" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_d870856f-841f-c3d0-a313-ca9d525216a8" 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_e562c48b-3e99-2c57-8e96-c3b81056b58c" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_d870856f-841f-c3d0-a313-ca9d525216a8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_6a2a51c8-a80d-af5e-4dc1-d2eeba9d310c" 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_e562c48b-3e99-2c57-8e96-c3b81056b58c" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_6a2a51c8-a80d-af5e-4dc1-d2eeba9d310c" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_7f031d71-7992-4d18-a9d4-3c1221e2a6bb" 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_e562c48b-3e99-2c57-8e96-c3b81056b58c" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_7f031d71-7992-4d18-a9d4-3c1221e2a6bb" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue_dea36972-70da-958f-bd14-29224bedcb55" 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_e562c48b-3e99-2c57-8e96-c3b81056b58c" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue_dea36972-70da-958f-bd14-29224bedcb55" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue_22b4a974-0f7d-fc90-c496-cc8c5db00622" 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_e562c48b-3e99-2c57-8e96-c3b81056b58c" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue_22b4a974-0f7d-fc90-c496-cc8c5db00622" 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/OrganizationAndBasisOfPresentation" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/OrganizationAndBasisOfPresentationDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/QuarterlyFinancialDataUnaudited" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/QuarterlyFinancialDataUnauditedDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/QuarterlyFinancialDataUnauditedTables" 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/RegulatoryInformationNarrativeDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/RegulatoryInformationScheduleOfCombinedStatutoryNetLossStatutorySurplusContingencyReserveAndRtcRatiosDetails" 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/ReinsuranceEffectOfReinsuranceAgreementsOnPremiumsWrittenAndEarnedDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PremiumsWrittenNet" xlink:label="loc_us-gaap_PremiumsWrittenNet_47b8e33a-8858-ba83-4bd2-df619d707a93" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DirectPremiumsWritten" xlink:label="loc_us-gaap_DirectPremiumsWritten_b572fefb-1e55-b371-531f-9e90c5ffb93e" 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_47b8e33a-8858-ba83-4bd2-df619d707a93" xlink:to="loc_us-gaap_DirectPremiumsWritten_b572fefb-1e55-b371-531f-9e90c5ffb93e" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CededPremiumsWritten" xlink:label="loc_us-gaap_CededPremiumsWritten_e2354478-ac8f-b4a9-f6c9-78f6ee2e0f5c" 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_47b8e33a-8858-ba83-4bd2-df619d707a93" xlink:to="loc_us-gaap_CededPremiumsWritten_e2354478-ac8f-b4a9-f6c9-78f6ee2e0f5c" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PremiumsEarnedNet" xlink:label="loc_us-gaap_PremiumsEarnedNet_88dba276-a88f-9f62-bf2f-2675783c9e0a" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DirectPremiumsEarned" xlink:label="loc_us-gaap_DirectPremiumsEarned_67e82947-5bfb-6a68-2706-347a20e0b24b" 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_88dba276-a88f-9f62-bf2f-2675783c9e0a" xlink:to="loc_us-gaap_DirectPremiumsEarned_67e82947-5bfb-6a68-2706-347a20e0b24b" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CededPremiumsEarned" xlink:label="loc_us-gaap_CededPremiumsEarned_aba68a68-f7d1-18a9-7a0e-49a99ddbb456" 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_88dba276-a88f-9f62-bf2f-2675783c9e0a" xlink:to="loc_us-gaap_CededPremiumsEarned_aba68a68-f7d1-18a9-7a0e-49a99ddbb456" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ReinsuranceIlnTransactionsDetails" xlink:type="extended" />
  <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/ReserveForInsuranceClaimsAndClaimExpenses" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesAverageAnnualPercentagePayoutOfIncurredClaimsByAgeNetOfReinsuranceDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesClaimDevelopmentByAccidentYearAndReconciliationOfReserveForInsuranceClaimsAndClaimsExpenseDetails" 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/ReservesForInsuranceClaimsAndClaimExpensesReconciliationOfDisclosureOfIncurredAndPaidClaimsDevelopmentToLiabilityForUnpaidClaimsAndClaimsAdjustmentExpensesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ShortdurationInsuranceContractsLiabilityForUnpaidClaimsAndAllocatedClaimAdjustmentExpenseNet" xlink:label="loc_us-gaap_ShortdurationInsuranceContractsLiabilityForUnpaidClaimsAndAllocatedClaimAdjustmentExpenseNet_0eb8e53d-d03b-13d8-d0a0-e1dd6bd86295" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ShortdurationInsuranceContractsIncurredClaimsAndAllocatedClaimAdjustmentExpenseNet" xlink:label="loc_us-gaap_ShortdurationInsuranceContractsIncurredClaimsAndAllocatedClaimAdjustmentExpenseNet_2dd9ef46-dde1-6b83-55aa-ae3f2ee4c1a0" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ShortdurationInsuranceContractsLiabilityForUnpaidClaimsAndAllocatedClaimAdjustmentExpenseNet_0eb8e53d-d03b-13d8-d0a0-e1dd6bd86295" xlink:to="loc_us-gaap_ShortdurationInsuranceContractsIncurredClaimsAndAllocatedClaimAdjustmentExpenseNet_2dd9ef46-dde1-6b83-55aa-ae3f2ee4c1a0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ShortdurationInsuranceContractsCumulativePaidClaimsAndAllocatedClaimAdjustmentExpenseNet" xlink:label="loc_us-gaap_ShortdurationInsuranceContractsCumulativePaidClaimsAndAllocatedClaimAdjustmentExpenseNet_c90ff03d-a92c-f55d-78b9-4d52d74bd795" xlink:type="locator" />
    <link:calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ShortdurationInsuranceContractsLiabilityForUnpaidClaimsAndAllocatedClaimAdjustmentExpenseNet_0eb8e53d-d03b-13d8-d0a0-e1dd6bd86295" xlink:to="loc_us-gaap_ShortdurationInsuranceContractsCumulativePaidClaimsAndAllocatedClaimAdjustmentExpenseNet_c90ff03d-a92c-f55d-78b9-4d52d74bd795" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesReconciliationOfReserveBalancesForInsuranceClaimsExpensesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseNet" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseNet_33332d81-2d27-5458-c417-900e0a7d3251" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense" xlink:label="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_abd16f49-26bc-4cce-6af2-35474b4f0a92" 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_33332d81-2d27-5458-c417-900e0a7d3251" xlink:to="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_abd16f49-26bc-4cce-6af2-35474b4f0a92" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ReinsuranceRecoverablesOnPaidAndUnpaidLosses" xlink:label="loc_us-gaap_ReinsuranceRecoverablesOnPaidAndUnpaidLosses_45d937f3-fe21-6413-7d8d-eb2e21c7d762" 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_33332d81-2d27-5458-c417-900e0a7d3251" xlink:to="loc_us-gaap_ReinsuranceRecoverablesOnPaidAndUnpaidLosses_45d937f3-fe21-6413-7d8d-eb2e21c7d762" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PaymentsForLossesAndLossAdjustmentExpense" xlink:label="loc_us-gaap_PaymentsForLossesAndLossAdjustmentExpense_4a09b102-4796-3f11-5735-c1e035a996f0" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidCurrentYear1" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidCurrentYear1_04da4ee7-f521-b045-0459-5ddb7480d030" 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_4a09b102-4796-3f11-5735-c1e035a996f0" xlink:to="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidCurrentYear1_04da4ee7-f521-b045-0459-5ddb7480d030" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidPriorYears1" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidPriorYears1_67ba34ec-e3e8-6c46-146a-ddb0928dee95" 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_4a09b102-4796-3f11-5735-c1e035a996f0" xlink:to="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidPriorYears1_67ba34ec-e3e8-6c46-146a-ddb0928dee95" xlink:type="arc" />
    <link:loc xlink:href="nmih-20191231.xsd#nmih_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidReinsuranceTerminations" xlink:label="loc_nmih_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidReinsuranceTerminations_3A2D04989F56974116C7F427A1C9766A" xlink:type="locator" />
    <link:calculationArc order="3" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PaymentsForLossesAndLossAdjustmentExpense_4a09b102-4796-3f11-5735-c1e035a996f0" xlink:to="loc_nmih_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidReinsuranceTerminations_3A2D04989F56974116C7F427A1C9766A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaims1" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaims1_d8f63898-4459-5fff-0e7a-e5ce271818ac" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersCurrentYearClaimsAndClaimsAdjustmentExpense" xlink:label="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersCurrentYearClaimsAndClaimsAdjustmentExpense_4de47903-8980-491e-a005-9d6fcf669df1" 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_d8f63898-4459-5fff-0e7a-e5ce271818ac" xlink:to="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersCurrentYearClaimsAndClaimsAdjustmentExpense_4de47903-8980-491e-a005-9d6fcf669df1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense" xlink:label="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense_7cd7aeac-daa5-55ab-c126-aed30065b1de" 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_d8f63898-4459-5fff-0e7a-e5ce271818ac" xlink:to="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense_7cd7aeac-daa5-55ab-c126-aed30065b1de" 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/ScheduleISummaryOfInvestmentsOtherThanInvestmentsInRelatedParties" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ScheduleISummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnly" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyBalanceSheetsAdditionalInformationParentCompanyOnlyDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyBalanceSheetsParentCompanyOnlyDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_Assets" xlink:label="loc_us-gaap_Assets_17ef3f41-42f7-52c0-cba1-93e7e0e1116a" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_e562c48b-3e99-2c57-8e96-c3b81056b58c" 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_17ef3f41-42f7-52c0-cba1-93e7e0e1116a" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_e562c48b-3e99-2c57-8e96-c3b81056b58c" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_21c019f0-62e8-3b20-07d1-495695054dce" 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_17ef3f41-42f7-52c0-cba1-93e7e0e1116a" xlink:to="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_21c019f0-62e8-3b20-07d1-495695054dce" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_InvestmentsInAffiliatesSubsidiariesAssociatesAndJointVentures" xlink:label="loc_us-gaap_InvestmentsInAffiliatesSubsidiariesAssociatesAndJointVentures_c69f300d-b963-81ba-e5d8-70c441a5125f" 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_17ef3f41-42f7-52c0-cba1-93e7e0e1116a" xlink:to="loc_us-gaap_InvestmentsInAffiliatesSubsidiariesAssociatesAndJointVentures_c69f300d-b963-81ba-e5d8-70c441a5125f" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AccruedInvestmentIncomeReceivable" xlink:label="loc_us-gaap_AccruedInvestmentIncomeReceivable_bfbf3cab-2654-5a6a-253b-82bbababe3ce" 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_17ef3f41-42f7-52c0-cba1-93e7e0e1116a" xlink:to="loc_us-gaap_AccruedInvestmentIncomeReceivable_bfbf3cab-2654-5a6a-253b-82bbababe3ce" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PrepaidExpenseCurrentAndNoncurrent" xlink:label="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_17b4da49-994e-06fa-b9be-170b91b04689" 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_17ef3f41-42f7-52c0-cba1-93e7e0e1116a" xlink:to="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_17b4da49-994e-06fa-b9be-170b91b04689" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DueFromAffiliates" xlink:label="loc_us-gaap_DueFromAffiliates_0f367d39-6a6b-aea2-3445-7184989a252d" 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_17ef3f41-42f7-52c0-cba1-93e7e0e1116a" xlink:to="loc_us-gaap_DueFromAffiliates_0f367d39-6a6b-aea2-3445-7184989a252d" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_4246ec24-1a4c-19dd-57c9-32d4a8e0cbaa" 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_17ef3f41-42f7-52c0-cba1-93e7e0e1116a" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_4246ec24-1a4c-19dd-57c9-32d4a8e0cbaa" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherAssets" xlink:label="loc_us-gaap_OtherAssets_53a34e15-d375-c4e0-c5cf-68e055eee5e5" 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_17ef3f41-42f7-52c0-cba1-93e7e0e1116a" xlink:to="loc_us-gaap_OtherAssets_53a34e15-d375-c4e0-c5cf-68e055eee5e5" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyStatementOfOperationsAdditionalInformationParentCompanyOnlyDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyStatementOfOperationsParentCompanyOnlyDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_489b61b6-7c39-240c-7f68-1c1675bca3b7" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_Revenues" xlink:label="loc_us-gaap_Revenues_425ada39-f194-a279-47ac-dd09cf899fb1" 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_489b61b6-7c39-240c-7f68-1c1675bca3b7" xlink:to="loc_us-gaap_Revenues_425ada39-f194-a279-47ac-dd09cf899fb1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CostsAndExpenses" xlink:label="loc_us-gaap_CostsAndExpenses_76d25f63-60a6-4deb-1fd0-84a3d98fe881" 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_489b61b6-7c39-240c-7f68-1c1675bca3b7" xlink:to="loc_us-gaap_CostsAndExpenses_76d25f63-60a6-4deb-1fd0-84a3d98fe881" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherExpenses" xlink:label="loc_us-gaap_OtherExpenses_bfd7e5fc-7065-bb3c-fbb7-c4cf6484ddd1" 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_76d25f63-60a6-4deb-1fd0-84a3d98fe881" xlink:to="loc_us-gaap_OtherExpenses_bfd7e5fc-7065-bb3c-fbb7-c4cf6484ddd1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_InterestExpense" xlink:label="loc_us-gaap_InterestExpense_16e9f6a6-5524-a7b1-7e7c-73ee97610ec6" 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_76d25f63-60a6-4deb-1fd0-84a3d98fe881" xlink:to="loc_us-gaap_InterestExpense_16e9f6a6-5524-a7b1-7e7c-73ee97610ec6" xlink:type="arc" />
    <link:loc xlink:href="nmih-20191231.xsd#nmih_GainLossonChangeinFairValueofWarrantLiability" xlink:label="loc_nmih_GainLossonChangeinFairValueofWarrantLiability_1a7b86c8-485c-25c0-c26f-df89415dc771" xlink:type="locator" />
    <link:calculationArc order="3" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_76d25f63-60a6-4deb-1fd0-84a3d98fe881" xlink:to="loc_nmih_GainLossonChangeinFairValueofWarrantLiability_1a7b86c8-485c-25c0-c26f-df89415dc771" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncomeLossFromEquityMethodInvestments" xlink:label="loc_us-gaap_IncomeLossFromEquityMethodInvestments_86dec120-3352-31c8-fc61-55992f948bdd" 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_489b61b6-7c39-240c-7f68-1c1675bca3b7" xlink:to="loc_us-gaap_IncomeLossFromEquityMethodInvestments_86dec120-3352-31c8-fc61-55992f948bdd" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_5e0cb0dc-b25c-aaae-62f8-cb90f31a16a1" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax_e88bd855-1cc4-7d92-7586-c29e344f0391" 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_5e0cb0dc-b25c-aaae-62f8-cb90f31a16a1" xlink:to="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax_e88bd855-1cc4-7d92-7586-c29e344f0391" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax_dea146b3-6d50-c215-7c85-641051f14bf2" 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_5e0cb0dc-b25c-aaae-62f8-cb90f31a16a1" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax_dea146b3-6d50-c215-7c85-641051f14bf2" xlink:type="arc" />
    <link:loc xlink:href="nmih-20191231.xsd#nmih_OtherComprehensiveIncomeLossNetofTaxPortionAttributabletoSubsidiary" xlink:label="loc_nmih_OtherComprehensiveIncomeLossNetofTaxPortionAttributabletoSubsidiary_75308a99-a558-14f0-6ef1-34bce0cee32a" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_5e0cb0dc-b25c-aaae-62f8-cb90f31a16a1" xlink:to="loc_nmih_OtherComprehensiveIncomeLossNetofTaxPortionAttributabletoSubsidiary_75308a99-a558-14f0-6ef1-34bce0cee32a" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyStatementsOfCashFlowsParentCompanyOnlyDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_0f07a806-a2da-6d18-a7a9-d734fad1f3b0" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PaymentsToAcquireInterestInSubsidiariesAndAffiliates" xlink:label="loc_us-gaap_PaymentsToAcquireInterestInSubsidiariesAndAffiliates_b92a22f8-1cb9-094b-2ac8-a15b13e50636" 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_0f07a806-a2da-6d18-a7a9-d734fad1f3b0" xlink:to="loc_us-gaap_PaymentsToAcquireInterestInSubsidiariesAndAffiliates_b92a22f8-1cb9-094b-2ac8-a15b13e50636" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PaymentsToAcquireShortTermInvestments" xlink:label="loc_us-gaap_PaymentsToAcquireShortTermInvestments_64589f54-c78b-3b4d-2741-1fc26cfb953a" 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_0f07a806-a2da-6d18-a7a9-d734fad1f3b0" xlink:to="loc_us-gaap_PaymentsToAcquireShortTermInvestments_64589f54-c78b-3b4d-2741-1fc26cfb953a" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt" xlink:label="loc_us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt_8b51ae5f-8f14-ae0e-00e7-8f4e716f2f96" 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_0f07a806-a2da-6d18-a7a9-d734fad1f3b0" xlink:to="loc_us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt_8b51ae5f-8f14-ae0e-00e7-8f4e716f2f96" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ProceedsFromSaleOfShortTermInvestments" xlink:label="loc_us-gaap_ProceedsFromSaleOfShortTermInvestments_cfe928e9-32cc-877c-5be1-d45ac401869a" 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_0f07a806-a2da-6d18-a7a9-d734fad1f3b0" xlink:to="loc_us-gaap_ProceedsFromSaleOfShortTermInvestments_cfe928e9-32cc-877c-5be1-d45ac401869a" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ProceedsFromSaleAndMaturityOfAvailableForSaleSecurities" xlink:label="loc_us-gaap_ProceedsFromSaleAndMaturityOfAvailableForSaleSecurities_83cf65a5-9616-b748-1d6c-92f0b7da6e69" 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_0f07a806-a2da-6d18-a7a9-d734fad1f3b0" xlink:to="loc_us-gaap_ProceedsFromSaleAndMaturityOfAvailableForSaleSecurities_83cf65a5-9616-b748-1d6c-92f0b7da6e69" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PaymentsToAcquirePropertyPlantAndEquipment" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_0f8df60b-841f-6df5-83c3-e4049d366459" xlink:type="locator" />
    <link:calculationArc order="6" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_0f07a806-a2da-6d18-a7a9-d734fad1f3b0" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_0f8df60b-841f-6df5-83c3-e4049d366459" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlySupplementalNotesParentCompanyOnlyDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ScheduleIvFinancialInformationOfRegistrantReinsurance" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ScheduleIvFinancialInformationOfRegistrantReinsuranceDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PremiumsEarnedNet" xlink:label="loc_us-gaap_PremiumsEarnedNet_88dba276-a88f-9f62-bf2f-2675783c9e0a" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DirectPremiumsEarned" xlink:label="loc_us-gaap_DirectPremiumsEarned_67e82947-5bfb-6a68-2706-347a20e0b24b" 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_88dba276-a88f-9f62-bf2f-2675783c9e0a" xlink:to="loc_us-gaap_DirectPremiumsEarned_67e82947-5bfb-6a68-2706-347a20e0b24b" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CededPremiumsEarned" xlink:label="loc_us-gaap_CededPremiumsEarned_aba68a68-f7d1-18a9-7a0e-49a99ddbb456" 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_88dba276-a88f-9f62-bf2f-2675783c9e0a" xlink:to="loc_us-gaap_CededPremiumsEarned_aba68a68-f7d1-18a9-7a0e-49a99ddbb456" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AssumedPremiumsEarned" xlink:label="loc_us-gaap_AssumedPremiumsEarned_95b6ffa0-808f-3e69-5f3f-730760895c47" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PremiumsEarnedNet_88dba276-a88f-9f62-bf2f-2675783c9e0a" xlink:to="loc_us-gaap_AssumedPremiumsEarned_95b6ffa0-808f-3e69-5f3f-730760895c47" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ShareBasedCompensation" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ShareBasedCompensationNarrativeDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ShareBasedCompensationRestrictedStockUnitsActivityDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ShareBasedCompensationStockOptionActivityDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ShareBasedCompensationStockOptionValuationAssumptionsDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ShareBasedCompensationTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/SoftwareAndEquipment" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/SoftwareAndEquipmentNarrativeDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/SoftwareAndEquipmentNetBalancesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_4246ec24-1a4c-19dd-57c9-32d4a8e0cbaa" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PropertyPlantAndEquipmentGross" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_94cd7971-9d17-1c6e-6642-d4d38fb682b6" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentNet_4246ec24-1a4c-19dd-57c9-32d4a8e0cbaa" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentGross_94cd7971-9d17-1c6e-6642-d4d38fb682b6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment" xlink:label="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_7b7a3a8d-eb3d-0c85-68cc-b3d4d184ff23" xlink:type="locator" />
    <link:calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentNet_4246ec24-1a4c-19dd-57c9-32d4a8e0cbaa" xlink:to="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_7b7a3a8d-eb3d-0c85-68cc-b3d4d184ff23" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/SoftwareAndEquipmentTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/SummaryOfAccountingPolicies" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/SummaryOfAccountingPoliciesDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/SummaryOfAccountingPoliciesPolicies" 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/WarrantsDetails" xlink:type="extended" />
</link:linkbase>
