<?xml version="1.0" encoding="US-ASCII"?>
<!--XBRL Document Created with 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/AcquisitionOfMac" xlink:href="nmih-20130930.xsd#AcquisitionOfMac" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/AcquisitionOfMacDetails" xlink:href="nmih-20130930.xsd#AcquisitionOfMacDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/AcquisitionOfMacNarrativeDetails" xlink:href="nmih-20130930.xsd#AcquisitionOfMacNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/AcquisitionOfMacTables" xlink:href="nmih-20130930.xsd#AcquisitionOfMacTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CommitmentsAndContingencies" xlink:href="nmih-20130930.xsd#CommitmentsAndContingencies" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails" xlink:href="nmih-20130930.xsd#CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CommitmentsAndContingenciesNarrativeDetails" xlink:href="nmih-20130930.xsd#CommitmentsAndContingenciesNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CommitmentsAndContingenciesTables" xlink:href="nmih-20130930.xsd#CommitmentsAndContingenciesTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CommonStockOffering" xlink:href="nmih-20130930.xsd#CommonStockOffering" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CommonStockOfferingDetails" xlink:href="nmih-20130930.xsd#CommonStockOfferingDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ConsolidatedBalanceSheets" xlink:href="nmih-20130930.xsd#ConsolidatedBalanceSheets" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ConsolidatedBalanceSheetsParenthetical" xlink:href="nmih-20130930.xsd#ConsolidatedBalanceSheetsParenthetical" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ConsolidatedStatementsOfCashFlows" xlink:href="nmih-20130930.xsd#ConsolidatedStatementsOfCashFlows" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ConsolidatedStatementsOfOperationsAndComprehensiveIncomeLoss" xlink:href="nmih-20130930.xsd#ConsolidatedStatementsOfOperationsAndComprehensiveIncomeLoss" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ConsolidatedStatementsOfShareholdersEquity" xlink:href="nmih-20130930.xsd#ConsolidatedStatementsOfShareholdersEquity" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/DocumentAndEntityInformation" xlink:href="nmih-20130930.xsd#DocumentAndEntityInformation" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstruments" xlink:href="nmih-20130930.xsd#FairValueOfFinancialInstruments" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsAssetsAndLiabilitiesAtFairValueDetails" xlink:href="nmih-20130930.xsd#FairValueOfFinancialInstrumentsAssetsAndLiabilitiesAtFairValueDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsNarrativeDetails" xlink:href="nmih-20130930.xsd#FairValueOfFinancialInstrumentsNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsRollforwardOfLevel3Details" xlink:href="nmih-20130930.xsd#FairValueOfFinancialInstrumentsRollforwardOfLevel3Details" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsTables" xlink:href="nmih-20130930.xsd#FairValueOfFinancialInstrumentsTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxes" xlink:href="nmih-20130930.xsd#IncomeTaxes" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxesDeferredTaxAssetDetails" xlink:href="nmih-20130930.xsd#IncomeTaxesDeferredTaxAssetDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxesNarrativeDetails" xlink:href="nmih-20130930.xsd#IncomeTaxesNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxesTables" xlink:href="nmih-20130930.xsd#IncomeTaxesTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/IntangibleAssets" xlink:href="nmih-20130930.xsd#IntangibleAssets" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/IntangibleAssetsDetails" xlink:href="nmih-20130930.xsd#IntangibleAssetsDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/IntangibleAssetsTables" xlink:href="nmih-20130930.xsd#IntangibleAssetsTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/Investments" xlink:href="nmih-20130930.xsd#Investments" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsFairValuesAndGrossUnrealizedGainsAndLossesOnInvestmentsDetails" xlink:href="nmih-20130930.xsd#InvestmentsFairValuesAndGrossUnrealizedGainsAndLossesOnInvestmentsDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNarrativeDetails" xlink:href="nmih-20130930.xsd#InvestmentsNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNetInvestmentIncomeDetails" xlink:href="nmih-20130930.xsd#InvestmentsNetInvestmentIncomeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNetRealizedInvestmentLossesGainsOnInvestmentsDetails" xlink:href="nmih-20130930.xsd#InvestmentsNetRealizedInvestmentLossesGainsOnInvestmentsDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsScheduledMaturitiesDetails" xlink:href="nmih-20130930.xsd#InvestmentsScheduledMaturitiesDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsTables" xlink:href="nmih-20130930.xsd#InvestmentsTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsUnrealizedLossesDetails" xlink:href="nmih-20130930.xsd#InvestmentsUnrealizedLossesDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/LineOfCreditAndRelatedWarrants" xlink:href="nmih-20130930.xsd#LineOfCreditAndRelatedWarrants" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/LineOfCreditAndRelatedWarrantsDetails" xlink:href="nmih-20130930.xsd#LineOfCreditAndRelatedWarrantsDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/Litigation" xlink:href="nmih-20130930.xsd#Litigation" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/OrganizationAndBasisOfPresentation" xlink:href="nmih-20130930.xsd#OrganizationAndBasisOfPresentation" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/OrganizationAndBasisOfPresentationDetails" xlink:href="nmih-20130930.xsd#OrganizationAndBasisOfPresentationDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/SoftwareAndEquipment" xlink:href="nmih-20130930.xsd#SoftwareAndEquipment" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/SoftwareAndEquipmentDetails" xlink:href="nmih-20130930.xsd#SoftwareAndEquipmentDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/SoftwareAndEquipmentNarrativeDetails" xlink:href="nmih-20130930.xsd#SoftwareAndEquipmentNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/SoftwareAndEquipmentTables" xlink:href="nmih-20130930.xsd#SoftwareAndEquipmentTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/StatutoryInformation" xlink:href="nmih-20130930.xsd#StatutoryInformation" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/StatutoryInformationNarrativeDetails" xlink:href="nmih-20130930.xsd#StatutoryInformationNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/StatutoryInformationRiskToCapitalDetails" xlink:href="nmih-20130930.xsd#StatutoryInformationRiskToCapitalDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/StatutoryInformationTables" xlink:href="nmih-20130930.xsd#StatutoryInformationTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/StockCompensation" xlink:href="nmih-20130930.xsd#StockCompensation" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/StockCompensationNarrativeDetails" xlink:href="nmih-20130930.xsd#StockCompensationNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/StockCompensationRestrictedStockUnitsActivityDetails" xlink:href="nmih-20130930.xsd#StockCompensationRestrictedStockUnitsActivityDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/StockCompensationRestrictedStockUnitsValuationAssumptionsDetails" xlink:href="nmih-20130930.xsd#StockCompensationRestrictedStockUnitsValuationAssumptionsDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/StockCompensationStockOptionActivityDetails" xlink:href="nmih-20130930.xsd#StockCompensationStockOptionActivityDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/StockCompensationStockOptionsValuationAssumptionsDetails" xlink:href="nmih-20130930.xsd#StockCompensationStockOptionsValuationAssumptionsDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/StockCompensationTables" xlink:href="nmih-20130930.xsd#StockCompensationTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/SubsequentEvents" xlink:href="nmih-20130930.xsd#SubsequentEvents" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/SubsequentEventsDetails" xlink:href="nmih-20130930.xsd#SubsequentEventsDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/SummaryOfAccountingPolicies" xlink:href="nmih-20130930.xsd#SummaryOfAccountingPolicies" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/SummaryOfAccountingPoliciesDetails" xlink:href="nmih-20130930.xsd#SummaryOfAccountingPoliciesDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/SummaryOfAccountingPoliciesPolicies" xlink:href="nmih-20130930.xsd#SummaryOfAccountingPoliciesPolicies" xlink:type="simple" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/AcquisitionOfMac" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/AcquisitionOfMacDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredGoodwillAndLiabilitiesAssumedNet" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredGoodwillAndLiabilitiesAssumedNet_13b6e3b8-9656-11e2-88e7-12313d1a0274" xlink:type="locator" />
    <loc xlink:href="nmih-20130930.xsd#nmih_BusinessCombinationRecognizedIdentifiableAssetsAcquiredandLiabilitiesAssumedAssetsAcquiredIncludingGoodwill" xlink:label="loc_nmih_BusinessCombinationRecognizedIdentifiableAssetsAcquiredandLiabilitiesAssumedAssetsAcquiredIncludingGoodwill_c982e9f8-56c2-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_BusinessCombinationRecognizedIdentifiableAssetsAcquiredGoodwillAndLiabilitiesAssumedNet_13b6e3b8-9656-11e2-88e7-12313d1a0274" xlink:to="loc_nmih_BusinessCombinationRecognizedIdentifiableAssetsAcquiredandLiabilitiesAssumedAssetsAcquiredIncludingGoodwill_c982e9f8-56c2-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_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets_103f7bbe-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_BusinessCombinationRecognizedIdentifiableAssetsAcquiredandLiabilitiesAssumedAssetsAcquiredIncludingGoodwill_c982e9f8-56c2-11e3-b035-22000a1e8102" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets_103f7bbe-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_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibleAssetsOtherThanGoodwill" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibleAssetsOtherThanGoodwill_10d78b34-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_nmih_BusinessCombinationRecognizedIdentifiableAssetsAcquiredandLiabilitiesAssumedAssetsAcquiredIncludingGoodwill_c982e9f8-56c2-11e3-b035-22000a1e8102" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibleAssetsOtherThanGoodwill_10d78b34-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_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment_12db1734-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_nmih_BusinessCombinationRecognizedIdentifiableAssetsAcquiredandLiabilitiesAssumedAssetsAcquiredIncludingGoodwill_c982e9f8-56c2-11e3-b035-22000a1e8102" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment_12db1734-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_Goodwill" xlink:label="loc_us-gaap_Goodwill_5c519906-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_nmih_BusinessCombinationRecognizedIdentifiableAssetsAcquiredandLiabilitiesAssumedAssetsAcquiredIncludingGoodwill_c982e9f8-56c2-11e3-b035-22000a1e8102" xlink:to="loc_us-gaap_Goodwill_5c519906-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_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedLiabilities" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedLiabilities_10d7ed18-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_BusinessCombinationRecognizedIdentifiableAssetsAcquiredGoodwillAndLiabilitiesAssumedNet_13b6e3b8-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedLiabilities_10d7ed18-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
  </calculationLink>
  <calculationLink xlink:role="http://www.nationalmi.com/role/AcquisitionOfMacNarrativeDetails" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/AcquisitionOfMacTables" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/CommitmentsAndContingencies" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDue" xlink:label="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDue_814b431a-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_OperatingLeasesFutureMinimumPaymentsDueCurrent" xlink:label="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDueCurrent_80207e60-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_OperatingLeasesFutureMinimumPaymentsDue_814b431a-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDueCurrent_80207e60-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_OperatingLeasesFutureMinimumPaymentsDueInTwoYears" xlink:label="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDueInTwoYears_813e614a-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_OperatingLeasesFutureMinimumPaymentsDue_814b431a-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDueInTwoYears_813e614a-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
  </calculationLink>
  <calculationLink xlink:role="http://www.nationalmi.com/role/CommitmentsAndContingenciesNarrativeDetails" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/CommitmentsAndContingenciesTables" xlink:type="extended" />
  <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/ConsolidatedBalanceSheets" 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_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent" xlink:label="loc_us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent_055e365e-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_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent_055e365e-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="nmih-20130930.xsd#nmih_PlacementFeePayable" xlink:label="loc_nmih_PlacementFeePayable_01f642ea-5613-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_Liabilities_6e59ec02-9656-11e2-88e7-12313d1a0274" xlink:to="loc_nmih_PlacementFeePayable_01f642ea-5613-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_BusinessCombinationContingentConsiderationLiability" xlink:label="loc_us-gaap_BusinessCombinationContingentConsiderationLiability_10b25be8-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_BusinessCombinationContingentConsiderationLiability_10b25be8-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="nmih-20130930.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_OtherLiabilities" xlink:label="loc_us-gaap_OtherLiabilities_8550ad24-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_OtherLiabilities_8550ad24-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_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_ShortTermInvestments" xlink:label="loc_us-gaap_ShortTermInvestments_ac3ee1b2-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_Investments_6ad2bbc2-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_ShortTermInvestments_ac3ee1b2-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_RestrictedCashAndCashEquivalents" xlink:label="loc_us-gaap_RestrictedCashAndCashEquivalents_a1a8c880-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_RestrictedCashAndCashEquivalents_a1a8c880-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="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_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="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_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="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_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_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/ConsolidatedBalanceSheetsParenthetical" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/ConsolidatedStatementsOfCashFlows" 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="http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd#us-gaap_ProceedsFromIssuanceOfWarrants" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfWarrants_92cf19f4-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_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_7bb4725a-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfWarrants_92cf19f4-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="nmih-20130930.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_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="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_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_ImpairmentOfIntangibleAssetsIndefinitelivedExcludingGoodwill" xlink:label="loc_us-gaap_ImpairmentOfIntangibleAssetsIndefinitelivedExcludingGoodwill_5fe9cfde-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_ImpairmentOfIntangibleAssetsIndefinitelivedExcludingGoodwill_5fe9cfde-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="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_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="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_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_IncreaseDecreaseInPrepaidExpense" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidExpense_63aab8f4-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_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="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_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_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="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_ProceedsFromSaleOfShortTermInvestments" xlink:label="loc_us-gaap_ProceedsFromSaleOfShortTermInvestments_92ff1a82-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_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_ProceedsFromSaleOfAvailableForSaleSecuritiesDebt" xlink:label="loc_us-gaap_ProceedsFromSaleOfAvailableForSaleSecuritiesDebt_9314f12c-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_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="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_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_PaymentsToAcquireBusinessesNetOfCashAcquired" xlink:label="loc_us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired_8acc97f4-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_NetCashProvidedByUsedInInvestingActivities_7c8e1730-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired_8acc97f4-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_RepaymentsOfLinesOfCredit" xlink:label="loc_us-gaap_RepaymentsOfLinesOfCredit_a1175f4e-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_RepaymentsOfLinesOfCredit_a1175f4e-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="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_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="3" 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/ConsolidatedStatementsOfOperationsAndComprehensiveIncomeLoss" 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_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_881fa96a-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_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" />
    <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="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_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_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_NetIncomeLoss_7cc2c354-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_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_Revenues_a489395e-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_PremiumsWrittenNet_901fe558-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-20130930.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="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_NetIncomeLoss_7cc2c354-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_LaborAndRelatedExpense" xlink:label="loc_us-gaap_LaborAndRelatedExpense_6b85980a-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_LaborAndRelatedExpense_6b85980a-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_CostsAndExpenses_23967884-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_ShareBasedCompensation_ab78f61e-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_DepreciationDepletionAndAmortization" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_328d60be-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_DepreciationDepletionAndAmortization_328d60be-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_ProfessionalFees" xlink:label="loc_us-gaap_ProfessionalFees_93e137e6-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_CostsAndExpenses_23967884-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_ProfessionalFees_93e137e6-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_InformationTechnologyAndDataProcessing" xlink:label="loc_us-gaap_InformationTechnologyAndDataProcessing_66af6a2c-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_CostsAndExpenses_23967884-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_InformationTechnologyAndDataProcessing_66af6a2c-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_TravelAndEntertainmentExpense" xlink:label="loc_us-gaap_TravelAndEntertainmentExpense_b214bc9c-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_CostsAndExpenses_23967884-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_TravelAndEntertainmentExpense_b214bc9c-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_LeaseAndRentalExpense" xlink:label="loc_us-gaap_LeaseAndRentalExpense_6ba0f10e-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_CostsAndExpenses_23967884-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_LeaseAndRentalExpense_6ba0f10e-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_InterestExpense" xlink:label="loc_us-gaap_InterestExpense_678fa826-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_CostsAndExpenses_23967884-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_InterestExpense_678fa826-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_ImpairmentOfIntangibleAssetsIndefinitelivedExcludingGoodwill" xlink:label="loc_us-gaap_ImpairmentOfIntangibleAssetsIndefinitelivedExcludingGoodwill_5fe9cfde-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_CostsAndExpenses_23967884-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_ImpairmentOfIntangibleAssetsIndefinitelivedExcludingGoodwill_5fe9cfde-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_OtherExpenses" xlink:label="loc_us-gaap_OtherExpenses_84f679f8-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_CostsAndExpenses_23967884-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_OtherExpenses_84f679f8-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
  </calculationLink>
  <calculationLink xlink:role="http://www.nationalmi.com/role/ConsolidatedStatementsOfShareholdersEquity" 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-20130930.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/IncomeTaxesDeferredTaxAssetDetails" xlink:type="extended">
    <loc xlink:href="nmih-20130930.xsd#nmih_DeferredTaxAssetsNetTaxEffected" xlink:label="loc_nmih_DeferredTaxAssetsNetTaxEffected_5af55ec0-579a-11e3-b035-22000a1e8102" xlink:type="locator" />
    <loc xlink:href="nmih-20130930.xsd#nmih_DeferredTaxAssetsNetofValuationAllowanceBeforeTaxEffected" xlink:label="loc_nmih_DeferredTaxAssetsNetofValuationAllowanceBeforeTaxEffected_dcc9f786-5799-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_DeferredTaxAssetsNetTaxEffected_5af55ec0-579a-11e3-b035-22000a1e8102" xlink:to="loc_nmih_DeferredTaxAssetsNetofValuationAllowanceBeforeTaxEffected_dcc9f786-5799-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="nmih-20130930.xsd#nmih_DeferredTaxAssetsGrossBeforeTaxEffected" xlink:label="loc_nmih_DeferredTaxAssetsGrossBeforeTaxEffected_b934c512-5799-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_DeferredTaxAssetsNetofValuationAllowanceBeforeTaxEffected_dcc9f786-5799-11e3-b035-22000a1e8102" xlink:to="loc_nmih_DeferredTaxAssetsGrossBeforeTaxEffected_b934c512-5799-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="nmih-20130930.xsd#nmih_DeferredTaxassetsCapitalizedStartupCostsGross" xlink:label="loc_nmih_DeferredTaxassetsCapitalizedStartupCostsGross_ac55a89a-5797-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_DeferredTaxAssetsGrossBeforeTaxEffected_b934c512-5799-11e3-b035-22000a1e8102" xlink:to="loc_nmih_DeferredTaxassetsCapitalizedStartupCostsGross_ac55a89a-5797-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="nmih-20130930.xsd#nmih_DeferredTaxAssetsTaxDeferredExpenseCompensationandBenefitsSharebasedCompensationCostGross" xlink:label="loc_nmih_DeferredTaxAssetsTaxDeferredExpenseCompensationandBenefitsSharebasedCompensationCostGross_1d4275e2-5798-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_DeferredTaxAssetsGrossBeforeTaxEffected_b934c512-5799-11e3-b035-22000a1e8102" xlink:to="loc_nmih_DeferredTaxAssetsTaxDeferredExpenseCompensationandBenefitsSharebasedCompensationCostGross_1d4275e2-5798-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="nmih-20130930.xsd#nmih_DeferredTaxAssetsUnrealizedLossesonAvailableforSaleSecuritiesGrossTaxEffected" xlink:label="loc_nmih_DeferredTaxAssetsUnrealizedLossesonAvailableforSaleSecuritiesGrossTaxEffected_4b04811e-5798-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_DeferredTaxAssetsGrossBeforeTaxEffected_b934c512-5799-11e3-b035-22000a1e8102" xlink:to="loc_nmih_DeferredTaxAssetsUnrealizedLossesonAvailableforSaleSecuritiesGrossTaxEffected_4b04811e-5798-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="nmih-20130930.xsd#nmih_DeferredTaxAssetsOperatingLossCarryforwardsGross" xlink:label="loc_nmih_DeferredTaxAssetsOperatingLossCarryforwardsGross_60011e74-5798-11e3-b035-22000a1e8102" xlink:type="locator" />
    <calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_nmih_DeferredTaxAssetsGrossBeforeTaxEffected_b934c512-5799-11e3-b035-22000a1e8102" xlink:to="loc_nmih_DeferredTaxAssetsOperatingLossCarryforwardsGross_60011e74-5798-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="nmih-20130930.xsd#nmih_DeferredTaxAssetsOtherGross" xlink:label="loc_nmih_DeferredTaxAssetsOtherGross_76c74d90-5798-11e3-b035-22000a1e8102" xlink:type="locator" />
    <calculationArc order="5" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_nmih_DeferredTaxAssetsGrossBeforeTaxEffected_b934c512-5799-11e3-b035-22000a1e8102" xlink:to="loc_nmih_DeferredTaxAssetsOtherGross_76c74d90-5798-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="nmih-20130930.xsd#nmih_DeferredTaxAssetsValuationAllowanceBeforeTaxEffected" xlink:label="loc_nmih_DeferredTaxAssetsValuationAllowanceBeforeTaxEffected_cb17f52e-5799-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_DeferredTaxAssetsNetofValuationAllowanceBeforeTaxEffected_dcc9f786-5799-11e3-b035-22000a1e8102" xlink:to="loc_nmih_DeferredTaxAssetsValuationAllowanceBeforeTaxEffected_cb17f52e-5799-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="nmih-20130930.xsd#nmih_DeferredTaxLiabilitiesGrossTaxEffected" xlink:label="loc_nmih_DeferredTaxLiabilitiesGrossTaxEffected_3ed4ce7e-579a-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_DeferredTaxAssetsNetTaxEffected_5af55ec0-579a-11e3-b035-22000a1e8102" xlink:to="loc_nmih_DeferredTaxLiabilitiesGrossTaxEffected_3ed4ce7e-579a-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="nmih-20130930.xsd#nmih_DeferredTaxLiabilitiesPropertyPlantandEquipmentTaxEffected" xlink:label="loc_nmih_DeferredTaxLiabilitiesPropertyPlantandEquipmentTaxEffected_ee5e3b6a-5799-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_DeferredTaxLiabilitiesGrossTaxEffected_3ed4ce7e-579a-11e3-b035-22000a1e8102" xlink:to="loc_nmih_DeferredTaxLiabilitiesPropertyPlantandEquipmentTaxEffected_ee5e3b6a-5799-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="nmih-20130930.xsd#nmih_DeferredTaxLiabilitiesIntangibleAssetsTaxEffected" xlink:label="loc_nmih_DeferredTaxLiabilitiesIntangibleAssetsTaxEffected_ffbc30ce-5799-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_DeferredTaxLiabilitiesGrossTaxEffected_3ed4ce7e-579a-11e3-b035-22000a1e8102" xlink:to="loc_nmih_DeferredTaxLiabilitiesIntangibleAssetsTaxEffected_ffbc30ce-5799-11e3-b035-22000a1e8102" xlink:type="arc" />
    <loc xlink:href="nmih-20130930.xsd#nmih_DeferredTaxLiabilitiesOtherTaxEffected" xlink:label="loc_nmih_DeferredTaxLiabilitiesOtherTaxEffected_11fa1bac-579a-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_DeferredTaxLiabilitiesGrossTaxEffected_3ed4ce7e-579a-11e3-b035-22000a1e8102" xlink:to="loc_nmih_DeferredTaxLiabilitiesOtherTaxEffected_11fa1bac-579a-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_DeferredTaxAssetsLiabilitiesNet" xlink:label="loc_us-gaap_DeferredTaxAssetsLiabilitiesNet_2a5d1178-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_DeferredTaxAssetsNet" xlink:label="loc_us-gaap_DeferredTaxAssetsNet_2afbcf16-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_DeferredTaxAssetsLiabilitiesNet_2a5d1178-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_DeferredTaxAssetsNet_2afbcf16-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_DeferredTaxAssetsGross" xlink:label="loc_us-gaap_DeferredTaxAssetsGross_2acbdd92-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_DeferredTaxAssetsNet_2afbcf16-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_DeferredTaxAssetsGross_2acbdd92-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
    <loc xlink:href="nmih-20130930.xsd#nmih_DeferredTaxassetsCapitalizedStartupCosts" xlink:label="loc_nmih_DeferredTaxassetsCapitalizedStartupCosts_e8d767ec-5795-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_DeferredTaxAssetsGross_2acbdd92-9656-11e2-88e7-12313d1a0274" xlink:to="loc_nmih_DeferredTaxassetsCapitalizedStartupCosts_e8d767ec-5795-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_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost_2ad7a794-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_DeferredTaxAssetsGross_2acbdd92-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost_2ad7a794-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_DeferredTaxAssetsUnrealizedLossesOnAvailableforSaleSecuritiesGross" xlink:label="loc_us-gaap_DeferredTaxAssetsUnrealizedLossesOnAvailableforSaleSecuritiesGross_29be095c-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_DeferredTaxAssetsGross_2acbdd92-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_DeferredTaxAssetsUnrealizedLossesOnAvailableforSaleSecuritiesGross_29be095c-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_DeferredTaxAssetsOperatingLossCarryforwards" xlink:label="loc_us-gaap_DeferredTaxAssetsOperatingLossCarryforwards_2b23d3c6-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_DeferredTaxAssetsGross_2acbdd92-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_DeferredTaxAssetsOperatingLossCarryforwards_2b23d3c6-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_DeferredTaxAssetsOther" xlink:label="loc_us-gaap_DeferredTaxAssetsOther_2ae70d38-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_DeferredTaxAssetsGross_2acbdd92-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_DeferredTaxAssetsOther_2ae70d38-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_DeferredTaxAssetsValuationAllowance" xlink:label="loc_us-gaap_DeferredTaxAssetsValuationAllowance_2b3a4dc2-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_DeferredTaxAssetsNet_2afbcf16-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_DeferredTaxAssetsValuationAllowance_2b3a4dc2-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_DeferredIncomeTaxLiabilities" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilities_29ef4d1e-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_DeferredTaxAssetsLiabilitiesNet_2a5d1178-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilities_29ef4d1e-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_DeferredTaxLiabilitiesPropertyPlantAndEquipment" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesPropertyPlantAndEquipment_2b4fcb20-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_DeferredIncomeTaxLiabilities_29ef4d1e-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesPropertyPlantAndEquipment_2b4fcb20-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_DeferredTaxLiabilitiesGoodwillAndIntangibleAssetsIntangibleAssets" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesGoodwillAndIntangibleAssetsIntangibleAssets_2b6027fe-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_DeferredIncomeTaxLiabilities_29ef4d1e-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesGoodwillAndIntangibleAssetsIntangibleAssets_2b6027fe-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_DeferredTaxLiabilitiesOther" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesOther_2b403a70-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_DeferredIncomeTaxLiabilities_29ef4d1e-9656-11e2-88e7-12313d1a0274" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesOther_2b403a70-9656-11e2-88e7-12313d1a0274" xlink:type="arc" />
  </calculationLink>
  <calculationLink xlink:role="http://www.nationalmi.com/role/IncomeTaxesNarrativeDetails" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/IncomeTaxesTables" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/IntangibleAssets" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/IntangibleAssetsDetails" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/IntangibleAssetsTables" 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-20130930.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-20130930.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-20130930.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-20130930.xsd#nmih_AvailableforsaleSecuritiesContinuousUnrealizedLossPositionAggregateLossAccumulatedinInvestments" xlink:label="loc_nmih_AvailableforsaleSecuritiesContinuousUnrealizedLossPositionAggregateLossAccumulatedinInvestments_82f2ef28-56d7-11e3-b035-22000a1e8102" xlink:type="locator" />
    <loc xlink:href="nmih-20130930.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-20130930.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/LineOfCreditAndRelatedWarrants" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/LineOfCreditAndRelatedWarrantsDetails" xlink:type="extended" />
  <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/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" />
  </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-20130930.xsd#nmih_MortgageInsuranceRiskinForce" xlink:label="loc_nmih_MortgageInsuranceRiskinForce_8e3bd63a-53d3-11e3-b035-22000a1e8102" xlink:type="locator" />
    <loc xlink:href="nmih-20130930.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-20130930.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-20130930.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-20130930.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" />
  </calculationLink>
  <calculationLink xlink:role="http://www.nationalmi.com/role/StatutoryInformationTables" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/StockCompensation" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/StockCompensationNarrativeDetails" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/StockCompensationRestrictedStockUnitsActivityDetails" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/StockCompensationRestrictedStockUnitsValuationAssumptionsDetails" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/StockCompensationStockOptionActivityDetails" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/StockCompensationStockOptionsValuationAssumptionsDetails" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/StockCompensationTables" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/SubsequentEvents" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/SubsequentEventsDetails" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/SummaryOfAccountingPolicies" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/SummaryOfAccountingPoliciesDetails" xlink:type="extended" />
  <calculationLink xlink:role="http://www.nationalmi.com/role/SummaryOfAccountingPoliciesPolicies" xlink:type="extended" />
</linkbase>
