<?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-20161231.xsd#CommitmentsAndContingencies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails" xlink:href="nmih-20161231.xsd#CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/CommitmentsAndContingenciesNarrativeDetails" xlink:href="nmih-20161231.xsd#CommitmentsAndContingenciesNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/CommitmentsAndContingenciesTables" xlink:href="nmih-20161231.xsd#CommitmentsAndContingenciesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/CommonStockOfferings" xlink:href="nmih-20161231.xsd#CommonStockOfferings" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/CommonStockOfferingsDetails" xlink:href="nmih-20161231.xsd#CommonStockOfferingsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ConsolidatedBalanceSheetsConsolidatedBalanceSheets" xlink:href="nmih-20161231.xsd#ConsolidatedBalanceSheetsConsolidatedBalanceSheets" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ConsolidatedBalanceSheetsParenthetical" xlink:href="nmih-20161231.xsd#ConsolidatedBalanceSheetsParenthetical" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ConsolidatedStatementsOfCashFlows" xlink:href="nmih-20161231.xsd#ConsolidatedStatementsOfCashFlows" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ConsolidatedStatementsOfComprehensiveIncomeLossConsolidatedStatementsOfComprehensiveIncomeLoss" xlink:href="nmih-20161231.xsd#ConsolidatedStatementsOfComprehensiveIncomeLossConsolidatedStatementsOfComprehensiveIncomeLoss" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ConsolidatedStatementsOfComprehensiveIncomeLossParenthetical" xlink:href="nmih-20161231.xsd#ConsolidatedStatementsOfComprehensiveIncomeLossParenthetical" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ConsolidatedStatementsOfShareholdersEquity" xlink:href="nmih-20161231.xsd#ConsolidatedStatementsOfShareholdersEquity" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ConsolidatedStatementsOfShareholdersEquityParenthetical" xlink:href="nmih-20161231.xsd#ConsolidatedStatementsOfShareholdersEquityParenthetical" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/DocumentAndEntityInformation" xlink:href="nmih-20161231.xsd#DocumentAndEntityInformation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/EarningsLossPerShareEps" xlink:href="nmih-20161231.xsd#EarningsLossPerShareEps" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/EarningsLossPerShareEpsDetails" xlink:href="nmih-20161231.xsd#EarningsLossPerShareEpsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/EarningsLossPerShareEpsNarrativeDetails" xlink:href="nmih-20161231.xsd#EarningsLossPerShareEpsNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/EarningsLossPerShareEpsTables" xlink:href="nmih-20161231.xsd#EarningsLossPerShareEpsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstruments" xlink:href="nmih-20161231.xsd#FairValueOfFinancialInstruments" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsAssetsAndLiabilitiesAtFairValueDetails" xlink:href="nmih-20161231.xsd#FairValueOfFinancialInstrumentsAssetsAndLiabilitiesAtFairValueDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsNarrativeDetails" xlink:href="nmih-20161231.xsd#FairValueOfFinancialInstrumentsNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsRollFowardOfLevel3LiabilitiesMeasuredAtFairValueDetails" xlink:href="nmih-20161231.xsd#FairValueOfFinancialInstrumentsRollFowardOfLevel3LiabilitiesMeasuredAtFairValueDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsTables" xlink:href="nmih-20161231.xsd#FairValueOfFinancialInstrumentsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxes" xlink:href="nmih-20161231.xsd#IncomeTaxes" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxesComponentsOfProvisionForIncomeTaxesBenefitsDetails" xlink:href="nmih-20161231.xsd#IncomeTaxesComponentsOfProvisionForIncomeTaxesBenefitsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxesDeferredTaxAssetAndLiabilitiesDetails" xlink:href="nmih-20161231.xsd#IncomeTaxesDeferredTaxAssetAndLiabilitiesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxesIncomeTaxReconciliationDetails" xlink:href="nmih-20161231.xsd#IncomeTaxesIncomeTaxReconciliationDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxesNarrativeDetails" xlink:href="nmih-20161231.xsd#IncomeTaxesNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxesTables" xlink:href="nmih-20161231.xsd#IncomeTaxesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwill" xlink:href="nmih-20161231.xsd#IntangibleAssetsAndGoodwill" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwillDetails" xlink:href="nmih-20161231.xsd#IntangibleAssetsAndGoodwillDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwillTables" xlink:href="nmih-20161231.xsd#IntangibleAssetsAndGoodwillTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/Investments" xlink:href="nmih-20161231.xsd#Investments" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsFairValuesAndGrossUnrealizedGainsAndLossesOnInvestmentsDetails" xlink:href="nmih-20161231.xsd#InvestmentsFairValuesAndGrossUnrealizedGainsAndLossesOnInvestmentsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNarrativeDetails" xlink:href="nmih-20161231.xsd#InvestmentsNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNetInvestmentIncomeDetails" xlink:href="nmih-20161231.xsd#InvestmentsNetInvestmentIncomeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNetRealizedInvestmentsGainsLossesDetails" xlink:href="nmih-20161231.xsd#InvestmentsNetRealizedInvestmentsGainsLossesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsScheduledMaturitiesDetails" xlink:href="nmih-20161231.xsd#InvestmentsScheduledMaturitiesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsTables" xlink:href="nmih-20161231.xsd#InvestmentsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/InvestmentsUnrealizedLossesDetails" xlink:href="nmih-20161231.xsd#InvestmentsUnrealizedLossesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/OrganizationAndBasisOfPresentation" xlink:href="nmih-20161231.xsd#OrganizationAndBasisOfPresentation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/OrganizationAndBasisOfPresentationDetails" xlink:href="nmih-20161231.xsd#OrganizationAndBasisOfPresentationDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/QuarterlyFinancialDataUnaudited" xlink:href="nmih-20161231.xsd#QuarterlyFinancialDataUnaudited" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/QuarterlyFinancialDataUnauditedDetails" xlink:href="nmih-20161231.xsd#QuarterlyFinancialDataUnauditedDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/QuarterlyFinancialDataUnauditedTables" xlink:href="nmih-20161231.xsd#QuarterlyFinancialDataUnauditedTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/RegulatoryInformation" xlink:href="nmih-20161231.xsd#RegulatoryInformation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/RegulatoryInformationNarrativeDetails" xlink:href="nmih-20161231.xsd#RegulatoryInformationNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/RegulatoryInformationScheduleOfCombinedStatutoryNetLossStatutorySurplusContingencyReserveAndRtcRatiosDetails" xlink:href="nmih-20161231.xsd#RegulatoryInformationScheduleOfCombinedStatutoryNetLossStatutorySurplusContingencyReserveAndRtcRatiosDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/RegulatoryInformationTables" xlink:href="nmih-20161231.xsd#RegulatoryInformationTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/Reinsurance" xlink:href="nmih-20161231.xsd#Reinsurance" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReinsuranceAmountsCededRelatedTo2016QsrTransactionDetails" xlink:href="nmih-20161231.xsd#ReinsuranceAmountsCededRelatedTo2016QsrTransactionDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReinsuranceDetails" xlink:href="nmih-20161231.xsd#ReinsuranceDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReinsuranceEffectOfReinsuranceOnNetPremiumsWrittenAndEarnedDetails" xlink:href="nmih-20161231.xsd#ReinsuranceEffectOfReinsuranceOnNetPremiumsWrittenAndEarnedDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReinsuranceTables" xlink:href="nmih-20161231.xsd#ReinsuranceTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpenses" xlink:href="nmih-20161231.xsd#ReservesForInsuranceClaimsAndClaimExpenses" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesAverageAnnualPercentagePayoutOfIncurredClaimsByAgeNetOfReinsuranceDetails" xlink:href="nmih-20161231.xsd#ReservesForInsuranceClaimsAndClaimExpensesAverageAnnualPercentagePayoutOfIncurredClaimsByAgeNetOfReinsuranceDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesClaimDevelopmentByAccidentYearAndReconciliationOfReserveForInsuranceClaimsAndClaimsExpenseDetails" xlink:href="nmih-20161231.xsd#ReservesForInsuranceClaimsAndClaimExpensesClaimDevelopmentByAccidentYearAndReconciliationOfReserveForInsuranceClaimsAndClaimsExpenseDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesNarrativeDetails" xlink:href="nmih-20161231.xsd#ReservesForInsuranceClaimsAndClaimExpensesNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesReconciliationOfDisclosureOfIncurredAndPaidClaimsDevelopmentToLiabilityForUnpaidClaimsAndClaimsAdjustmentExpensesDetails" xlink:href="nmih-20161231.xsd#ReservesForInsuranceClaimsAndClaimExpensesReconciliationOfDisclosureOfIncurredAndPaidClaimsDevelopmentToLiabilityForUnpaidClaimsAndClaimsAdjustmentExpensesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesReconciliationOfReserveBalancesForInsuranceClaimsExpensesDetails" xlink:href="nmih-20161231.xsd#ReservesForInsuranceClaimsAndClaimExpensesReconciliationOfReserveBalancesForInsuranceClaimsExpensesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesTables" xlink:href="nmih-20161231.xsd#ReservesForInsuranceClaimsAndClaimExpensesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ScheduleISummaryOfInvestmentsOtherThanInvestmentsInRelatedParties" xlink:href="nmih-20161231.xsd#ScheduleISummaryOfInvestmentsOtherThanInvestmentsInRelatedParties" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ScheduleISummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesDetails" xlink:href="nmih-20161231.xsd#ScheduleISummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlySchedule" xlink:href="nmih-20161231.xsd#ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlySchedule" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyScheduleBalanceSheetAdditionalInformationDetails" xlink:href="nmih-20161231.xsd#ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyScheduleBalanceSheetAdditionalInformationDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyScheduleBalanceSheetDetails" xlink:href="nmih-20161231.xsd#ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyScheduleBalanceSheetDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyScheduleCashFlowStatementDetails" xlink:href="nmih-20161231.xsd#ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyScheduleCashFlowStatementDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyScheduleIncomeStatementAdditionalInformationDetails" xlink:href="nmih-20161231.xsd#ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyScheduleIncomeStatementAdditionalInformationDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyScheduleIncomeStatementDetails" xlink:href="nmih-20161231.xsd#ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyScheduleIncomeStatementDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlySupplementalNotesDetails" xlink:href="nmih-20161231.xsd#ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlySupplementalNotesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ScheduleIvFinancialInformationOfRegistrantReinsuranceParentCompanyOnlyDetails" xlink:href="nmih-20161231.xsd#ScheduleIvFinancialInformationOfRegistrantReinsuranceParentCompanyOnlyDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ScheduleIvFinancialInformationOfRegistrantReinsuranceParentCompanyOnlySchedule" xlink:href="nmih-20161231.xsd#ScheduleIvFinancialInformationOfRegistrantReinsuranceParentCompanyOnlySchedule" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensation" xlink:href="nmih-20161231.xsd#ShareBasedCompensation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensationNarrativeDetails" xlink:href="nmih-20161231.xsd#ShareBasedCompensationNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensationRestrictedStockUnitsActivityDetails" xlink:href="nmih-20161231.xsd#ShareBasedCompensationRestrictedStockUnitsActivityDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensationRestrictedStockUnitsValuationAssumptionsDetails" xlink:href="nmih-20161231.xsd#ShareBasedCompensationRestrictedStockUnitsValuationAssumptionsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensationStockOptionActivityDetails" xlink:href="nmih-20161231.xsd#ShareBasedCompensationStockOptionActivityDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensationStockOptionsValuationAssumptionsDetails" xlink:href="nmih-20161231.xsd#ShareBasedCompensationStockOptionsValuationAssumptionsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensationTables" xlink:href="nmih-20161231.xsd#ShareBasedCompensationTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/SoftwareAndEquipment" xlink:href="nmih-20161231.xsd#SoftwareAndEquipment" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/SoftwareAndEquipmentDetails" xlink:href="nmih-20161231.xsd#SoftwareAndEquipmentDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/SoftwareAndEquipmentNarrativeDetails" xlink:href="nmih-20161231.xsd#SoftwareAndEquipmentNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/SoftwareAndEquipmentTables" xlink:href="nmih-20161231.xsd#SoftwareAndEquipmentTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/SummaryOfAccountingPolicies" xlink:href="nmih-20161231.xsd#SummaryOfAccountingPolicies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/SummaryOfAccountingPoliciesDetails" xlink:href="nmih-20161231.xsd#SummaryOfAccountingPoliciesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/SummaryOfAccountingPoliciesPolicies" xlink:href="nmih-20161231.xsd#SummaryOfAccountingPoliciesPolicies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/TermLoan" xlink:href="nmih-20161231.xsd#TermLoan" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/TermLoanNarrativeDetails" xlink:href="nmih-20161231.xsd#TermLoanNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/TermLoanScheduleOfFuturePrincipalPaymentsDetails" xlink:href="nmih-20161231.xsd#TermLoanScheduleOfFuturePrincipalPaymentsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/TermLoanTables" xlink:href="nmih-20161231.xsd#TermLoanTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/Warrants" xlink:href="nmih-20161231.xsd#Warrants" xlink:type="simple" />
  <link:roleRef roleURI="http://www.nationalmi.com/role/WarrantsDetails" xlink:href="nmih-20161231.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/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDue" xlink:label="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDue_ab95e8f2-93e0-6140-6e56-a79823c16c0d" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDueCurrent" xlink:label="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDueCurrent_00eaf688-6963-ad8a-03b8-e257d107b9c7" 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_ab95e8f2-93e0-6140-6e56-a79823c16c0d" xlink:to="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDueCurrent_00eaf688-6963-ad8a-03b8-e257d107b9c7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDueInTwoYears" xlink:label="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDueInTwoYears_5519a64c-2a56-b1d5-2ab3-ee16d7d2a7a5" 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_ab95e8f2-93e0-6140-6e56-a79823c16c0d" xlink:to="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDueInTwoYears_5519a64c-2a56-b1d5-2ab3-ee16d7d2a7a5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDueInThreeYears" xlink:label="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDueInThreeYears_2154b0cd-b6a4-a252-5801-385edf9d9702" 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_ab95e8f2-93e0-6140-6e56-a79823c16c0d" xlink:to="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDueInThreeYears_2154b0cd-b6a4-a252-5801-385edf9d9702" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFourYears" xlink:label="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFourYears_c2ad5d03-49c6-819a-1ac6-e6584eea34ff" 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_ab95e8f2-93e0-6140-6e56-a79823c16c0d" xlink:to="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFourYears_c2ad5d03-49c6-819a-1ac6-e6584eea34ff" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFiveYears" xlink:label="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFiveYears_d7e45dda-b3de-1974-4726-54d18939cd1c" 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_ab95e8f2-93e0-6140-6e56-a79823c16c0d" xlink:to="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFiveYears_d7e45dda-b3de-1974-4726-54d18939cd1c" xlink:type="arc" />
    <link:loc xlink:href="nmih-20161231.xsd#nmih_OperatingLeasesFutureMinimumPaymentsDueinSixYears" xlink:label="loc_nmih_OperatingLeasesFutureMinimumPaymentsDueinSixYears_573985691D81BAF8B98C96A0E864DAC3" xlink:type="locator" />
    <link:calculationArc order="6" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDue_ab95e8f2-93e0-6140-6e56-a79823c16c0d" xlink:to="loc_nmih_OperatingLeasesFutureMinimumPaymentsDueinSixYears_573985691D81BAF8B98C96A0E864DAC3" xlink:type="arc" />
    <link:loc xlink:href="nmih-20161231.xsd#nmih_OperatingLeasesFutureMinimumPaymentsDueinSevenYears" xlink:label="loc_nmih_OperatingLeasesFutureMinimumPaymentsDueinSevenYears_987C195645F4135E530E96A13F6D30CD" xlink:type="locator" />
    <link:calculationArc order="7" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDue_ab95e8f2-93e0-6140-6e56-a79823c16c0d" xlink:to="loc_nmih_OperatingLeasesFutureMinimumPaymentsDueinSevenYears_987C195645F4135E530E96A13F6D30CD" 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/CommitmentsAndContingenciesTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CommonStockOfferings" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/CommonStockOfferingsDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ConsolidatedBalanceSheetsConsolidatedBalanceSheets" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_LiabilitiesAndStockholdersEquity" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_04e17fb3-9b77-1c98-f460-7f5dd0c01008" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_Liabilities" xlink:label="loc_us-gaap_Liabilities_6d3ec995-5062-ef92-dd72-b570c1eafdc8" 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_04e17fb3-9b77-1c98-f460-7f5dd0c01008" xlink:to="loc_us-gaap_Liabilities_6d3ec995-5062-ef92-dd72-b570c1eafdc8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_LongTermDebt" xlink:label="loc_us-gaap_LongTermDebt_69e5de31-e379-3d10-54e1-db1271f781f0" 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_6d3ec995-5062-ef92-dd72-b570c1eafdc8" xlink:to="loc_us-gaap_LongTermDebt_69e5de31-e379-3d10-54e1-db1271f781f0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_UnearnedPremiums" xlink:label="loc_us-gaap_UnearnedPremiums_a0495c28-e368-36b3-33bb-8621cd43f1e3" 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_6d3ec995-5062-ef92-dd72-b570c1eafdc8" xlink:to="loc_us-gaap_UnearnedPremiums_a0495c28-e368-36b3-33bb-8621cd43f1e3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent" xlink:label="loc_us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent_6abb8328-6056-4e30-86f3-0e87ddda7a25" 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_6d3ec995-5062-ef92-dd72-b570c1eafdc8" xlink:to="loc_us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent_6abb8328-6056-4e30-86f3-0e87ddda7a25" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense" xlink:label="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_75b247f6-acf8-264e-d372-996aedbefe30" 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_6d3ec995-5062-ef92-dd72-b570c1eafdc8" xlink:to="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_75b247f6-acf8-264e-d372-996aedbefe30" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_FundsHeldUnderReinsuranceAgreementsLiability" xlink:label="loc_us-gaap_FundsHeldUnderReinsuranceAgreementsLiability_2a94749f-4cfc-55a5-a723-c152cf3174ac" 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_6d3ec995-5062-ef92-dd72-b570c1eafdc8" xlink:to="loc_us-gaap_FundsHeldUnderReinsuranceAgreementsLiability_2a94749f-4cfc-55a5-a723-c152cf3174ac" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DeferredRevenue" xlink:label="loc_us-gaap_DeferredRevenue_0a0106fd-a196-7916-5adf-10dea44e4d50" 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_6d3ec995-5062-ef92-dd72-b570c1eafdc8" xlink:to="loc_us-gaap_DeferredRevenue_0a0106fd-a196-7916-5adf-10dea44e4d50" xlink:type="arc" />
    <link:loc xlink:href="nmih-20161231.xsd#nmih_WarrantLiability" xlink:label="loc_nmih_WarrantLiability_a01e58e8-a500-1a90-7039-c1238e73b614" 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_6d3ec995-5062-ef92-dd72-b570c1eafdc8" xlink:to="loc_nmih_WarrantLiability_a01e58e8-a500-1a90-7039-c1238e73b614" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DeferredTaxLiabilities" xlink:label="loc_us-gaap_DeferredTaxLiabilities_f549ecdb-d466-ac37-840e-8410ff9e5017" 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_6d3ec995-5062-ef92-dd72-b570c1eafdc8" xlink:to="loc_us-gaap_DeferredTaxLiabilities_f549ecdb-d466-ac37-840e-8410ff9e5017" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_CommitmentsAndContingencies" xlink:label="loc_us-gaap_CommitmentsAndContingencies_49d65a66-0444-b198-9d28-5c0811b1bdf3" 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_04e17fb3-9b77-1c98-f460-7f5dd0c01008" xlink:to="loc_us-gaap_CommitmentsAndContingencies_49d65a66-0444-b198-9d28-5c0811b1bdf3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_StockholdersEquity" xlink:label="loc_us-gaap_StockholdersEquity_2644da13-7baa-0a2f-63e0-0906a691ba01" 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_04e17fb3-9b77-1c98-f460-7f5dd0c01008" xlink:to="loc_us-gaap_StockholdersEquity_2644da13-7baa-0a2f-63e0-0906a691ba01" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_CommonStockValueOutstanding" xlink:label="loc_us-gaap_CommonStockValueOutstanding_677d6c3d-e00c-fe93-30c5-8a015cb95571" 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_2644da13-7baa-0a2f-63e0-0906a691ba01" xlink:to="loc_us-gaap_CommonStockValueOutstanding_677d6c3d-e00c-fe93-30c5-8a015cb95571" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AdditionalPaidInCapital" xlink:label="loc_us-gaap_AdditionalPaidInCapital_27e98f68-fe6c-3420-5b5a-861a4dc60800" 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_2644da13-7baa-0a2f-63e0-0906a691ba01" xlink:to="loc_us-gaap_AdditionalPaidInCapital_27e98f68-fe6c-3420-5b5a-861a4dc60800" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_aeb1020a-508a-a8c1-f34c-bafff16c26cb" 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_2644da13-7baa-0a2f-63e0-0906a691ba01" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_aeb1020a-508a-a8c1-f34c-bafff16c26cb" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_RetainedEarningsAccumulatedDeficit" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_f759e73e-9f4f-941e-1138-49bc44f6b118" 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_2644da13-7baa-0a2f-63e0-0906a691ba01" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_f759e73e-9f4f-941e-1138-49bc44f6b118" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_Assets" xlink:label="loc_us-gaap_Assets_08bee809-e27e-48c3-da2d-5d52948eb470" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_d38a4602-a509-ea84-d4a7-84b6783fb543" 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_08bee809-e27e-48c3-da2d-5d52948eb470" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_d38a4602-a509-ea84-d4a7-84b6783fb543" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_ec544f28-9c7b-137c-e428-9ae47c2375fc" 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_08bee809-e27e-48c3-da2d-5d52948eb470" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_ec544f28-9c7b-137c-e428-9ae47c2375fc" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_PremiumsReceivableAtCarryingValue" xlink:label="loc_us-gaap_PremiumsReceivableAtCarryingValue_b0d63c35-f4f9-fe48-1839-982058b67c5f" 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_08bee809-e27e-48c3-da2d-5d52948eb470" xlink:to="loc_us-gaap_PremiumsReceivableAtCarryingValue_b0d63c35-f4f9-fe48-1839-982058b67c5f" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AccruedInvestmentIncomeReceivable" xlink:label="loc_us-gaap_AccruedInvestmentIncomeReceivable_fe5887dd-1af0-1da1-a824-cfc843bb2a09" 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_08bee809-e27e-48c3-da2d-5d52948eb470" xlink:to="loc_us-gaap_AccruedInvestmentIncomeReceivable_fe5887dd-1af0-1da1-a824-cfc843bb2a09" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_PrepaidExpenseCurrentAndNoncurrent" xlink:label="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_952a85fb-1530-60f0-bc8f-176c304f1460" 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_08bee809-e27e-48c3-da2d-5d52948eb470" xlink:to="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_952a85fb-1530-60f0-bc8f-176c304f1460" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DeferredPolicyAcquisitionCosts" xlink:label="loc_us-gaap_DeferredPolicyAcquisitionCosts_d90fb7e5-52de-41ac-86fe-702d60fae22c" 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_08bee809-e27e-48c3-da2d-5d52948eb470" xlink:to="loc_us-gaap_DeferredPolicyAcquisitionCosts_d90fb7e5-52de-41ac-86fe-702d60fae22c" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_68e7c3c1-9b8d-84fe-3a5c-d69c15dfe7a2" 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_08bee809-e27e-48c3-da2d-5d52948eb470" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_68e7c3c1-9b8d-84fe-3a5c-d69c15dfe7a2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_IntangibleAssetsNetIncludingGoodwill" xlink:label="loc_us-gaap_IntangibleAssetsNetIncludingGoodwill_189bf17a-4016-1522-7027-4f611142f123" 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_08bee809-e27e-48c3-da2d-5d52948eb470" xlink:to="loc_us-gaap_IntangibleAssetsNetIncludingGoodwill_189bf17a-4016-1522-7027-4f611142f123" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_OtherAssets" xlink:label="loc_us-gaap_OtherAssets_89f93c65-85fd-29e8-1936-9df58443c9af" 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_08bee809-e27e-48c3-da2d-5d52948eb470" xlink:to="loc_us-gaap_OtherAssets_89f93c65-85fd-29e8-1936-9df58443c9af" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_PrepaidReinsurancePremiums" xlink:label="loc_us-gaap_PrepaidReinsurancePremiums_25472da9-3d25-e3dc-e822-32c27502e445" 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_08bee809-e27e-48c3-da2d-5d52948eb470" xlink:to="loc_us-gaap_PrepaidReinsurancePremiums_25472da9-3d25-e3dc-e822-32c27502e445" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DeferredIncomeTaxAssetsNet" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_935fce52-c22c-b328-8ef2-ac103d3c71ac" xlink:type="locator" />
    <link:calculationArc order="11" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_08bee809-e27e-48c3-da2d-5d52948eb470" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_935fce52-c22c-b328-8ef2-ac103d3c71ac" 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/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_CashAndCashEquivalentsPeriodIncreaseDecrease" xlink:label="loc_us-gaap_CashAndCashEquivalentsPeriodIncreaseDecrease_104af714-3829-5d79-3fb3-059f86c366da" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashAndCashEquivalentsPeriodIncreaseDecrease_104af714-3829-5d79-3fb3-059f86c366da" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_8baf87d5-5f2f-7d0d-cb85-b9f249bae0c5" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_NetIncomeLoss_8baf87d5-5f2f-7d0d-cb85-b9f249bae0c5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet_86be9232-4c75-212d-a13b-e678f426cb85" xlink:type="locator" />
    <link:calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet_86be9232-4c75-212d-a13b-e678f426cb85" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_FairValueAdjustmentOfWarrants" xlink:label="loc_us-gaap_FairValueAdjustmentOfWarrants_5d4a5cdc-af3d-5a6b-4771-61ef2a3cbcb0" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_FairValueAdjustmentOfWarrants_5d4a5cdc-af3d-5a6b-4771-61ef2a3cbcb0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DepreciationAmortizationAndAccretionNet" xlink:label="loc_us-gaap_DepreciationAmortizationAndAccretionNet_31fc303b-1b94-6362-1b8a-157609a23bce" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_DepreciationAmortizationAndAccretionNet_31fc303b-1b94-6362-1b8a-157609a23bce" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AmortizationOfFinancingCostsAndDiscounts" xlink:label="loc_us-gaap_AmortizationOfFinancingCostsAndDiscounts_3358d115-01c9-6550-edda-293e7863fabe" xlink:type="locator" />
    <link:calculationArc order="5" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_AmortizationOfFinancingCostsAndDiscounts_3358d115-01c9-6550-edda-293e7863fabe" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_ShareBasedCompensation" xlink:label="loc_us-gaap_ShareBasedCompensation_432488d8-28ca-5b8d-679b-29be120957b5" xlink:type="locator" />
    <link:calculationArc order="6" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_ShareBasedCompensation_432488d8-28ca-5b8d-679b-29be120957b5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_IncreaseDecreaseInAccruedIncomeTaxesPayable" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedIncomeTaxesPayable_7141899e-1a56-24a9-9015-497ee51d7b39" xlink:type="locator" />
    <link:calculationArc order="7" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedIncomeTaxesPayable_7141899e-1a56-24a9-9015-497ee51d7b39" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable_07cf7d67-8476-c183-f65e-0c166d716452" xlink:type="locator" />
    <link:calculationArc order="8" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable_07cf7d67-8476-c183-f65e-0c166d716452" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_IncreaseDecreaseInPremiumsReceivable" xlink:label="loc_us-gaap_IncreaseDecreaseInPremiumsReceivable_01c5c894-3921-0322-67ce-e8df95324e83" xlink:type="locator" />
    <link:calculationArc order="9" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_IncreaseDecreaseInPremiumsReceivable_01c5c894-3921-0322-67ce-e8df95324e83" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_IncreaseDecreaseInPrepaidExpense" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidExpense_4ec1e09a-8f5f-fa52-61b8-04c8cc8071ed" xlink:type="locator" />
    <link:calculationArc order="10" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidExpense_4ec1e09a-8f5f-fa52-61b8-04c8cc8071ed" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_IncreaseDecreaseInDeferredPolicyAcquisitionCosts" xlink:label="loc_us-gaap_IncreaseDecreaseInDeferredPolicyAcquisitionCosts_37c3b709-9e77-069f-44a3-f3924a4613f4" xlink:type="locator" />
    <link:calculationArc order="11" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_IncreaseDecreaseInDeferredPolicyAcquisitionCosts_37c3b709-9e77-069f-44a3-f3924a4613f4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_e99fae14-a0f3-93f9-f0e6-bc9b4dc580ef" xlink:type="locator" />
    <link:calculationArc order="12" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_e99fae14-a0f3-93f9-f0e6-bc9b4dc580ef" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_IncreaseDecreaseInUnearnedPremiums" xlink:label="loc_us-gaap_IncreaseDecreaseInUnearnedPremiums_4ff379aa-baab-0b28-33cf-c4274622fc64" xlink:type="locator" />
    <link:calculationArc order="13" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_IncreaseDecreaseInUnearnedPremiums_4ff379aa-baab-0b28-33cf-c4274622fc64" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_IncreaseDecreaseInLiabilityForClaimsAndClaimsAdjustmentExpenseReserve" xlink:label="loc_us-gaap_IncreaseDecreaseInLiabilityForClaimsAndClaimsAdjustmentExpenseReserve_bb04f46e-b7b3-b656-9c3f-b074042fad4f" xlink:type="locator" />
    <link:calculationArc order="14" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_IncreaseDecreaseInLiabilityForClaimsAndClaimsAdjustmentExpenseReserve_bb04f46e-b7b3-b656-9c3f-b074042fad4f" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_880f9863-dd81-7240-4418-c9f1ba4fd53e" xlink:type="locator" />
    <link:calculationArc order="15" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_880f9863-dd81-7240-4418-c9f1ba4fd53e" xlink:type="arc" />
    <link:loc xlink:href="nmih-20161231.xsd#nmih_IncreaseDecreaseinReinsuranceAssetsandLiabilities" xlink:label="loc_nmih_IncreaseDecreaseinReinsuranceAssetsandLiabilities_A071A43A70ADF20DE9CA26A0F1A1F9D8" xlink:type="locator" />
    <link:calculationArc order="16" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_nmih_IncreaseDecreaseinReinsuranceAssetsandLiabilities_A071A43A70ADF20DE9CA26A0F1A1F9D8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DeferredIncomeTaxesAndTaxCredits" xlink:label="loc_us-gaap_DeferredIncomeTaxesAndTaxCredits_aa347117-ecf0-6b31-16d5-636a7c2499b9" xlink:type="locator" />
    <link:calculationArc order="17" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_DeferredIncomeTaxesAndTaxCredits_aa347117-ecf0-6b31-16d5-636a7c2499b9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments" xlink:label="loc_us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments_fe59972c-181e-b516-7ec1-09a40fc27526" xlink:type="locator" />
    <link:calculationArc order="18" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments_fe59972c-181e-b516-7ec1-09a40fc27526" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_95f67350-d3ec-5d41-e3b2-a4fe7a19e15b" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashAndCashEquivalentsPeriodIncreaseDecrease_104af714-3829-5d79-3fb3-059f86c366da" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_95f67350-d3ec-5d41-e3b2-a4fe7a19e15b" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt" xlink:label="loc_us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt_5eef41ab-a09e-58ba-6708-d9dbc2498316" 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_95f67350-d3ec-5d41-e3b2-a4fe7a19e15b" xlink:to="loc_us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt_5eef41ab-a09e-58ba-6708-d9dbc2498316" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_ProceedsFromSaleAndMaturityOfAvailableForSaleSecurities" xlink:label="loc_us-gaap_ProceedsFromSaleAndMaturityOfAvailableForSaleSecurities_3d4b15de-b1bf-181b-e3f1-91381ce35d3d" 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_95f67350-d3ec-5d41-e3b2-a4fe7a19e15b" xlink:to="loc_us-gaap_ProceedsFromSaleAndMaturityOfAvailableForSaleSecurities_3d4b15de-b1bf-181b-e3f1-91381ce35d3d" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_PaymentsToAcquirePropertyPlantAndEquipment" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_991d89e2-25f7-1061-f5f8-86acc91f176b" 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_95f67350-d3ec-5d41-e3b2-a4fe7a19e15b" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_991d89e2-25f7-1061-f5f8-86acc91f176b" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_PaymentsToAcquireShortTermInvestments" xlink:label="loc_us-gaap_PaymentsToAcquireShortTermInvestments_7eefdb79-b488-fe99-9b8e-a51ddf6de5ad" 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_95f67350-d3ec-5d41-e3b2-a4fe7a19e15b" xlink:to="loc_us-gaap_PaymentsToAcquireShortTermInvestments_7eefdb79-b488-fe99-9b8e-a51ddf6de5ad" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_ProceedsFromSaleOfShortTermInvestments" xlink:label="loc_us-gaap_ProceedsFromSaleOfShortTermInvestments_e1d5c175-5fec-c1e5-c00f-3705673f3dcd" 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_95f67350-d3ec-5d41-e3b2-a4fe7a19e15b" xlink:to="loc_us-gaap_ProceedsFromSaleOfShortTermInvestments_e1d5c175-5fec-c1e5-c00f-3705673f3dcd" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_08614f0c-c3a2-4c92-7c1d-aed5de18fe70" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashAndCashEquivalentsPeriodIncreaseDecrease_104af714-3829-5d79-3fb3-059f86c366da" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_08614f0c-c3a2-4c92-7c1d-aed5de18fe70" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation" xlink:label="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_11ed54de-8651-64ce-6bd2-47983535a6d4" 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_08614f0c-c3a2-4c92-7c1d-aed5de18fe70" xlink:to="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_11ed54de-8651-64ce-6bd2-47983535a6d4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_ProceedsFromIssuanceOfCommonStock" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_df373d95-9aed-55aa-3255-855344ae0add" 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_08614f0c-c3a2-4c92-7c1d-aed5de18fe70" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_df373d95-9aed-55aa-3255-855344ae0add" xlink:type="arc" />
    <link:loc xlink:href="nmih-20161231.xsd#nmih_GainLossFromSettlementofWarrants" xlink:label="loc_nmih_GainLossFromSettlementofWarrants_ea5d644e-9b0f-3d57-2b66-c1238e9b482c" 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_08614f0c-c3a2-4c92-7c1d-aed5de18fe70" xlink:to="loc_nmih_GainLossFromSettlementofWarrants_ea5d644e-9b0f-3d57-2b66-c1238e9b482c" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_ProceedsFromIssuanceOfLongTermDebt" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfLongTermDebt_866e0d33-eabf-2b46-aabe-ae0e1d229b78" 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_08614f0c-c3a2-4c92-7c1d-aed5de18fe70" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfLongTermDebt_866e0d33-eabf-2b46-aabe-ae0e1d229b78" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_RepaymentsOfLongTermDebt" xlink:label="loc_us-gaap_RepaymentsOfLongTermDebt_90cd6d89-f315-788f-d750-05a68667e398" 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_08614f0c-c3a2-4c92-7c1d-aed5de18fe70" xlink:to="loc_us-gaap_RepaymentsOfLongTermDebt_90cd6d89-f315-788f-d750-05a68667e398" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_PaymentsOfDebtIssuanceCosts" xlink:label="loc_us-gaap_PaymentsOfDebtIssuanceCosts_21041b8b-cf55-3af3-04a5-97303c43edf7" 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_08614f0c-c3a2-4c92-7c1d-aed5de18fe70" xlink:to="loc_us-gaap_PaymentsOfDebtIssuanceCosts_21041b8b-cf55-3af3-04a5-97303c43edf7" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ConsolidatedStatementsOfComprehensiveIncomeLossConsolidatedStatementsOfComprehensiveIncomeLoss" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_Revenues" xlink:label="loc_us-gaap_Revenues_4ce4747e-ba05-83d9-3458-6f9d1635c2ec" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_NetInvestmentIncome" xlink:label="loc_us-gaap_NetInvestmentIncome_fec96e76-bde5-90be-5693-51cf6a4a2050" 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_4ce4747e-ba05-83d9-3458-6f9d1635c2ec" xlink:to="loc_us-gaap_NetInvestmentIncome_fec96e76-bde5-90be-5693-51cf6a4a2050" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet_86be9232-4c75-212d-a13b-e678f426cb85" 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_4ce4747e-ba05-83d9-3458-6f9d1635c2ec" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet_86be9232-4c75-212d-a13b-e678f426cb85" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_OtherSalesRevenueNet" xlink:label="loc_us-gaap_OtherSalesRevenueNet_888a521b-fa37-b5b1-8e28-b2ce12b7ced6" 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_4ce4747e-ba05-83d9-3458-6f9d1635c2ec" xlink:to="loc_us-gaap_OtherSalesRevenueNet_888a521b-fa37-b5b1-8e28-b2ce12b7ced6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_PremiumsEarnedNet" xlink:label="loc_us-gaap_PremiumsEarnedNet_7536213c-423b-16ae-a63f-b9e330c1e4a6" 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_4ce4747e-ba05-83d9-3458-6f9d1635c2ec" xlink:to="loc_us-gaap_PremiumsEarnedNet_7536213c-423b-16ae-a63f-b9e330c1e4a6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_OtherNonoperatingIncomeExpense" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_b936f21a-1a1f-465e-d82c-5e014c9c5399" xlink:type="locator" />
    <link:loc xlink:href="nmih-20161231.xsd#nmih_GainLossonChangeinFairValueofWarrantLiability" xlink:label="loc_nmih_GainLossonChangeinFairValueofWarrantLiability_e935e7d1-c074-7a10-9233-c1238e91f6ab" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherNonoperatingIncomeExpense_b936f21a-1a1f-465e-d82c-5e014c9c5399" xlink:to="loc_nmih_GainLossonChangeinFairValueofWarrantLiability_e935e7d1-c074-7a10-9233-c1238e91f6ab" xlink:type="arc" />
    <link:loc xlink:href="nmih-20161231.xsd#nmih_GainLossFromSettlementofWarrants" xlink:label="loc_nmih_GainLossFromSettlementofWarrants_ea5d644e-9b0f-3d57-2b66-c1238e9b482c" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherNonoperatingIncomeExpense_b936f21a-1a1f-465e-d82c-5e014c9c5399" xlink:to="loc_nmih_GainLossFromSettlementofWarrants_ea5d644e-9b0f-3d57-2b66-c1238e9b482c" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_InterestExpenseDebt" xlink:label="loc_us-gaap_InterestExpenseDebt_b9b203b7-ff42-afaa-638c-417b649aa4c7" xlink:type="locator" />
    <link:calculationArc order="3" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherNonoperatingIncomeExpense_b936f21a-1a1f-465e-d82c-5e014c9c5399" xlink:to="loc_us-gaap_InterestExpenseDebt_b9b203b7-ff42-afaa-638c-417b649aa4c7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_ComprehensiveIncomeNetOfTax" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_663a641c-b103-1e10-d3ec-c078ec7a031b" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_8baf87d5-5f2f-7d0d-cb85-b9f249bae0c5" 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_663a641c-b103-1e10-d3ec-c078ec7a031b" xlink:to="loc_us-gaap_NetIncomeLoss_8baf87d5-5f2f-7d0d-cb85-b9f249bae0c5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_2b73f435-08bc-014c-4845-03f6580194a0" 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_8baf87d5-5f2f-7d0d-cb85-b9f249bae0c5" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_2b73f435-08bc-014c-4845-03f6580194a0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_9b166675-b7b2-1067-1806-03b1ee0126f1" 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_8baf87d5-5f2f-7d0d-cb85-b9f249bae0c5" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_9b166675-b7b2-1067-1806-03b1ee0126f1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_fc027bcf-19a3-7936-be65-3ec1deb94fb4" 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_663a641c-b103-1e10-d3ec-c078ec7a031b" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_fc027bcf-19a3-7936-be65-3ec1deb94fb4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_CostsAndExpenses" xlink:label="loc_us-gaap_CostsAndExpenses_ba9c144a-a131-2335-7bef-6a9a2f344885" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_IncurredClaimsPropertyCasualtyAndLiability" xlink:label="loc_us-gaap_IncurredClaimsPropertyCasualtyAndLiability_80c7df02-e8cf-c39b-f95b-76707a9291ec" 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_ba9c144a-a131-2335-7bef-6a9a2f344885" xlink:to="loc_us-gaap_IncurredClaimsPropertyCasualtyAndLiability_80c7df02-e8cf-c39b-f95b-76707a9291ec" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_OtherCostAndExpenseOperating" xlink:label="loc_us-gaap_OtherCostAndExpenseOperating_70080ee2-ea2b-6059-c384-0abc533bb406" 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_ba9c144a-a131-2335-7bef-6a9a2f344885" xlink:to="loc_us-gaap_OtherCostAndExpenseOperating_70080ee2-ea2b-6059-c384-0abc533bb406" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ConsolidatedStatementsOfComprehensiveIncomeLossParenthetical" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ConsolidatedStatementsOfShareholdersEquity" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ConsolidatedStatementsOfShareholdersEquityParenthetical" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/DocumentAndEntityInformation" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/EarningsLossPerShareEps" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/EarningsLossPerShareEpsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding" xlink:label="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_ae404dc0-76bc-cd1d-811f-e233c07e0569" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_IncrementalCommonSharesAttributableToNonvestedSharesWithForfeitableDividends" xlink:label="loc_us-gaap_IncrementalCommonSharesAttributableToNonvestedSharesWithForfeitableDividends_2557471b-e671-83e6-53ee-ea06dd31413e" 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_ae404dc0-76bc-cd1d-811f-e233c07e0569" xlink:to="loc_us-gaap_IncrementalCommonSharesAttributableToNonvestedSharesWithForfeitableDividends_2557471b-e671-83e6-53ee-ea06dd31413e" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingBasic" xlink:label="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_e841a58a-f12e-0adc-36de-0299a43719a9" 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_ae404dc0-76bc-cd1d-811f-e233c07e0569" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_e841a58a-f12e-0adc-36de-0299a43719a9" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/EarningsLossPerShareEpsNarrativeDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/EarningsLossPerShareEpsTables" 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/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_LiabilitiesFairValueDisclosure" xlink:label="loc_us-gaap_LiabilitiesFairValueDisclosure_4f567ef5-b8d7-6688-bab2-00271c822568" xlink:type="locator" />
    <link:loc xlink:href="nmih-20161231.xsd#nmih_WarrantLiability" xlink:label="loc_nmih_WarrantLiability_a01e58e8-a500-1a90-7039-c1238e73b614" 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_4f567ef5-b8d7-6688-bab2-00271c822568" xlink:to="loc_nmih_WarrantLiability_a01e58e8-a500-1a90-7039-c1238e73b614" 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/FairValueOfFinancialInstrumentsRollFowardOfLevel3LiabilitiesMeasuredAtFairValueDetails" 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/IncomeTaxes" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/IncomeTaxesComponentsOfProvisionForIncomeTaxesBenefitsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_9b166675-b7b2-1067-1806-03b1ee0126f1" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_CurrentIncomeTaxExpenseBenefit" xlink:label="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_7107f7ad-ea23-072c-c2a3-7b97b29553fc" 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_9b166675-b7b2-1067-1806-03b1ee0126f1" xlink:to="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_7107f7ad-ea23-072c-c2a3-7b97b29553fc" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit" xlink:label="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_91674616-989d-90e8-1302-b52ff7a33098" 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_9b166675-b7b2-1067-1806-03b1ee0126f1" xlink:to="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_91674616-989d-90e8-1302-b52ff7a33098" 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/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DeferredTaxLiabilities" xlink:label="loc_us-gaap_DeferredTaxLiabilities_f549ecdb-d466-ac37-840e-8410ff9e5017" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DeferredTaxAssetsNet" xlink:label="loc_us-gaap_DeferredTaxAssetsNet_dad43eb1-2d05-8e6b-1503-6a61e00404ca" 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_f549ecdb-d466-ac37-840e-8410ff9e5017" xlink:to="loc_us-gaap_DeferredTaxAssetsNet_dad43eb1-2d05-8e6b-1503-6a61e00404ca" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DeferredTaxAssetsGross" xlink:label="loc_us-gaap_DeferredTaxAssetsGross_344334d8-d156-37ea-1859-beb8bda06f5f" 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_dad43eb1-2d05-8e6b-1503-6a61e00404ca" xlink:to="loc_us-gaap_DeferredTaxAssetsGross_344334d8-d156-37ea-1859-beb8bda06f5f" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DeferredTaxAssetsOperatingLossCarryforwards" xlink:label="loc_us-gaap_DeferredTaxAssetsOperatingLossCarryforwards_6826a434-0eba-a280-99df-92eaa6c3f055" 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_344334d8-d156-37ea-1859-beb8bda06f5f" xlink:to="loc_us-gaap_DeferredTaxAssetsOperatingLossCarryforwards_6826a434-0eba-a280-99df-92eaa6c3f055" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost_87cdbec2-773d-bc5a-3050-f979513ecb7f" 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_344334d8-d156-37ea-1859-beb8bda06f5f" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost_87cdbec2-773d-bc5a-3050-f979513ecb7f" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsUnearnedPremiumsReserve" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsUnearnedPremiumsReserve_01fa55f4-2470-afa8-209c-8cc74ff002a4" 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_344334d8-d156-37ea-1859-beb8bda06f5f" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsUnearnedPremiumsReserve_01fa55f4-2470-afa8-209c-8cc74ff002a4" xlink:type="arc" />
    <link:loc xlink:href="nmih-20161231.xsd#nmih_DeferredTaxAssetsTaxDeferredExpenseStartupCosts" xlink:label="loc_nmih_DeferredTaxAssetsTaxDeferredExpenseStartupCosts_E05897FC83DAA834F6C2FBAB87E87B2E" 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_344334d8-d156-37ea-1859-beb8bda06f5f" xlink:to="loc_nmih_DeferredTaxAssetsTaxDeferredExpenseStartupCosts_E05897FC83DAA834F6C2FBAB87E87B2E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DeferredTaxAssetsInvestments" xlink:label="loc_us-gaap_DeferredTaxAssetsInvestments_bfff09af-c352-005e-7d55-182952e9ad26" 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_344334d8-d156-37ea-1859-beb8bda06f5f" xlink:to="loc_us-gaap_DeferredTaxAssetsInvestments_bfff09af-c352-005e-7d55-182952e9ad26" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DeferredTaxAssetsTaxCreditCarryforwardsAlternativeMinimumTax" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxCreditCarryforwardsAlternativeMinimumTax_6a949635-c395-1465-256c-384b798cc731" 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_344334d8-d156-37ea-1859-beb8bda06f5f" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxCreditCarryforwardsAlternativeMinimumTax_6a949635-c395-1465-256c-384b798cc731" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DeferredTaxAssetsOther" xlink:label="loc_us-gaap_DeferredTaxAssetsOther_bdc6598b-bd97-4cc7-9f4f-5d5ac82ed0ed" 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_344334d8-d156-37ea-1859-beb8bda06f5f" xlink:to="loc_us-gaap_DeferredTaxAssetsOther_bdc6598b-bd97-4cc7-9f4f-5d5ac82ed0ed" xlink:type="arc" />
    <link:loc xlink:href="nmih-20161231.xsd#nmih_DeferredTaxAssetsDeferredCedingCommissions" xlink:label="loc_nmih_DeferredTaxAssetsDeferredCedingCommissions_EEBD07CDF8D5976670611A4BCC934ABA" 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_344334d8-d156-37ea-1859-beb8bda06f5f" xlink:to="loc_nmih_DeferredTaxAssetsDeferredCedingCommissions_EEBD07CDF8D5976670611A4BCC934ABA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DeferredTaxAssetsValuationAllowance" xlink:label="loc_us-gaap_DeferredTaxAssetsValuationAllowance_36eb2c32-e98d-f713-df5d-5d9e7e50b88d" 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_dad43eb1-2d05-8e6b-1503-6a61e00404ca" xlink:to="loc_us-gaap_DeferredTaxAssetsValuationAllowance_36eb2c32-e98d-f713-df5d-5d9e7e50b88d" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DeferredIncomeTaxLiabilities" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilities_5e84d681-d720-597c-e306-ca1f497f20e3" 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_f549ecdb-d466-ac37-840e-8410ff9e5017" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilities_5e84d681-d720-597c-e306-ca1f497f20e3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DeferredTaxLiabilitiesDeferredExpenseDeferredPolicyAcquisitionCost" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesDeferredExpenseDeferredPolicyAcquisitionCost_d24bcf35-14a1-a69c-29f5-406eca8d97ba" 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_5e84d681-d720-597c-e306-ca1f497f20e3" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesDeferredExpenseDeferredPolicyAcquisitionCost_d24bcf35-14a1-a69c-29f5-406eca8d97ba" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DeferredTaxLiabilitiesGoodwillAndIntangibleAssetsIntangibleAssets" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesGoodwillAndIntangibleAssetsIntangibleAssets_fa726c85-83ac-b28f-66e2-0281dd3b7026" 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_5e84d681-d720-597c-e306-ca1f497f20e3" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesGoodwillAndIntangibleAssetsIntangibleAssets_fa726c85-83ac-b28f-66e2-0281dd3b7026" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DeferredTaxLiabilitiesOther" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesOther_4a03c8c2-2a2c-2673-0e40-01494d3fdb51" 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_5e84d681-d720-597c-e306-ca1f497f20e3" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesOther_4a03c8c2-2a2c-2673-0e40-01494d3fdb51" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DeferredTaxLiabilitiesDeferredExpenseCapitalizedSoftware" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesDeferredExpenseCapitalizedSoftware_df3cd9f6-0e70-ff82-5bc8-a22b2163cbf1" 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_5e84d681-d720-597c-e306-ca1f497f20e3" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesDeferredExpenseCapitalizedSoftware_df3cd9f6-0e70-ff82-5bc8-a22b2163cbf1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DeferredTaxAssetsLiabilitiesNet" xlink:label="loc_us-gaap_DeferredTaxAssetsLiabilitiesNet_01ec1572-4ef3-c4fc-b254-d545dc66e953" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsLiabilitiesNet_01ec1572-4ef3-c4fc-b254-d545dc66e953" xlink:to="loc_us-gaap_DeferredTaxAssetsNet_dad43eb1-2d05-8e6b-1503-6a61e00404ca" xlink:type="arc" />
    <link:calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsLiabilitiesNet_01ec1572-4ef3-c4fc-b254-d545dc66e953" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilities_5e84d681-d720-597c-e306-ca1f497f20e3" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/IncomeTaxesIncomeTaxReconciliationDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_EffectiveIncomeTaxRateContinuingOperations" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_9d686b75-f9ca-45e9-dcb7-a314128deba9" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate_8e6be169-09a9-5661-71bb-cb6bce1f56f7" 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_9d686b75-f9ca-45e9-dcb7-a314128deba9" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate_8e6be169-09a9-5661-71bb-cb6bce1f56f7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationNondeductibleExpenseShareBasedCompensationCost" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationNondeductibleExpenseShareBasedCompensationCost_46b1c974-ca9f-5c7b-d02c-c35ed308faa6" 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_9d686b75-f9ca-45e9-dcb7-a314128deba9" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationNondeductibleExpenseShareBasedCompensationCost_46b1c974-ca9f-5c7b-d02c-c35ed308faa6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationOtherAdjustments" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationOtherAdjustments_260b0554-5407-84a9-0ddc-c064bbfac41b" 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_9d686b75-f9ca-45e9-dcb7-a314128deba9" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationOtherAdjustments_260b0554-5407-84a9-0ddc-c064bbfac41b" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationChangeInDeferredTaxAssetsValuationAllowance" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationChangeInDeferredTaxAssetsValuationAllowance_cf7d450d-2365-800c-0e12-31ac27cc146f" 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_9d686b75-f9ca-45e9-dcb7-a314128deba9" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationChangeInDeferredTaxAssetsValuationAllowance_cf7d450d-2365-800c-0e12-31ac27cc146f" xlink:type="arc" />
    <link:loc xlink:href="nmih-20161231.xsd#nmih_EffectiveIncomeTaxRateReconciliationTrueupFromPriorYearPercent" xlink:label="loc_nmih_EffectiveIncomeTaxRateReconciliationTrueupFromPriorYearPercent_FF58A87B2D67D39347DEFB638E212BDA" 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_9d686b75-f9ca-45e9-dcb7-a314128deba9" xlink:to="loc_nmih_EffectiveIncomeTaxRateReconciliationTrueupFromPriorYearPercent_FF58A87B2D67D39347DEFB638E212BDA" xlink:type="arc" />
    <link:loc xlink:href="nmih-20161231.xsd#nmih_EffectiveIncomeTaxRateReconciliationWarrantGainLossPercent" xlink:label="loc_nmih_EffectiveIncomeTaxRateReconciliationWarrantGainLossPercent_C29DC4753C0CA50B1B97FB657A705ACE" 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_9d686b75-f9ca-45e9-dcb7-a314128deba9" xlink:to="loc_nmih_EffectiveIncomeTaxRateReconciliationWarrantGainLossPercent_C29DC4753C0CA50B1B97FB657A705ACE" 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: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/InvestmentsFairValuesAndGrossUnrealizedGainsAndLossesOnInvestmentsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecuritiesAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesAmortizedCost_b671a380-e06c-01fd-905c-c45ee0d0ab53" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecuritiesAccumulatedGrossUnrealizedGainBeforeTax" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_ba478347-bbf1-ddfc-8a79-7775b3b62a6c" xlink:type="locator" />
    <link:calculationArc order="1" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesAmortizedCost_b671a380-e06c-01fd-905c-c45ee0d0ab53" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_ba478347-bbf1-ddfc-8a79-7775b3b62a6c" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecuritiesAccumulatedGrossUnrealizedLossBeforeTax" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_65f23050-696a-07fd-30c1-78a5110d800c" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesAmortizedCost_b671a380-e06c-01fd-905c-c45ee0d0ab53" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_65f23050-696a-07fd-30c1-78a5110d800c" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecurities" xlink:label="loc_us-gaap_AvailableForSaleSecurities_01be169b-08cc-7c30-55f5-941791d17ef8" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesAmortizedCost_b671a380-e06c-01fd-905c-c45ee0d0ab53" xlink:to="loc_us-gaap_AvailableForSaleSecurities_01be169b-08cc-7c30-55f5-941791d17ef8" 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/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_InvestmentIncomeNet" xlink:label="loc_us-gaap_InvestmentIncomeNet_952a435b-759e-ff1e-bd34-603d5879b311" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_InvestmentIncomeInvestmentExpense" xlink:label="loc_us-gaap_InvestmentIncomeInvestmentExpense_5b73b39c-ffc5-b164-b3a5-6a5d7dd2800f" 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_952a435b-759e-ff1e-bd34-603d5879b311" xlink:to="loc_us-gaap_InvestmentIncomeInvestmentExpense_5b73b39c-ffc5-b164-b3a5-6a5d7dd2800f" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_InvestmentIncomeInterestAndDividend" xlink:label="loc_us-gaap_InvestmentIncomeInterestAndDividend_16ddf8b3-5458-39f1-e9e3-210cbf652aa6" 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_952a435b-759e-ff1e-bd34-603d5879b311" xlink:to="loc_us-gaap_InvestmentIncomeInterestAndDividend_16ddf8b3-5458-39f1-e9e3-210cbf652aa6" 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/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableforsaleSecuritiesGrossRealizedGainLossExcludingOtherThanTemporaryImpairments" xlink:label="loc_us-gaap_AvailableforsaleSecuritiesGrossRealizedGainLossExcludingOtherThanTemporaryImpairments_9a92759e-7904-1cbb-d3f8-6ead732904be" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecuritiesGrossRealizedGains" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesGrossRealizedGains_d81613c6-4e09-8e47-82ec-c84c2688c4e4" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableforsaleSecuritiesGrossRealizedGainLossExcludingOtherThanTemporaryImpairments_9a92759e-7904-1cbb-d3f8-6ead732904be" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesGrossRealizedGains_d81613c6-4e09-8e47-82ec-c84c2688c4e4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableforsaleSecuritiesGrossRealizedLossesExcludingOtherThanTemporaryImpairments" xlink:label="loc_us-gaap_AvailableforsaleSecuritiesGrossRealizedLossesExcludingOtherThanTemporaryImpairments_a08c9396-2d20-65e1-f815-2b943c6deeaa" xlink:type="locator" />
    <link:calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableforsaleSecuritiesGrossRealizedGainLossExcludingOtherThanTemporaryImpairments_9a92759e-7904-1cbb-d3f8-6ead732904be" xlink:to="loc_us-gaap_AvailableforsaleSecuritiesGrossRealizedLossesExcludingOtherThanTemporaryImpairments_a08c9396-2d20-65e1-f815-2b943c6deeaa" 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/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecuritiesAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesAmortizedCost_b671a380-e06c-01fd-905c-c45ee0d0ab53" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost_64878df4-a4bb-ba61-aacb-ed249b31f694" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesAmortizedCost_b671a380-e06c-01fd-905c-c45ee0d0ab53" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost_64878df4-a4bb-ba61-aacb-ed249b31f694" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost_59295b7e-c316-eccf-27db-e84d9ca58730" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesAmortizedCost_b671a380-e06c-01fd-905c-c45ee0d0ab53" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost_59295b7e-c316-eccf-27db-e84d9ca58730" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost_4a130408-1560-1680-a9e9-a5b6577bac1b" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesAmortizedCost_b671a380-e06c-01fd-905c-c45ee0d0ab53" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost_4a130408-1560-1680-a9e9-a5b6577bac1b" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost_cceae702-c03a-63ab-909d-da89433a7398" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesAmortizedCost_b671a380-e06c-01fd-905c-c45ee0d0ab53" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost_cceae702-c03a-63ab-909d-da89433a7398" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost_7bf284bc-1833-8ba9-88ec-da920c375901" xlink:type="locator" />
    <link:calculationArc order="5" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesAmortizedCost_b671a380-e06c-01fd-905c-c45ee0d0ab53" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost_7bf284bc-1833-8ba9-88ec-da920c375901" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecurities" xlink:label="loc_us-gaap_AvailableForSaleSecurities_01be169b-08cc-7c30-55f5-941791d17ef8" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_73f419d8-d119-3f34-15a6-338e4455cd96" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecurities_01be169b-08cc-7c30-55f5-941791d17ef8" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_73f419d8-d119-3f34-15a6-338e4455cd96" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_db3b580e-d182-4945-7c2e-ce877e78a106" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecurities_01be169b-08cc-7c30-55f5-941791d17ef8" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_db3b580e-d182-4945-7c2e-ce877e78a106" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_5cad6420-c434-2b48-13db-6c315d141f54" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecurities_01be169b-08cc-7c30-55f5-941791d17ef8" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_5cad6420-c434-2b48-13db-6c315d141f54" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue_b2dd8726-7338-2922-d0d2-fa759fce3859" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecurities_01be169b-08cc-7c30-55f5-941791d17ef8" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue_b2dd8726-7338-2922-d0d2-fa759fce3859" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue_a79475c8-d9a2-5233-1397-04b8cf6c6a65" xlink:type="locator" />
    <link:calculationArc order="5" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecurities_01be169b-08cc-7c30-55f5-941791d17ef8" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue_a79475c8-d9a2-5233-1397-04b8cf6c6a65" 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/InvestmentsUnrealizedLossesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLoss" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLoss_3fa09329-0896-f55f-c02e-c8004aa08345" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_28085bfb-becd-58b9-5554-fd2b42a29dab" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLoss_3fa09329-0896-f55f-c02e-c8004aa08345" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_28085bfb-becd-58b9-5554-fd2b42a29dab" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_2c159316-1107-d1fe-3ca9-a0ff69e85bc6" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLoss_3fa09329-0896-f55f-c02e-c8004aa08345" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_2c159316-1107-d1fe-3ca9-a0ff69e85bc6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions1" xlink:label="loc_us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions1_d35727fd-953f-bd07-d901-fd9a48e84ed0" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear" xlink:label="loc_us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear_3914a834-5754-7941-c024-69adaaf59adb" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions1_d35727fd-953f-bd07-d901-fd9a48e84ed0" xlink:to="loc_us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear_3914a834-5754-7941-c024-69adaaf59adb" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear_be2c63cc-1ff6-3560-cfc4-db4a3863aaf5" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions1_d35727fd-953f-bd07-d901-fd9a48e84ed0" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear_be2c63cc-1ff6-3560-cfc4-db4a3863aaf5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionFairValue_b1d71fc9-eecd-2005-af97-28330842089f" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue_94eefac8-f76d-a881-1e74-cd6a8c26f6f2" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionFairValue_b1d71fc9-eecd-2005-af97-28330842089f" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue_94eefac8-f76d-a881-1e74-cd6a8c26f6f2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue_11612c57-1c66-2ebb-048d-5328a69f7e87" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionFairValue_b1d71fc9-eecd-2005-af97-28330842089f" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue_11612c57-1c66-2ebb-048d-5328a69f7e87" xlink:type="arc" />
  </link:calculationLink>
  <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/ReinsuranceAmountsCededRelatedTo2016QsrTransactionDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ReinsuranceDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ReinsuranceEffectOfReinsuranceOnNetPremiumsWrittenAndEarnedDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_PremiumsWrittenNet" xlink:label="loc_us-gaap_PremiumsWrittenNet_f2b4d488-86c6-d2e8-ddfb-0bf6340eac4e" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DirectPremiumsWritten" xlink:label="loc_us-gaap_DirectPremiumsWritten_525e5d9b-1299-a472-3e16-ba4d8c85fc01" 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_f2b4d488-86c6-d2e8-ddfb-0bf6340eac4e" xlink:to="loc_us-gaap_DirectPremiumsWritten_525e5d9b-1299-a472-3e16-ba4d8c85fc01" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_CededPremiumsWritten" xlink:label="loc_us-gaap_CededPremiumsWritten_03f52b18-e4e8-f9a5-68c3-82b818aa10fc" 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_f2b4d488-86c6-d2e8-ddfb-0bf6340eac4e" xlink:to="loc_us-gaap_CededPremiumsWritten_03f52b18-e4e8-f9a5-68c3-82b818aa10fc" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_PremiumsEarnedNet" xlink:label="loc_us-gaap_PremiumsEarnedNet_7536213c-423b-16ae-a63f-b9e330c1e4a6" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DirectPremiumsEarned" xlink:label="loc_us-gaap_DirectPremiumsEarned_0a301be7-4ea1-6907-0714-03273cd7e145" 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_7536213c-423b-16ae-a63f-b9e330c1e4a6" xlink:to="loc_us-gaap_DirectPremiumsEarned_0a301be7-4ea1-6907-0714-03273cd7e145" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_CededPremiumsEarned" xlink:label="loc_us-gaap_CededPremiumsEarned_47179327-cd1b-18ef-3782-3d8b959821bf" 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_7536213c-423b-16ae-a63f-b9e330c1e4a6" xlink:to="loc_us-gaap_CededPremiumsEarned_47179327-cd1b-18ef-3782-3d8b959821bf" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ReinsuranceTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpenses" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/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:calculationLink xlink:role="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesReconciliationOfReserveBalancesForInsuranceClaimsExpensesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaims1" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaims1_efa1a5ee-9826-0b7a-7759-b5b2d7308d95" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersCurrentYearClaimsAndClaimsAdjustmentExpense" xlink:label="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersCurrentYearClaimsAndClaimsAdjustmentExpense_f6d4bcdb-a917-ae36-b64d-92ecf74c5168" 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_efa1a5ee-9826-0b7a-7759-b5b2d7308d95" xlink:to="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersCurrentYearClaimsAndClaimsAdjustmentExpense_f6d4bcdb-a917-ae36-b64d-92ecf74c5168" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense" xlink:label="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense_94008c98-7583-e81a-5d43-4fb029a8b2bb" 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_efa1a5ee-9826-0b7a-7759-b5b2d7308d95" xlink:to="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense_94008c98-7583-e81a-5d43-4fb029a8b2bb" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_PaymentsForLossesAndLossAdjustmentExpense" xlink:label="loc_us-gaap_PaymentsForLossesAndLossAdjustmentExpense_6fe02665-4e77-a2f2-e51d-310632af8880" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidCurrentYear1" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidCurrentYear1_db00e364-1ef5-a5e3-ab4f-59534ed27398" 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_6fe02665-4e77-a2f2-e51d-310632af8880" xlink:to="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidCurrentYear1_db00e364-1ef5-a5e3-ab4f-59534ed27398" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidPriorYears1" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidPriorYears1_fd40b6f4-e7ea-53b1-a860-f1d4a1cc2132" 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_6fe02665-4e77-a2f2-e51d-310632af8880" xlink:to="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidPriorYears1_fd40b6f4-e7ea-53b1-a860-f1d4a1cc2132" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseNet" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseNet_17b5c4ab-3ed1-58b8-8a30-ec5a77cace83" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_ReinsuranceRecoverablesOnPaidAndUnpaidLosses" xlink:label="loc_us-gaap_ReinsuranceRecoverablesOnPaidAndUnpaidLosses_e774318b-cd00-8ede-d3aa-7024a0c6dd9e" 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_17b5c4ab-3ed1-58b8-8a30-ec5a77cace83" xlink:to="loc_us-gaap_ReinsuranceRecoverablesOnPaidAndUnpaidLosses_e774318b-cd00-8ede-d3aa-7024a0c6dd9e" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense" xlink:label="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_75b247f6-acf8-264e-d372-996aedbefe30" 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_17b5c4ab-3ed1-58b8-8a30-ec5a77cace83" xlink:to="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_75b247f6-acf8-264e-d372-996aedbefe30" 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/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlySchedule" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyScheduleBalanceSheetAdditionalInformationDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyScheduleBalanceSheetDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_Assets" xlink:label="loc_us-gaap_Assets_08bee809-e27e-48c3-da2d-5d52948eb470" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_Investments" xlink:label="loc_us-gaap_Investments_7c13694a-5c7a-7119-e1a8-959c1e8b6e3c" 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_08bee809-e27e-48c3-da2d-5d52948eb470" xlink:to="loc_us-gaap_Investments_7c13694a-5c7a-7119-e1a8-959c1e8b6e3c" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_ec544f28-9c7b-137c-e428-9ae47c2375fc" 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_08bee809-e27e-48c3-da2d-5d52948eb470" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_ec544f28-9c7b-137c-e428-9ae47c2375fc" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_EquityMethodInvestments" xlink:label="loc_us-gaap_EquityMethodInvestments_8186324b-c5f1-8ea6-8e0c-32830db48a5d" 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_08bee809-e27e-48c3-da2d-5d52948eb470" xlink:to="loc_us-gaap_EquityMethodInvestments_8186324b-c5f1-8ea6-8e0c-32830db48a5d" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AccruedInvestmentIncomeReceivable" xlink:label="loc_us-gaap_AccruedInvestmentIncomeReceivable_fe5887dd-1af0-1da1-a824-cfc843bb2a09" 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_08bee809-e27e-48c3-da2d-5d52948eb470" xlink:to="loc_us-gaap_AccruedInvestmentIncomeReceivable_fe5887dd-1af0-1da1-a824-cfc843bb2a09" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_PrepaidExpenseCurrentAndNoncurrent" xlink:label="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_952a85fb-1530-60f0-bc8f-176c304f1460" 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_08bee809-e27e-48c3-da2d-5d52948eb470" xlink:to="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_952a85fb-1530-60f0-bc8f-176c304f1460" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DueFromAffiliates" xlink:label="loc_us-gaap_DueFromAffiliates_6c10b757-2d5f-bc9b-9032-78737ab25427" 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_08bee809-e27e-48c3-da2d-5d52948eb470" xlink:to="loc_us-gaap_DueFromAffiliates_6c10b757-2d5f-bc9b-9032-78737ab25427" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_68e7c3c1-9b8d-84fe-3a5c-d69c15dfe7a2" 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_08bee809-e27e-48c3-da2d-5d52948eb470" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_68e7c3c1-9b8d-84fe-3a5c-d69c15dfe7a2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_OtherAssets" xlink:label="loc_us-gaap_OtherAssets_89f93c65-85fd-29e8-1936-9df58443c9af" 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_08bee809-e27e-48c3-da2d-5d52948eb470" xlink:to="loc_us-gaap_OtherAssets_89f93c65-85fd-29e8-1936-9df58443c9af" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DeferredIncomeTaxAssetsNet" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_935fce52-c22c-b328-8ef2-ac103d3c71ac" 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_08bee809-e27e-48c3-da2d-5d52948eb470" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_935fce52-c22c-b328-8ef2-ac103d3c71ac" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyScheduleCashFlowStatementDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_95f67350-d3ec-5d41-e3b2-a4fe7a19e15b" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_PaymentsToAcquireInterestInSubsidiariesAndAffiliates" xlink:label="loc_us-gaap_PaymentsToAcquireInterestInSubsidiariesAndAffiliates_af54a46f-4761-2dd8-9c7f-6f92e709e1c4" 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_95f67350-d3ec-5d41-e3b2-a4fe7a19e15b" xlink:to="loc_us-gaap_PaymentsToAcquireInterestInSubsidiariesAndAffiliates_af54a46f-4761-2dd8-9c7f-6f92e709e1c4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt" xlink:label="loc_us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt_5eef41ab-a09e-58ba-6708-d9dbc2498316" 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_95f67350-d3ec-5d41-e3b2-a4fe7a19e15b" xlink:to="loc_us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt_5eef41ab-a09e-58ba-6708-d9dbc2498316" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_ProceedsFromSaleOfAvailableForSaleSecuritiesDebt" xlink:label="loc_us-gaap_ProceedsFromSaleOfAvailableForSaleSecuritiesDebt_52a00194-f06c-4482-de20-9d1a485bf24a" 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_95f67350-d3ec-5d41-e3b2-a4fe7a19e15b" xlink:to="loc_us-gaap_ProceedsFromSaleOfAvailableForSaleSecuritiesDebt_52a00194-f06c-4482-de20-9d1a485bf24a" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_PaymentsToAcquirePropertyPlantAndEquipment" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_991d89e2-25f7-1061-f5f8-86acc91f176b" 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_95f67350-d3ec-5d41-e3b2-a4fe7a19e15b" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_991d89e2-25f7-1061-f5f8-86acc91f176b" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_PaymentsToAcquireShortTermInvestments" xlink:label="loc_us-gaap_PaymentsToAcquireShortTermInvestments_7eefdb79-b488-fe99-9b8e-a51ddf6de5ad" 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_95f67350-d3ec-5d41-e3b2-a4fe7a19e15b" xlink:to="loc_us-gaap_PaymentsToAcquireShortTermInvestments_7eefdb79-b488-fe99-9b8e-a51ddf6de5ad" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_ProceedsFromSaleOfShortTermInvestments" xlink:label="loc_us-gaap_ProceedsFromSaleOfShortTermInvestments_e1d5c175-5fec-c1e5-c00f-3705673f3dcd" 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_95f67350-d3ec-5d41-e3b2-a4fe7a19e15b" xlink:to="loc_us-gaap_ProceedsFromSaleOfShortTermInvestments_e1d5c175-5fec-c1e5-c00f-3705673f3dcd" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_8baf87d5-5f2f-7d0d-cb85-b9f249bae0c5" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_NetIncomeLoss_8baf87d5-5f2f-7d0d-cb85-b9f249bae0c5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_ShareBasedCompensation" xlink:label="loc_us-gaap_ShareBasedCompensation_432488d8-28ca-5b8d-679b-29be120957b5" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_ShareBasedCompensation_432488d8-28ca-5b8d-679b-29be120957b5" xlink:type="arc" />
    <link:loc xlink:href="nmih-20161231.xsd#nmih_GainLossonChangeinFairValueofWarrantLiability" xlink:label="loc_nmih_GainLossonChangeinFairValueofWarrantLiability_e935e7d1-c074-7a10-9233-c1238e91f6ab" xlink:type="locator" />
    <link:calculationArc order="3" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_nmih_GainLossonChangeinFairValueofWarrantLiability_e935e7d1-c074-7a10-9233-c1238e91f6ab" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet_86be9232-4c75-212d-a13b-e678f426cb85" xlink:type="locator" />
    <link:calculationArc order="4" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet_86be9232-4c75-212d-a13b-e678f426cb85" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DepreciationAmortizationAndAccretionNet" xlink:label="loc_us-gaap_DepreciationAmortizationAndAccretionNet_31fc303b-1b94-6362-1b8a-157609a23bce" xlink:type="locator" />
    <link:calculationArc order="5" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_DepreciationAmortizationAndAccretionNet_31fc303b-1b94-6362-1b8a-157609a23bce" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AmortizationOfFinancingCostsAndDiscounts" xlink:label="loc_us-gaap_AmortizationOfFinancingCostsAndDiscounts_3358d115-01c9-6550-edda-293e7863fabe" xlink:type="locator" />
    <link:calculationArc order="6" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_AmortizationOfFinancingCostsAndDiscounts_3358d115-01c9-6550-edda-293e7863fabe" xlink:type="arc" />
    <link:loc xlink:href="nmih-20161231.xsd#nmih_ExpenseBenefitforTaxesonCurrentYearUnrealizedGains" xlink:label="loc_nmih_ExpenseBenefitforTaxesonCurrentYearUnrealizedGains_488501e6-076b-231c-b2ce-c1238e734291" xlink:type="locator" />
    <link:calculationArc order="7" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_nmih_ExpenseBenefitforTaxesonCurrentYearUnrealizedGains_488501e6-076b-231c-b2ce-c1238e734291" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_GainLossOnSaleOfStockInSubsidiaryOrEquityMethodInvestee" xlink:label="loc_us-gaap_GainLossOnSaleOfStockInSubsidiaryOrEquityMethodInvestee_0327e544-d273-204c-a713-bfe542dd1b86" xlink:type="locator" />
    <link:calculationArc order="8" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_GainLossOnSaleOfStockInSubsidiaryOrEquityMethodInvestee_0327e544-d273-204c-a713-bfe542dd1b86" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable_07cf7d67-8476-c183-f65e-0c166d716452" xlink:type="locator" />
    <link:calculationArc order="9" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable_07cf7d67-8476-c183-f65e-0c166d716452" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_IncreaseDecreaseDueFromAffiliates" xlink:label="loc_us-gaap_IncreaseDecreaseDueFromAffiliates_c593191d-7aeb-064d-99f7-3dcb8f737833" xlink:type="locator" />
    <link:calculationArc order="10" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_IncreaseDecreaseDueFromAffiliates_c593191d-7aeb-064d-99f7-3dcb8f737833" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_IncreaseDecreaseInPrepaidExpense" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidExpense_4ec1e09a-8f5f-fa52-61b8-04c8cc8071ed" xlink:type="locator" />
    <link:calculationArc order="11" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidExpense_4ec1e09a-8f5f-fa52-61b8-04c8cc8071ed" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_e99fae14-a0f3-93f9-f0e6-bc9b4dc580ef" xlink:type="locator" />
    <link:calculationArc order="12" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_e99fae14-a0f3-93f9-f0e6-bc9b4dc580ef" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_880f9863-dd81-7240-4418-c9f1ba4fd53e" xlink:type="locator" />
    <link:calculationArc order="13" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_880f9863-dd81-7240-4418-c9f1ba4fd53e" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit" xlink:label="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_91674616-989d-90e8-1302-b52ff7a33098" xlink:type="locator" />
    <link:calculationArc order="14" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_8ab9b509-cc81-9912-329b-3866a58ee72a" xlink:to="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_91674616-989d-90e8-1302-b52ff7a33098" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyScheduleIncomeStatementAdditionalInformationDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyScheduleIncomeStatementDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_2b73f435-08bc-014c-4845-03f6580194a0" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_OtherNonoperatingIncomeExpense" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_b936f21a-1a1f-465e-d82c-5e014c9c5399" 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_2b73f435-08bc-014c-4845-03f6580194a0" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_b936f21a-1a1f-465e-d82c-5e014c9c5399" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_IncomeLossFromEquityMethodInvestments" xlink:label="loc_us-gaap_IncomeLossFromEquityMethodInvestments_359134c0-3512-0437-07c4-28574636fc79" 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_2b73f435-08bc-014c-4845-03f6580194a0" xlink:to="loc_us-gaap_IncomeLossFromEquityMethodInvestments_359134c0-3512-0437-07c4-28574636fc79" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_CostsAndExpenses" xlink:label="loc_us-gaap_CostsAndExpenses_ba9c144a-a131-2335-7bef-6a9a2f344885" 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_2b73f435-08bc-014c-4845-03f6580194a0" xlink:to="loc_us-gaap_CostsAndExpenses_ba9c144a-a131-2335-7bef-6a9a2f344885" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_OtherExpenses" xlink:label="loc_us-gaap_OtherExpenses_28296c6d-444b-7444-94a5-f70d4e6e53ea" 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_ba9c144a-a131-2335-7bef-6a9a2f344885" xlink:to="loc_us-gaap_OtherExpenses_28296c6d-444b-7444-94a5-f70d4e6e53ea" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_Revenues" xlink:label="loc_us-gaap_Revenues_4ce4747e-ba05-83d9-3458-6f9d1635c2ec" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_2b73f435-08bc-014c-4845-03f6580194a0" xlink:to="loc_us-gaap_Revenues_4ce4747e-ba05-83d9-3458-6f9d1635c2ec" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_fc027bcf-19a3-7936-be65-3ec1deb94fb4" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax_045a7791-44b8-d416-a735-af6ac83e7eb3" 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_fc027bcf-19a3-7936-be65-3ec1deb94fb4" xlink:to="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax_045a7791-44b8-d416-a735-af6ac83e7eb3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax_2295fde9-6004-04c5-d6d3-8f045ad42e78" 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_fc027bcf-19a3-7936-be65-3ec1deb94fb4" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax_2295fde9-6004-04c5-d6d3-8f045ad42e78" xlink:type="arc" />
    <link:loc xlink:href="nmih-20161231.xsd#nmih_OtherComprehensiveIncomeLossNetofTaxPortionAttributabletoSubsidiary" xlink:label="loc_nmih_OtherComprehensiveIncomeLossNetofTaxPortionAttributabletoSubsidiary_6ca26a9c-7b42-1e21-aaad-8ea3437a3b6f" 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_fc027bcf-19a3-7936-be65-3ec1deb94fb4" xlink:to="loc_nmih_OtherComprehensiveIncomeLossNetofTaxPortionAttributabletoSubsidiary_6ca26a9c-7b42-1e21-aaad-8ea3437a3b6f" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlySupplementalNotesDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ScheduleIvFinancialInformationOfRegistrantReinsuranceParentCompanyOnlyDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/ScheduleIvFinancialInformationOfRegistrantReinsuranceParentCompanyOnlySchedule" xlink:type="extended" />
  <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/ShareBasedCompensationRestrictedStockUnitsValuationAssumptionsDetails" 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/ShareBasedCompensationStockOptionsValuationAssumptionsDetails" 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/SoftwareAndEquipmentDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_68e7c3c1-9b8d-84fe-3a5c-d69c15dfe7a2" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_PropertyPlantAndEquipmentGross" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_8c99d26c-e257-b8ba-86ee-4f792a9452ce" 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_68e7c3c1-9b8d-84fe-3a5c-d69c15dfe7a2" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentGross_8c99d26c-e257-b8ba-86ee-4f792a9452ce" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment" xlink:label="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_95ebcb07-1c4a-1ded-365f-edc9cd2fa101" 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_68e7c3c1-9b8d-84fe-3a5c-d69c15dfe7a2" xlink:to="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_95ebcb07-1c4a-1ded-365f-edc9cd2fa101" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/SoftwareAndEquipmentNarrativeDetails" xlink:type="extended" />
  <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/TermLoan" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/TermLoanNarrativeDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/TermLoanScheduleOfFuturePrincipalPaymentsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_DebtInstrumentCarryingAmount" xlink:label="loc_us-gaap_DebtInstrumentCarryingAmount_bf283aeb-0a65-a633-91fe-6383ccafa144" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths_be4c6cb2-c102-b108-bfb6-0404d740f001" 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_bf283aeb-0a65-a633-91fe-6383ccafa144" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths_be4c6cb2-c102-b108-bfb6-0404d740f001" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2016/elts/us-gaap-2016-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_fff555d3-22e2-1be9-15a7-f79f0064a4bb" 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_bf283aeb-0a65-a633-91fe-6383ccafa144" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_fff555d3-22e2-1be9-15a7-f79f0064a4bb" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.nationalmi.com/role/TermLoanTables" 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>
