<?xml version="1.0" encoding="US-ASCII"?>
<!--XBRL Document Created with Wdesk from Workiva, formerly WebFilings-->
<!-- -->
<linkbase xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd" xmlns="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <roleRef roleURI="http://www.nationalmi.com/role/CommonStockOffering" xlink:href="nmih-20140630.xsd#CommonStockOffering" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CommonStockOfferingDetails" xlink:href="nmih-20140630.xsd#CommonStockOfferingDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CondensedConsolidatedBalanceSheets" xlink:href="nmih-20140630.xsd#CondensedConsolidatedBalanceSheets" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CondensedConsolidatedBalanceSheetsParenthetical" xlink:href="nmih-20140630.xsd#CondensedConsolidatedBalanceSheetsParenthetical" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfCashFlows" xlink:href="nmih-20140630.xsd#CondensedConsolidatedStatementsOfCashFlows" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfComprehensiveLoss" xlink:href="nmih-20140630.xsd#CondensedConsolidatedStatementsOfComprehensiveLoss" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfComprehensiveLossParentheticals" xlink:href="nmih-20140630.xsd#CondensedConsolidatedStatementsOfComprehensiveLossParentheticals" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfShareholdersEquity" xlink:href="nmih-20140630.xsd#CondensedConsolidatedStatementsOfShareholdersEquity" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfShareholdersEquityParenthetical" xlink:href="nmih-20140630.xsd#CondensedConsolidatedStatementsOfShareholdersEquityParenthetical" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/DocumentAndEntityInformation" xlink:href="nmih-20140630.xsd#DocumentAndEntityInformation" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstruments" xlink:href="nmih-20140630.xsd#FairValueOfFinancialInstruments" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsAssetsAndLiabilitiesAtFairValueDetails" xlink:href="nmih-20140630.xsd#FairValueOfFinancialInstrumentsAssetsAndLiabilitiesAtFairValueDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsNarrativeDetails" xlink:href="nmih-20140630.xsd#FairValueOfFinancialInstrumentsNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsRollforwardOfLevel3Details" xlink:href="nmih-20140630.xsd#FairValueOfFinancialInstrumentsRollforwardOfLevel3Details" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsTables" xlink:href="nmih-20140630.xsd#FairValueOfFinancialInstrumentsTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxes" xlink:href="nmih-20140630.xsd#IncomeTaxes" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxesNarrativeDetails" xlink:href="nmih-20140630.xsd#IncomeTaxesNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwill" xlink:href="nmih-20140630.xsd#IntangibleAssetsAndGoodwill" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwillDetails" xlink:href="nmih-20140630.xsd#IntangibleAssetsAndGoodwillDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwillTables" xlink:href="nmih-20140630.xsd#IntangibleAssetsAndGoodwillTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/Investments" xlink:href="nmih-20140630.xsd#Investments" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsFairValuesAndGrossUnrealizedGainsAndLossesOnInvestmentsDetails" xlink:href="nmih-20140630.xsd#InvestmentsFairValuesAndGrossUnrealizedGainsAndLossesOnInvestmentsDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNarrativeDetails" xlink:href="nmih-20140630.xsd#InvestmentsNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNetInvestmentIncomeDetails" xlink:href="nmih-20140630.xsd#InvestmentsNetInvestmentIncomeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNetRealizedInvestmentLossesGainsOnInvestmentsDetails" xlink:href="nmih-20140630.xsd#InvestmentsNetRealizedInvestmentLossesGainsOnInvestmentsDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsScheduledMaturitiesDetails" xlink:href="nmih-20140630.xsd#InvestmentsScheduledMaturitiesDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsTables" xlink:href="nmih-20140630.xsd#InvestmentsTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsUnrealizedLossesDetails" xlink:href="nmih-20140630.xsd#InvestmentsUnrealizedLossesDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/Litigation" xlink:href="nmih-20140630.xsd#Litigation" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/OrganizationAndBasisOfPresentation" xlink:href="nmih-20140630.xsd#OrganizationAndBasisOfPresentation" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/OrganizationAndBasisOfPresentationDetails" xlink:href="nmih-20140630.xsd#OrganizationAndBasisOfPresentationDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpenses" xlink:href="nmih-20140630.xsd#ReservesForInsuranceClaimsAndClaimExpenses" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesDetails" xlink:href="nmih-20140630.xsd#ReservesForInsuranceClaimsAndClaimExpensesDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesTables" xlink:href="nmih-20140630.xsd#ReservesForInsuranceClaimsAndClaimExpensesTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensation" xlink:href="nmih-20140630.xsd#ShareBasedCompensation" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensationNarrativeDetails" xlink:href="nmih-20140630.xsd#ShareBasedCompensationNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensationRestrictedStockUnitsActivityDetails" xlink:href="nmih-20140630.xsd#ShareBasedCompensationRestrictedStockUnitsActivityDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensationStockOptionActivityDetails" xlink:href="nmih-20140630.xsd#ShareBasedCompensationStockOptionActivityDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensationTables" xlink:href="nmih-20140630.xsd#ShareBasedCompensationTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/SoftwareAndEquipment" xlink:href="nmih-20140630.xsd#SoftwareAndEquipment" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/SoftwareAndEquipmentDetails" xlink:href="nmih-20140630.xsd#SoftwareAndEquipmentDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/SoftwareAndEquipmentNarrativeDetails" xlink:href="nmih-20140630.xsd#SoftwareAndEquipmentNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/SoftwareAndEquipmentTables" xlink:href="nmih-20140630.xsd#SoftwareAndEquipmentTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/StatutoryInformation" xlink:href="nmih-20140630.xsd#StatutoryInformation" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/StatutoryInformationNarrativeDetails" xlink:href="nmih-20140630.xsd#StatutoryInformationNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/StatutoryInformationRiskToCapitalDetails" xlink:href="nmih-20140630.xsd#StatutoryInformationRiskToCapitalDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/StatutoryInformationStatutoryIncomeDetails" xlink:href="nmih-20140630.xsd#StatutoryInformationStatutoryIncomeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/StatutoryInformationTables" xlink:href="nmih-20140630.xsd#StatutoryInformationTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/Warrants" xlink:href="nmih-20140630.xsd#Warrants" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/WarrantsDetails" xlink:href="nmih-20140630.xsd#WarrantsDetails" xlink:type="simple" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/CommonStockOffering" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/CommonStockOfferingDetails" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/CondensedConsolidatedBalanceSheets" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_LiabilitiesAndStockholdersEquity" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_6e1ed1d0-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_Liabilities" xlink:label="loc_us-gaap_Liabilities_6e59ec02-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_6e1ed1d0-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_Liabilities_6e59ec02-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_UnearnedPremiums" xlink:label="loc_us-gaap_UnearnedPremiums_b2ddc75e-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_6e59ec02-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_UnearnedPremiums_b2ddc75e-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense" xlink:label="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_6fadea22-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_6e59ec02-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_6fadea22-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent" xlink:label="loc_us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent_055e365e-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_6e59ec02-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent_055e365e-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="nmih-20140630.xsd#nmih_WarrantLiability" xlink:label="loc_nmih_WarrantLiability_263da978-5612-11e3-b035-22000a1e8102" xlink:type="locator" />
    <calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_6e59ec02-9656-11e2-88e7-12313d1a0274" xlink:to="loc_nmih_WarrantLiability_263da978-5612-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_DeferredTaxLiabilities" xlink:label="loc_us-gaap_DeferredTaxLiabilities_2b61113c-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="5" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_6e59ec02-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_DeferredTaxLiabilities_2b61113c-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_TaxesPayableCurrent" xlink:label="loc_us-gaap_TaxesPayableCurrent_b033a91a-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="6" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_6e59ec02-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_TaxesPayableCurrent_b033a91a-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_StockholdersEquity" xlink:label="loc_us-gaap_StockholdersEquity_adc32df4-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_6e1ed1d0-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_StockholdersEquity_adc32df4-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_CommonStockValueOutstanding" xlink:label="loc_us-gaap_CommonStockValueOutstanding_1e322104-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_adc32df4-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_CommonStockValueOutstanding_1e322104-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_AdditionalPaidInCapital" xlink:label="loc_us-gaap_AdditionalPaidInCapital_06e972fe-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_adc32df4-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_AdditionalPaidInCapital_06e972fe-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_062fd1c8-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_adc32df4-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_062fd1c8-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_RetainedEarningsAccumulatedDeficit" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_a33a731a-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_adc32df4-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_a33a731a-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_CommitmentsAndContingencies" xlink:label="loc_us-gaap_CommitmentsAndContingencies_1e12e4ba-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_6e1ed1d0-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_CommitmentsAndContingencies_1e12e4ba-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_Assets" xlink:label="loc_us-gaap_Assets_0ce13e30-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_Investments" xlink:label="loc_us-gaap_Investments_6ad2bbc2-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_0ce13e30-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_Investments_6ad2bbc2-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_0dd57554-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Investments_6ad2bbc2-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_0dd57554-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_18320242-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_0ce13e30-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_18320242-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_AccruedInvestmentIncomeReceivable" xlink:label="loc_us-gaap_AccruedInvestmentIncomeReceivable_05f01f74-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_0ce13e30-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_AccruedInvestmentIncomeReceivable_05f01f74-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_PrepaidExpenseCurrentAndNoncurrent" xlink:label="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_90e073d6-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_0ce13e30-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_90e073d6-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_DeferredPolicyAcquisitionCosts" xlink:label="loc_us-gaap_DeferredPolicyAcquisitionCosts_29fb7166-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="5" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_0ce13e30-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_DeferredPolicyAcquisitionCosts_29fb7166-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_IntangibleAssetsNetIncludingGoodwill" xlink:label="loc_us-gaap_IntangibleAssetsNetIncludingGoodwill_673abba4-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="6" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_0ce13e30-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_IntangibleAssetsNetIncludingGoodwill_673abba4-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_940b342e-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="7" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_0ce13e30-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_940b342e-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_PremiumsReceivableAtCarryingValue" xlink:label="loc_us-gaap_PremiumsReceivableAtCarryingValue_90bc6216-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="8" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_0ce13e30-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_PremiumsReceivableAtCarryingValue_90bc6216-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_OtherAssets" xlink:label="loc_us-gaap_OtherAssets_839ac38e-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="9" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_0ce13e30-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_OtherAssets_839ac38e-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
  </calculationLink>
  <calculationLink xlink:role="http://www.nationalmi.com/role/CondensedConsolidatedBalanceSheetsParenthetical" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfCashFlows" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_CashAndCashEquivalentsPeriodIncreaseDecrease" xlink:label="loc_us-gaap_CashAndCashEquivalentsPeriodIncreaseDecrease_181e990a-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_7bb4725a-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashAndCashEquivalentsPeriodIncreaseDecrease_181e990a-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_7bb4725a-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_7cc2c354-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_7bb4725a-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_NetIncomeLoss_7cc2c354-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_ShareBasedCompensation" xlink:label="loc_us-gaap_ShareBasedCompensation_ab78f61e-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_7bb4725a-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_ShareBasedCompensation_ab78f61e-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="nmih-20140630.xsd#nmih_GainLossonChangeinFairValueofWarrantLiability" xlink:label="loc_nmih_GainLossonChangeinFairValueofWarrantLiability_0b8f6336-5627-11e3-b035-22000a1e8102" xlink:type="locator" />
    <calculationArc order="3" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_7bb4725a-9656-11e2-88e7-12313d1a0274" xlink:to="loc_nmih_GainLossonChangeinFairValueofWarrantLiability_0b8f6336-5627-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet_0e2df0b2-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="4" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_7bb4725a-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet_0e2df0b2-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_DepreciationAmortizationAndAccretionNet" xlink:label="loc_us-gaap_DepreciationAmortizationAndAccretionNet_328af0ea-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="5" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_7bb4725a-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_DepreciationAmortizationAndAccretionNet_328af0ea-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable_62d4c7da-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="6" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_7bb4725a-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable_62d4c7da-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_IncreaseDecreaseInUnearnedPremiumsNet" xlink:label="loc_us-gaap_IncreaseDecreaseInUnearnedPremiumsNet_62c45e2c-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="7" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_7bb4725a-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_IncreaseDecreaseInUnearnedPremiumsNet_62c45e2c-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_IncreaseDecreaseInPrepaidExpense" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidExpense_63aab8f4-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="8" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_7bb4725a-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidExpense_63aab8f4-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_IncreaseDecreaseInDeferredPolicyAcquisitionCosts" xlink:label="loc_us-gaap_IncreaseDecreaseInDeferredPolicyAcquisitionCosts_630411b6-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="9" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_7bb4725a-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_IncreaseDecreaseInDeferredPolicyAcquisitionCosts_630411b6-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_IncreaseDecreaseInPremiumsReceivable" xlink:label="loc_us-gaap_IncreaseDecreaseInPremiumsReceivable_63d2d352-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="10" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_7bb4725a-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_IncreaseDecreaseInPremiumsReceivable_63d2d352-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_63b112d0-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="11" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_7bb4725a-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_63b112d0-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_63119b74-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="12" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_7bb4725a-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_63119b74-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="nmih-20140630.xsd#nmih_GainLossFromSettlementofWarrants" xlink:label="loc_nmih_GainLossFromSettlementofWarrants_d8b3f3a2-ca4b-11e3-b035-22000a1e8102" xlink:type="locator" />
    <calculationArc order="13" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_7bb4725a-9656-11e2-88e7-12313d1a0274" xlink:to="loc_nmih_GainLossFromSettlementofWarrants_d8b3f3a2-ca4b-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_IncreaseDecreaseInLossAndLossAdjustmentExpenseReserve" xlink:label="loc_us-gaap_IncreaseDecreaseInLossAndLossAdjustmentExpenseReserve_6363e6e0-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="14" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_7bb4725a-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_IncreaseDecreaseInLossAndLossAdjustmentExpenseReserve_6363e6e0-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="nmih-20140630.xsd#nmih_ExpenseBenefitforTaxesonCurrentYearUnrealizedGains" xlink:label="loc_nmih_ExpenseBenefitforTaxesonCurrentYearUnrealizedGains_99527be4-14fa-11e4-b035-22000a1e8102" xlink:type="locator" />
    <calculationArc order="15" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_7bb4725a-9656-11e2-88e7-12313d1a0274" xlink:to="loc_nmih_ExpenseBenefitforTaxesonCurrentYearUnrealizedGains_99527be4-14fa-11e4-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_7c8e1730-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashAndCashEquivalentsPeriodIncreaseDecrease_181e990a-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_7c8e1730-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_PaymentsToAcquireShortTermInvestments" xlink:label="loc_us-gaap_PaymentsToAcquireShortTermInvestments_8bb6856c-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="1" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_7c8e1730-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_PaymentsToAcquireShortTermInvestments_8bb6856c-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt" xlink:label="loc_us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt_8b6924a2-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_7c8e1730-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt_8b6924a2-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_ProceedsFromSaleOfAvailableForSaleSecuritiesDebt" xlink:label="loc_us-gaap_ProceedsFromSaleOfAvailableForSaleSecuritiesDebt_9314f12c-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_7c8e1730-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_ProceedsFromSaleOfAvailableForSaleSecuritiesDebt_9314f12c-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_PaymentsToAcquirePropertyPlantAndEquipment" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_8b21b464-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="4" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_7c8e1730-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_8b21b464-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_ProceedsFromSaleOfShortTermInvestments" xlink:label="loc_us-gaap_ProceedsFromSaleOfShortTermInvestments_92ff1a82-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="5" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_7c8e1730-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_ProceedsFromSaleOfShortTermInvestments_92ff1a82-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_7ca2b500-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashAndCashEquivalentsPeriodIncreaseDecrease_181e990a-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_7ca2b500-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation" xlink:label="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_894a3350-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="1" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_7ca2b500-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_894a3350-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_ProceedsFromIssuanceOfCommonStock" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_92ead8b0-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_7ca2b500-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_92ead8b0-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
  </calculationLink>
  <calculationLink xlink:role="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfComprehensiveLoss" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_ComprehensiveIncomeNetOfTax" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_20119e50-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_7cc2c354-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_20119e50-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_NetIncomeLoss_7cc2c354-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_602ea2e4-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_7cc2c354-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_602ea2e4-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_Revenues" xlink:label="loc_us-gaap_Revenues_a489395e-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_602ea2e4-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_Revenues_a489395e-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_PremiumsEarnedNet" xlink:label="loc_us-gaap_PremiumsEarnedNet_902085c6-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Revenues_a489395e-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_PremiumsEarnedNet_902085c6-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_PremiumsWrittenNet" xlink:label="loc_us-gaap_PremiumsWrittenNet_901fe558-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PremiumsEarnedNet_902085c6-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_PremiumsWrittenNet_901fe558-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_DirectPremiumsWritten" xlink:label="loc_us-gaap_DirectPremiumsWritten_3a3ff768-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PremiumsWrittenNet_901fe558-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_DirectPremiumsWritten_3a3ff768-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_IncreaseDecreaseInUnearnedPremiumsNet" xlink:label="loc_us-gaap_IncreaseDecreaseInUnearnedPremiumsNet_62c45e2c-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PremiumsEarnedNet_902085c6-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_IncreaseDecreaseInUnearnedPremiumsNet_62c45e2c-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_NetInvestmentIncome" xlink:label="loc_us-gaap_NetInvestmentIncome_7ccb7d32-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Revenues_a489395e-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_NetInvestmentIncome_7ccb7d32-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet_0e2df0b2-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Revenues_a489395e-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet_0e2df0b2-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="nmih-20140630.xsd#nmih_GainLossonChangeinFairValueofWarrantLiability" xlink:label="loc_nmih_GainLossonChangeinFairValueofWarrantLiability_0b8f6336-5627-11e3-b035-22000a1e8102" xlink:type="locator" />
    <calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Revenues_a489395e-9656-11e2-88e7-12313d1a0274" xlink:to="loc_nmih_GainLossonChangeinFairValueofWarrantLiability_0b8f6336-5627-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="nmih-20140630.xsd#nmih_GainLossFromSettlementofWarrants" xlink:label="loc_nmih_GainLossFromSettlementofWarrants_d8b3f3a2-ca4b-11e3-b035-22000a1e8102" xlink:type="locator" />
    <calculationArc order="5" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Revenues_a489395e-9656-11e2-88e7-12313d1a0274" xlink:to="loc_nmih_GainLossFromSettlementofWarrants_d8b3f3a2-ca4b-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_CostsAndExpenses" xlink:label="loc_us-gaap_CostsAndExpenses_23967884-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_602ea2e4-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_CostsAndExpenses_23967884-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_IncurredClaimsPropertyCasualtyAndLiability" xlink:label="loc_us-gaap_IncurredClaimsPropertyCasualtyAndLiability_66351a4c-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_23967884-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_IncurredClaimsPropertyCasualtyAndLiability_66351a4c-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_DeferredPolicyAcquisitionCostAmortizationExpense" xlink:label="loc_us-gaap_DeferredPolicyAcquisitionCostAmortizationExpense_29f6963c-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_23967884-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_DeferredPolicyAcquisitionCostAmortizationExpense_29f6963c-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_OtherCostAndExpenseOperating" xlink:label="loc_us-gaap_OtherCostAndExpenseOperating_84b72fe6-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_23967884-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_OtherCostAndExpenseOperating_84b72fe6-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_610ca94a-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_7cc2c354-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_610ca94a-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_881fa96a-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_20119e50-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_881fa96a-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent" xlink:label="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent_881826f4-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_881fa96a-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent_881826f4-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
  </calculationLink>
  <calculationLink xlink:role="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfComprehensiveLossParentheticals" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfShareholdersEquity" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/CondensedConsolidatedStatementsOfShareholdersEquityParenthetical" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/DocumentAndEntityInformation" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/FairValueOfFinancialInstruments" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsAssetsAndLiabilitiesAtFairValueDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_LiabilitiesFairValueDisclosure" xlink:label="loc_us-gaap_LiabilitiesFairValueDisclosure_6f636254-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <loc xlink:href="nmih-20140630.xsd#nmih_WarrantLiability" xlink:label="loc_nmih_WarrantLiability_263da978-5612-11e3-b035-22000a1e8102" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesFairValueDisclosure_6f636254-9656-11e2-88e7-12313d1a0274" xlink:to="loc_nmih_WarrantLiability_263da978-5612-11e3-b035-22000a1e8102" xlink:type="arc" />
  </calculationLink>
  <calculationLink xlink:role="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsNarrativeDetails" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsRollforwardOfLevel3Details" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsTables" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/IncomeTaxes" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/IncomeTaxesNarrativeDetails" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwill" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwillDetails" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwillTables" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/Investments" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsFairValuesAndGrossUnrealizedGainsAndLossesOnInvestmentsDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_AvailableForSaleSecurities" xlink:label="loc_us-gaap_AvailableForSaleSecurities_0dd129a4-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_AvailableForSaleSecuritiesAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesAmortizedCost_0e08560e-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecurities_0dd129a4-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesAmortizedCost_0e08560e-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="nmih-20140630.xsd#nmih_AvailableforsaleSecuritiesGrossUnrealizedGainAccumulatedinInvestments" xlink:label="loc_nmih_AvailableforsaleSecuritiesGrossUnrealizedGainAccumulatedinInvestments_f2d91d7c-56c7-11e3-b035-22000a1e8102" xlink:type="locator" />
    <calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecurities_0dd129a4-9656-11e2-88e7-12313d1a0274" xlink:to="loc_nmih_AvailableforsaleSecuritiesGrossUnrealizedGainAccumulatedinInvestments_f2d91d7c-56c7-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="nmih-20140630.xsd#nmih_AvailableforsaleSecuritiesGrossUnrealizedLossAccumulatedinInvestments" xlink:label="loc_nmih_AvailableforsaleSecuritiesGrossUnrealizedLossAccumulatedinInvestments_04f8ea82-56c8-11e3-b035-22000a1e8102" xlink:type="locator" />
    <calculationArc order="3" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecurities_0dd129a4-9656-11e2-88e7-12313d1a0274" xlink:to="loc_nmih_AvailableforsaleSecuritiesGrossUnrealizedLossAccumulatedinInvestments_04f8ea82-56c8-11e3-b035-22000a1e8102" xlink:type="arc" />
  </calculationLink>
  <calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsNarrativeDetails" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsNetInvestmentIncomeDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_InvestmentIncomeNet" xlink:label="loc_us-gaap_InvestmentIncomeNet_6a185106-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <loc xlink:href="nmih-20140630.xsd#nmih_InvestmentIncomeGross" xlink:label="loc_nmih_InvestmentIncomeGross_acb431d4-56da-11e3-b035-22000a1e8102" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InvestmentIncomeNet_6a185106-9656-11e2-88e7-12313d1a0274" xlink:to="loc_nmih_InvestmentIncomeGross_acb431d4-56da-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_InvestmentIncomeInvestmentExpense" xlink:label="loc_us-gaap_InvestmentIncomeInvestmentExpense_6a7f5f90-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InvestmentIncomeNet_6a185106-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_InvestmentIncomeInvestmentExpense_6a7f5f90-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
  </calculationLink>
  <calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsNetRealizedInvestmentLossesGainsOnInvestmentsDetails" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsScheduledMaturitiesDetails" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsTables" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/InvestmentsUnrealizedLossesDetails" xlink:type="extended">
    <loc xlink:href="nmih-20140630.xsd#nmih_AvailableforsaleSecuritiesContinuousUnrealizedLossPositionAggregateLossAccumulatedinInvestments" xlink:label="loc_nmih_AvailableforsaleSecuritiesContinuousUnrealizedLossPositionAggregateLossAccumulatedinInvestments_82f2ef28-56d7-11e3-b035-22000a1e8102" xlink:type="locator" />
    <loc xlink:href="nmih-20140630.xsd#nmih_AvailableforsaleSecuritiesContinuousUnrealizedLossPositionLessthan12MonthsAggregateLossAccumulatedInInvestments" xlink:label="loc_nmih_AvailableforsaleSecuritiesContinuousUnrealizedLossPositionLessthan12MonthsAggregateLossAccumulatedInInvestments_30d4f0d8-56d7-11e3-b035-22000a1e8102" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_nmih_AvailableforsaleSecuritiesContinuousUnrealizedLossPositionAggregateLossAccumulatedinInvestments_82f2ef28-56d7-11e3-b035-22000a1e8102" xlink:to="loc_nmih_AvailableforsaleSecuritiesContinuousUnrealizedLossPositionLessthan12MonthsAggregateLossAccumulatedInInvestments_30d4f0d8-56d7-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="nmih-20140630.xsd#nmih_AvailableforsaleSecuritiesContinuousUnrealizedLossPosition12MonthsorLongerAggregateLossAccumulatedinInvestments" xlink:label="loc_nmih_AvailableforsaleSecuritiesContinuousUnrealizedLossPosition12MonthsorLongerAggregateLossAccumulatedinInvestments_64d7854e-56d7-11e3-b035-22000a1e8102" xlink:type="locator" />
    <calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_nmih_AvailableforsaleSecuritiesContinuousUnrealizedLossPositionAggregateLossAccumulatedinInvestments_82f2ef28-56d7-11e3-b035-22000a1e8102" xlink:to="loc_nmih_AvailableforsaleSecuritiesContinuousUnrealizedLossPosition12MonthsorLongerAggregateLossAccumulatedinInvestments_64d7854e-56d7-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionFairValue_0dd71b84-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue_0dce0f3a-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionFairValue_0dd71b84-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue_0dce0f3a-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue_0d9c2e48-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionFairValue_0dd71b84-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue_0d9c2e48-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
  </calculationLink>
  <calculationLink xlink:role="http://www.nationalmi.com/role/Litigation" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/OrganizationAndBasisOfPresentation" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/OrganizationAndBasisOfPresentationDetails" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpenses" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaid" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaid_6ffbee7a-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidCurrentYear" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidCurrentYear_6fc74fa8-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaid_6ffbee7a-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidCurrentYear_6fc74fa8-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidPriorYears" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidPriorYears_6f8e020c-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaid_6ffbee7a-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseClaimsPaidPriorYears_6f8e020c-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaims" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaims_701398e0-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaimsCurrentYear" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaimsCurrentYear_70262096-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaims_701398e0-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaimsCurrentYear_70262096-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaimsPriorYears" xlink:label="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaimsPriorYears_702a2542-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaims_701398e0-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_LiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseIncurredClaimsPriorYears_702a2542-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
  </calculationLink>
  <calculationLink xlink:role="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimExpensesTables" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/ShareBasedCompensation" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/ShareBasedCompensationNarrativeDetails" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/ShareBasedCompensationRestrictedStockUnitsActivityDetails" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/ShareBasedCompensationStockOptionActivityDetails" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/ShareBasedCompensationTables" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/SoftwareAndEquipment" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/SoftwareAndEquipmentDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_940b342e-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_PropertyPlantAndEquipmentGross" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_9406abd4-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentNet_940b342e-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentGross_9406abd4-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment" xlink:label="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_061c48ec-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentNet_940b342e-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_061c48ec-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
  </calculationLink>
  <calculationLink xlink:role="http://www.nationalmi.com/role/SoftwareAndEquipmentNarrativeDetails" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/SoftwareAndEquipmentTables" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/StatutoryInformation" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/StatutoryInformationNarrativeDetails" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/StatutoryInformationRiskToCapitalDetails" xlink:type="extended">
    <loc xlink:href="nmih-20140630.xsd#nmih_StatutoryAccountingPracticesStatutoryPolicyholdersSurplusPlusContingencyReserves" xlink:label="loc_nmih_StatutoryAccountingPracticesStatutoryPolicyholdersSurplusPlusContingencyReserves_7eb17df8-5c68-11e3-b035-22000a1e8102" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_StatutoryAccountingPracticesStatutoryCapitalAndSurplusBalance" xlink:label="loc_us-gaap_StatutoryAccountingPracticesStatutoryCapitalAndSurplusBalance_acfb8fc4-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_nmih_StatutoryAccountingPracticesStatutoryPolicyholdersSurplusPlusContingencyReserves_7eb17df8-5c68-11e3-b035-22000a1e8102" xlink:to="loc_us-gaap_StatutoryAccountingPracticesStatutoryCapitalAndSurplusBalance_acfb8fc4-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="nmih-20140630.xsd#nmih_ContingencyReserve" xlink:label="loc_nmih_ContingencyReserve_33188482-53d4-11e3-b035-22000a1e8102" xlink:type="locator" />
    <calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_nmih_StatutoryAccountingPracticesStatutoryPolicyholdersSurplusPlusContingencyReserves_7eb17df8-5c68-11e3-b035-22000a1e8102" xlink:to="loc_nmih_ContingencyReserve_33188482-53d4-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="nmih-20140630.xsd#nmih_MortgageInsuranceRiskinForce" xlink:label="loc_nmih_MortgageInsuranceRiskinForce_8e3bd63a-53d3-11e3-b035-22000a1e8102" xlink:type="locator" />
    <loc xlink:href="nmih-20140630.xsd#nmih_MortgageInsuranceRiskInForcePool" xlink:label="loc_nmih_MortgageInsuranceRiskInForcePool_4e6af5cc-53d3-11e3-b035-22000a1e8102" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_nmih_MortgageInsuranceRiskinForce_8e3bd63a-53d3-11e3-b035-22000a1e8102" xlink:to="loc_nmih_MortgageInsuranceRiskInForcePool_4e6af5cc-53d3-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="nmih-20140630.xsd#nmih_MortgageInsuranceinForceGrossPool" xlink:label="loc_nmih_MortgageInsuranceinForceGrossPool_3fab9a4e-a33f-11e3-b035-22000a1e8102" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_nmih_MortgageInsuranceRiskInForcePool_4e6af5cc-53d3-11e3-b035-22000a1e8102" xlink:to="loc_nmih_MortgageInsuranceinForceGrossPool_3fab9a4e-a33f-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="nmih-20140630.xsd#nmih_MortgageInsuranceinForceAssumedPool" xlink:label="loc_nmih_MortgageInsuranceinForceAssumedPool_54a02960-a33f-11e3-b035-22000a1e8102" xlink:type="locator" />
    <calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_nmih_MortgageInsuranceRiskInForcePool_4e6af5cc-53d3-11e3-b035-22000a1e8102" xlink:to="loc_nmih_MortgageInsuranceinForceAssumedPool_54a02960-a33f-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="nmih-20140630.xsd#nmih_MortgageInsuranceinForceCededPool" xlink:label="loc_nmih_MortgageInsuranceinForceCededPool_62dfb702-a33f-11e3-b035-22000a1e8102" xlink:type="locator" />
    <calculationArc order="3" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_nmih_MortgageInsuranceRiskInForcePool_4e6af5cc-53d3-11e3-b035-22000a1e8102" xlink:to="loc_nmih_MortgageInsuranceinForceCededPool_62dfb702-a33f-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="nmih-20140630.xsd#nmih_RiskinForcePrimary" xlink:label="loc_nmih_RiskinForcePrimary_8130a04c-53d3-11e3-b035-22000a1e8102" xlink:type="locator" />
    <calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_nmih_MortgageInsuranceRiskinForce_8e3bd63a-53d3-11e3-b035-22000a1e8102" xlink:to="loc_nmih_RiskinForcePrimary_8130a04c-53d3-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="nmih-20140630.xsd#nmih_PrimaryRiskinForceGross" xlink:label="loc_nmih_PrimaryRiskinForceGross_e7239650-a33f-11e3-b035-22000a1e8102" xlink:type="locator" />
    <calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_nmih_RiskinForcePrimary_8130a04c-53d3-11e3-b035-22000a1e8102" xlink:to="loc_nmih_PrimaryRiskinForceGross_e7239650-a33f-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="nmih-20140630.xsd#nmih_PrimaryRiskinForceAssumed" xlink:label="loc_nmih_PrimaryRiskinForceAssumed_f48a956e-a33f-11e3-b035-22000a1e8102" xlink:type="locator" />
    <calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_nmih_RiskinForcePrimary_8130a04c-53d3-11e3-b035-22000a1e8102" xlink:to="loc_nmih_PrimaryRiskinForceAssumed_f48a956e-a33f-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="nmih-20140630.xsd#nmih_PrimaryRiskinForceCeded" xlink:label="loc_nmih_PrimaryRiskinForceCeded_0468c3fc-a340-11e3-b035-22000a1e8102" xlink:type="locator" />
    <calculationArc order="3" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_nmih_RiskinForcePrimary_8130a04c-53d3-11e3-b035-22000a1e8102" xlink:to="loc_nmih_PrimaryRiskinForceCeded_0468c3fc-a340-11e3-b035-22000a1e8102" xlink:type="arc" />
  </calculationLink>
  <calculationLink xlink:role="http://www.nationalmi.com/role/StatutoryInformationStatutoryIncomeDetails" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/StatutoryInformationTables" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/Warrants" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/WarrantsDetails" xlink:type="extended" />
</linkbase>
