<?xml version="1.0" encoding="UTF-8"?>

<!--XBRL Document Created with Wdesk from Workiva-->
<!--Copyright 2022 Workiva-->
<!--r:32106e4e-6ee2-4a32-a814-69adfc7731cf,g:1e98d1f0-0836-478a-9731-572687ec837f-->
<link:linkbase xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd">
  <link:roleRef roleURI="http://www.ngmbio.com/role/CONDENSEDCONSOLIDATEDBALANCESHEETS" xlink:type="simple" xlink:href="ngm-20220630.xsd#CONDENSEDCONSOLIDATEDBALANCESHEETS"/>
  <link:calculationLink xlink:role="http://www.ngmbio.com/role/CONDENSEDCONSOLIDATEDBALANCESHEETS" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_e04784f1-c398-4a9c-a0c8-77da11e56c74" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AssetsCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_1366eb20-7bd4-4ef2-9942-3da43cb33541" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_e04784f1-c398-4a9c-a0c8-77da11e56c74" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_1366eb20-7bd4-4ef2-9942-3da43cb33541" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermInvestments_4a45b328-91ac-4338-98e7-35092990431c" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ShortTermInvestments"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_e04784f1-c398-4a9c-a0c8-77da11e56c74" xlink:to="loc_us-gaap_ShortTermInvestments_4a45b328-91ac-4338-98e7-35092990431c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_26e028df-d3f7-4ddf-a7e9-257fa6d733fd" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PrepaidExpenseAndOtherAssetsCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_e04784f1-c398-4a9c-a0c8-77da11e56c74" xlink:to="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_26e028df-d3f7-4ddf-a7e9-257fa6d733fd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DueFromRelatedPartiesCurrent_fc733feb-02fb-4de7-97ed-4c7404a5cb00" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DueFromRelatedPartiesCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_e04784f1-c398-4a9c-a0c8-77da11e56c74" xlink:to="loc_us-gaap_DueFromRelatedPartiesCurrent_fc733feb-02fb-4de7-97ed-4c7404a5cb00" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_f919ccbc-f13c-423f-8925-352b13008a8a" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_1b8758ea-1882-4e5d-b7a2-85f0cad37bec" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_Liabilities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_f919ccbc-f13c-423f-8925-352b13008a8a" xlink:to="loc_us-gaap_Liabilities_1b8758ea-1882-4e5d-b7a2-85f0cad37bec" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommitmentsAndContingencies_5c7162a8-28ee-4ec0-b2cd-66c548a129b3" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_CommitmentsAndContingencies"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_f919ccbc-f13c-423f-8925-352b13008a8a" xlink:to="loc_us-gaap_CommitmentsAndContingencies_5c7162a8-28ee-4ec0-b2cd-66c548a129b3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_725c0726-bd6a-4dbd-b2c7-144c1440407c" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_StockholdersEquity"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_f919ccbc-f13c-423f-8925-352b13008a8a" xlink:to="loc_us-gaap_StockholdersEquity_725c0726-bd6a-4dbd-b2c7-144c1440407c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_91207489-1084-46f8-bc08-06fbf52d43c7" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_Assets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_2ff93e4b-5bf7-4251-a1e9-3483becc56dc" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AssetsCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_91207489-1084-46f8-bc08-06fbf52d43c7" xlink:to="loc_us-gaap_AssetsCurrent_2ff93e4b-5bf7-4251-a1e9-3483becc56dc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_398b1149-9198-4dd8-bd38-b8701e41cd4c" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_91207489-1084-46f8-bc08-06fbf52d43c7" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_398b1149-9198-4dd8-bd38-b8701e41cd4c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedCashNoncurrent_e287edf3-128c-4534-94ad-fd6ea0b4c40c" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_RestrictedCashNoncurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_91207489-1084-46f8-bc08-06fbf52d43c7" xlink:to="loc_us-gaap_RestrictedCashNoncurrent_e287edf3-128c-4534-94ad-fd6ea0b4c40c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_54b51cdb-4250-4f21-a78b-7f1e2fa146e5" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherAssetsNoncurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_91207489-1084-46f8-bc08-06fbf52d43c7" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_54b51cdb-4250-4f21-a78b-7f1e2fa146e5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_99023625-df6f-4017-aa9d-bb0d970b74f5" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OperatingLeaseRightOfUseAsset"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_91207489-1084-46f8-bc08-06fbf52d43c7" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_99023625-df6f-4017-aa9d-bb0d970b74f5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_cf37a0db-5a04-4b63-bb47-ef6c0a1b2e21" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_Liabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_deba1108-6c09-4572-91ff-9f8446cc3c0c" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LiabilitiesCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_cf37a0db-5a04-4b63-bb47-ef6c0a1b2e21" xlink:to="loc_us-gaap_LiabilitiesCurrent_deba1108-6c09-4572-91ff-9f8446cc3c0c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_46829d0b-4d06-448d-9f2c-b6f0665b95fc" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OperatingLeaseLiabilityNoncurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_cf37a0db-5a04-4b63-bb47-ef6c0a1b2e21" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_46829d0b-4d06-448d-9f2c-b6f0665b95fc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_5f820af0-fb33-4a0b-95e5-8f5bc6d70b29" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_StockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockValue_c59ca949-0552-4e99-bacb-dd6c9961f6ae" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PreferredStockValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_5f820af0-fb33-4a0b-95e5-8f5bc6d70b29" xlink:to="loc_us-gaap_PreferredStockValue_c59ca949-0552-4e99-bacb-dd6c9961f6ae" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValue_856c9be1-8701-49d1-a4cd-06c8551aebff" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_CommonStockValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_5f820af0-fb33-4a0b-95e5-8f5bc6d70b29" xlink:to="loc_us-gaap_CommonStockValue_856c9be1-8701-49d1-a4cd-06c8551aebff" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapitalCommonStock_85144bce-3d1f-430c-9674-d09a9ad7608b" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AdditionalPaidInCapitalCommonStock"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_5f820af0-fb33-4a0b-95e5-8f5bc6d70b29" xlink:to="loc_us-gaap_AdditionalPaidInCapitalCommonStock_85144bce-3d1f-430c-9674-d09a9ad7608b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_482202f0-6cd1-44bc-ae6c-beb2e458e66b" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_5f820af0-fb33-4a0b-95e5-8f5bc6d70b29" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_482202f0-6cd1-44bc-ae6c-beb2e458e66b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_dc63656a-ece9-49c2-b12c-3aa57587e1c9" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_5f820af0-fb33-4a0b-95e5-8f5bc6d70b29" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_dc63656a-ece9-49c2-b12c-3aa57587e1c9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_5835992c-8f8e-40f0-9ec0-516365263c60" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LiabilitiesCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_39be1cf4-da7e-40a9-9381-5128d1b96516" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_5835992c-8f8e-40f0-9ec0-516365263c60" xlink:to="loc_us-gaap_AccruedLiabilitiesCurrent_39be1cf4-da7e-40a9-9381-5128d1b96516" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerLiabilityCurrent_90f5a6b0-d411-4085-95a1-45394cd5b8ed" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ContractWithCustomerLiabilityCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_5835992c-8f8e-40f0-9ec0-516365263c60" xlink:to="loc_us-gaap_ContractWithCustomerLiabilityCurrent_90f5a6b0-d411-4085-95a1-45394cd5b8ed" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableCurrent_36f39c0a-3b91-4e32-a4e5-43556e4eaf27" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AccountsPayableCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_5835992c-8f8e-40f0-9ec0-516365263c60" xlink:to="loc_us-gaap_AccountsPayableCurrent_36f39c0a-3b91-4e32-a4e5-43556e4eaf27" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_7d9135a4-592f-4d3a-99d1-87a9f4a03597" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OperatingLeaseLiabilityCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_5835992c-8f8e-40f0-9ec0-516365263c60" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_7d9135a4-592f-4d3a-99d1-87a9f4a03597" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.ngmbio.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONS" xlink:type="simple" xlink:href="ngm-20220630.xsd#CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONS"/>
  <link:calculationLink xlink:role="http://www.ngmbio.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONS" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_2f0892c0-2bf8-4d8b-ba8a-48da27f47662" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_2c0343ba-d1e1-4552-bef4-cc1eff517bdc" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_2f0892c0-2bf8-4d8b-ba8a-48da27f47662" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_2c0343ba-d1e1-4552-bef4-cc1eff517bdc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingExpenses_b4e7fbca-0bea-4afa-815f-35988618d13f" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OperatingExpenses"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_2f0892c0-2bf8-4d8b-ba8a-48da27f47662" xlink:to="loc_us-gaap_OperatingExpenses_b4e7fbca-0bea-4afa-815f-35988618d13f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingExpenses_5a3fac72-198a-407c-81ad-bad5b079e0d5" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OperatingExpenses"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ResearchAndDevelopmentExpense_ed71a094-dc91-42f3-aac7-0f7def662252" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ResearchAndDevelopmentExpense"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingExpenses_5a3fac72-198a-407c-81ad-bad5b079e0d5" xlink:to="loc_us-gaap_ResearchAndDevelopmentExpense_ed71a094-dc91-42f3-aac7-0f7def662252" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GeneralAndAdministrativeExpense_bf1a9278-8bf0-415b-b306-912df9317cd9" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_GeneralAndAdministrativeExpense"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingExpenses_5a3fac72-198a-407c-81ad-bad5b079e0d5" xlink:to="loc_us-gaap_GeneralAndAdministrativeExpense_bf1a9278-8bf0-415b-b306-912df9317cd9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_8a6493b2-e31b-47db-a459-7f2e52adebc3" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_NetIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_f1ad6d49-84e0-41d3-bb44-10b3eee6dd73" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_8a6493b2-e31b-47db-a459-7f2e52adebc3" xlink:to="loc_us-gaap_OperatingIncomeLoss_f1ad6d49-84e0-41d3-bb44-10b3eee6dd73" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_ffa8b8cb-741d-4d4e-bbff-af6b66b6ac87" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_InterestIncomeExpenseNonoperatingNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_8a6493b2-e31b-47db-a459-7f2e52adebc3" xlink:to="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_ffa8b8cb-741d-4d4e-bbff-af6b66b6ac87" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_660b1a14-5221-4eab-ac40-0775f31ca44d" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_8a6493b2-e31b-47db-a459-7f2e52adebc3" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_660b1a14-5221-4eab-ac40-0775f31ca44d" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.ngmbio.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCOMPREHENSIVELOSS" xlink:type="simple" xlink:href="ngm-20220630.xsd#CONDENSEDCONSOLIDATEDSTATEMENTSOFCOMPREHENSIVELOSS"/>
  <link:calculationLink xlink:role="http://www.ngmbio.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCOMPREHENSIVELOSS" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_d428b557-a448-4b1a-895e-242a2a4652db" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ComprehensiveIncomeNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_df56321c-a66a-4aed-a955-1fd694d91d65" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_d428b557-a448-4b1a-895e-242a2a4652db" xlink:to="loc_us-gaap_NetIncomeLoss_df56321c-a66a-4aed-a955-1fd694d91d65" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossAvailableForSaleSecuritiesAdjustmentNetOfTax_0a5452da-f99d-42cc-be39-95ccb3d490ea" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherComprehensiveIncomeLossAvailableForSaleSecuritiesAdjustmentNetOfTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_d428b557-a448-4b1a-895e-242a2a4652db" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossAvailableForSaleSecuritiesAdjustmentNetOfTax_0a5452da-f99d-42cc-be39-95ccb3d490ea" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.ngmbio.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWS" xlink:type="simple" xlink:href="ngm-20220630.xsd#CONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWS"/>
  <link:calculationLink xlink:role="http://www.ngmbio.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWS" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_f3588c92-23b3-4c5d-9c18-b9d3db1c86e0" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Depreciation_f948fcde-3323-4e7f-9a7f-362e91a7500e" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_Depreciation"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_f3588c92-23b3-4c5d-9c18-b9d3db1c86e0" xlink:to="loc_us-gaap_Depreciation_f948fcde-3323-4e7f-9a7f-362e91a7500e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAssetAmortizationExpense_866c0ecc-cd74-45ac-b26d-bab3cc4aae7e" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OperatingLeaseRightOfUseAssetAmortizationExpense"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_f3588c92-23b3-4c5d-9c18-b9d3db1c86e0" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAssetAmortizationExpense_866c0ecc-cd74-45ac-b26d-bab3cc4aae7e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_ngm_IncreaseDecreaseInDueFromRelatedPartiesContractAssetsNoncash_caa4bb79-1c18-4759-8168-89b709311a16" xlink:href="ngm-20220630.xsd#ngm_IncreaseDecreaseInDueFromRelatedPartiesContractAssetsNoncash"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_f3588c92-23b3-4c5d-9c18-b9d3db1c86e0" xlink:to="loc_ngm_IncreaseDecreaseInDueFromRelatedPartiesContractAssetsNoncash_caa4bb79-1c18-4759-8168-89b709311a16" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInContractWithCustomerLiability_9593ccbe-8c37-43fb-834d-b8b14344cfb1" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncreaseDecreaseInContractWithCustomerLiability"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_f3588c92-23b3-4c5d-9c18-b9d3db1c86e0" xlink:to="loc_us-gaap_IncreaseDecreaseInContractWithCustomerLiability_9593ccbe-8c37-43fb-834d-b8b14344cfb1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOperatingLeaseLiability_8b5334fd-6ce1-416a-acd2-79f491797270" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncreaseDecreaseInOperatingLeaseLiability"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_f3588c92-23b3-4c5d-9c18-b9d3db1c86e0" xlink:to="loc_us-gaap_IncreaseDecreaseInOperatingLeaseLiability_8b5334fd-6ce1-416a-acd2-79f491797270" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfitLoss_5408e643-c7c1-40bd-84e8-a57af6f23123" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ProfitLoss"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_f3588c92-23b3-4c5d-9c18-b9d3db1c86e0" xlink:to="loc_us-gaap_ProfitLoss_5408e643-c7c1-40bd-84e8-a57af6f23123" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayable_dc09e923-7f64-47cf-bd71-05b9d8674139" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncreaseDecreaseInAccountsPayable"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_f3588c92-23b3-4c5d-9c18-b9d3db1c86e0" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayable_dc09e923-7f64-47cf-bd71-05b9d8674139" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNoncashIncomeExpense_285115d0-094c-4d0c-a673-4a5b29ecfed3" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherNoncashIncomeExpense"/>
    <link:calculationArc order="8" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_f3588c92-23b3-4c5d-9c18-b9d3db1c86e0" xlink:to="loc_us-gaap_OtherNoncashIncomeExpense_285115d0-094c-4d0c-a673-4a5b29ecfed3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedLiabilitiesAndOtherOperatingLiabilities_87b81a87-0752-4e25-ae57-5617242a6adf" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncreaseDecreaseInAccruedLiabilitiesAndOtherOperatingLiabilities"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_f3588c92-23b3-4c5d-9c18-b9d3db1c86e0" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedLiabilitiesAndOtherOperatingLiabilities_87b81a87-0752-4e25-ae57-5617242a6adf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensation_39b3e771-117e-4282-847d-65d80c48a3b0" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ShareBasedCompensation"/>
    <link:calculationArc order="10" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_f3588c92-23b3-4c5d-9c18-b9d3db1c86e0" xlink:to="loc_us-gaap_ShareBasedCompensation_39b3e771-117e-4282-847d-65d80c48a3b0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInContractWithCustomerAsset_a25ca03e-84b4-4b86-97b5-ca25e7dc7303" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncreaseDecreaseInContractWithCustomerAsset"/>
    <link:calculationArc order="11" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_f3588c92-23b3-4c5d-9c18-b9d3db1c86e0" xlink:to="loc_us-gaap_IncreaseDecreaseInContractWithCustomerAsset_a25ca03e-84b4-4b86-97b5-ca25e7dc7303" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsReceivableRelatedParties_94e4baec-b92f-4df2-b172-ffb1b59fe9de" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncreaseDecreaseInAccountsReceivableRelatedParties"/>
    <link:calculationArc order="12" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_f3588c92-23b3-4c5d-9c18-b9d3db1c86e0" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsReceivableRelatedParties_94e4baec-b92f-4df2-b172-ffb1b59fe9de" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_835a85a2-3789-4753-92b0-14769fd0bcc8" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets"/>
    <link:calculationArc order="13" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_f3588c92-23b3-4c5d-9c18-b9d3db1c86e0" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_835a85a2-3789-4753-92b0-14769fd0bcc8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments_993d1afb-2d0d-4e31-b70c-b151242478e7" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments"/>
    <link:calculationArc order="14" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_f3588c92-23b3-4c5d-9c18-b9d3db1c86e0" xlink:to="loc_us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments_993d1afb-2d0d-4e31-b70c-b151242478e7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_4dcbd43d-3c10-4de8-ac38-ed013b01559e" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireMarketableSecurities_aa50f479-8457-4fbe-8597-dfdc8e35d3a2" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PaymentsToAcquireMarketableSecurities"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_4dcbd43d-3c10-4de8-ac38-ed013b01559e" xlink:to="loc_us-gaap_PaymentsToAcquireMarketableSecurities_aa50f479-8457-4fbe-8597-dfdc8e35d3a2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleAndMaturityOfMarketableSecurities_9b466f56-b59f-44a7-8592-3a6b20235b10" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ProceedsFromSaleAndMaturityOfMarketableSecurities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_4dcbd43d-3c10-4de8-ac38-ed013b01559e" xlink:to="loc_us-gaap_ProceedsFromSaleAndMaturityOfMarketableSecurities_9b466f56-b59f-44a7-8592-3a6b20235b10" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireMachineryAndEquipment_3f1c85f5-cf8e-4630-af8a-9a24e22f237f" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PaymentsToAcquireMachineryAndEquipment"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_4dcbd43d-3c10-4de8-ac38-ed013b01559e" xlink:to="loc_us-gaap_PaymentsToAcquireMachineryAndEquipment_3f1c85f5-cf8e-4630-af8a-9a24e22f237f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_a7401201-e5ff-4df9-9a20-dbba0938d9a5" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_44351b6d-bf42-47d7-a762-bdba0eb37145" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_a7401201-e5ff-4df9-9a20-dbba0938d9a5" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_44351b6d-bf42-47d7-a762-bdba0eb37145" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_307723c7-ae36-4667-beab-38a2eec69abe" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_a7401201-e5ff-4df9-9a20-dbba0938d9a5" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_307723c7-ae36-4667-beab-38a2eec69abe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_df60c596-767a-434c-937e-2a90ec602aa5" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_a7401201-e5ff-4df9-9a20-dbba0938d9a5" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_df60c596-767a-434c-937e-2a90ec602aa5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c519649f-fd90-41df-affb-2caaf601fcbb" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromStockOptionsExercised_219bf3b1-fdf9-4e80-b5a9-0c21f414143a" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ProceedsFromStockOptionsExercised"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c519649f-fd90-41df-affb-2caaf601fcbb" xlink:to="loc_us-gaap_ProceedsFromStockOptionsExercised_219bf3b1-fdf9-4e80-b5a9-0c21f414143a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_d992e81b-0f67-4375-9f9b-def520a87d9b" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ProceedsFromIssuanceOfCommonStock"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c519649f-fd90-41df-affb-2caaf601fcbb" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_d992e81b-0f67-4375-9f9b-def520a87d9b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_ngm_ProceedsFromIssuanceOpenMarketAgreement_6081c4de-a3a9-45b9-aa15-2fba1382a58d" xlink:href="ngm-20220630.xsd#ngm_ProceedsFromIssuanceOpenMarketAgreement"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c519649f-fd90-41df-affb-2caaf601fcbb" xlink:to="loc_ngm_ProceedsFromIssuanceOpenMarketAgreement_6081c4de-a3a9-45b9-aa15-2fba1382a58d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlans_1e71fd6f-7977-4c34-97a7-4ea7a8da9169" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlans"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c519649f-fd90-41df-affb-2caaf601fcbb" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlans_1e71fd6f-7977-4c34-97a7-4ea7a8da9169" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.ngmbio.com/role/FairValueMeasurementsSummaryofCashandCashEquivalentsandMarketableSecuritiesClassifiedasAvailableforsaleSecuritiesDetails" xlink:type="simple" xlink:href="ngm-20220630.xsd#FairValueMeasurementsSummaryofCashandCashEquivalentsandMarketableSecuritiesClassifiedasAvailableforsaleSecuritiesDetails"/>
  <link:calculationLink xlink:role="http://www.ngmbio.com/role/FairValueMeasurementsSummaryofCashandCashEquivalentsandMarketableSecuritiesClassifiedasAvailableforsaleSecuritiesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_7044c8d5-8eeb-463a-aca7-17f1c2b9acc1" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_cdfcbfbc-5a8e-40ac-a68d-a338db17bb85" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_7044c8d5-8eeb-463a-aca7-17f1c2b9acc1" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_cdfcbfbc-5a8e-40ac-a68d-a338db17bb85" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_5a3c79ae-48aa-4500-a4eb-c13542ee227b" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_7044c8d5-8eeb-463a-aca7-17f1c2b9acc1" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_5a3c79ae-48aa-4500-a4eb-c13542ee227b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_5f65baef-8391-4a6d-8f9d-d1b7257c7e54" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_7044c8d5-8eeb-463a-aca7-17f1c2b9acc1" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_5f65baef-8391-4a6d-8f9d-d1b7257c7e54" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.ngmbio.com/role/BalanceSheetComponentsScheduleofReconciliationofCashCashEquivalentandRestrictedCashDetails" xlink:type="simple" xlink:href="ngm-20220630.xsd#BalanceSheetComponentsScheduleofReconciliationofCashCashEquivalentandRestrictedCashDetails"/>
  <link:calculationLink xlink:role="http://www.ngmbio.com/role/BalanceSheetComponentsScheduleofReconciliationofCashCashEquivalentandRestrictedCashDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_988d68b3-0b8d-4ef4-b178-0713e64319b4" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_b6c6eef1-9d10-4a7a-b39f-71ccb55be111" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_988d68b3-0b8d-4ef4-b178-0713e64319b4" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_b6c6eef1-9d10-4a7a-b39f-71ccb55be111" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedCashNoncurrent_aafd23e2-8d10-4b98-9cb4-d4af4d90b6cd" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_RestrictedCashNoncurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_988d68b3-0b8d-4ef4-b178-0713e64319b4" xlink:to="loc_us-gaap_RestrictedCashNoncurrent_aafd23e2-8d10-4b98-9cb4-d4af4d90b6cd" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.ngmbio.com/role/BalanceSheetComponentsScheduleofPropertyandEquipmentDetails" xlink:type="simple" xlink:href="ngm-20220630.xsd#BalanceSheetComponentsScheduleofPropertyandEquipmentDetails"/>
  <link:calculationLink xlink:role="http://www.ngmbio.com/role/BalanceSheetComponentsScheduleofPropertyandEquipmentDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_a05f552c-8031-4dc8-a1a6-61202a92ccac" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_af4108ad-df92-4d7a-af96-d48786e32a62" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PropertyPlantAndEquipmentGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentNet_a05f552c-8031-4dc8-a1a6-61202a92ccac" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentGross_af4108ad-df92-4d7a-af96-d48786e32a62" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_a5601b13-2f7f-41cc-9b5f-9648b98a8dfc" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentNet_a05f552c-8031-4dc8-a1a6-61202a92ccac" xlink:to="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_a5601b13-2f7f-41cc-9b5f-9648b98a8dfc" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.ngmbio.com/role/BalanceSheetComponentsScheduleofAccruedLiabilitiesDetails" xlink:type="simple" xlink:href="ngm-20220630.xsd#BalanceSheetComponentsScheduleofAccruedLiabilitiesDetails"/>
  <link:calculationLink xlink:role="http://www.ngmbio.com/role/BalanceSheetComponentsScheduleofAccruedLiabilitiesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrentAndNoncurrent_fa5769dd-e4d8-4e6d-8bb8-001fa8f242db" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AccruedLiabilitiesCurrentAndNoncurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_ngm_AccruedManufacturingCosts_fa73ce11-eb59-401c-b617-ae8c3003f5f5" xlink:href="ngm-20220630.xsd#ngm_AccruedManufacturingCosts"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrentAndNoncurrent_fa5769dd-e4d8-4e6d-8bb8-001fa8f242db" xlink:to="loc_ngm_AccruedManufacturingCosts_fa73ce11-eb59-401c-b617-ae8c3003f5f5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAccruedLiabilitiesCurrent_09ca5f32-bb6d-4bdd-b053-348bdf99f27a" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherAccruedLiabilitiesCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrentAndNoncurrent_fa5769dd-e4d8-4e6d-8bb8-001fa8f242db" xlink:to="loc_us-gaap_OtherAccruedLiabilitiesCurrent_09ca5f32-bb6d-4bdd-b053-348bdf99f27a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_ngm_AccruedClinicalTrialsAndResearchAndDevelopmentCostsCurrent_32ea1a88-ce88-41ab-803c-92abc29d4f8f" xlink:href="ngm-20220630.xsd#ngm_AccruedClinicalTrialsAndResearchAndDevelopmentCostsCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrentAndNoncurrent_fa5769dd-e4d8-4e6d-8bb8-001fa8f242db" xlink:to="loc_ngm_AccruedClinicalTrialsAndResearchAndDevelopmentCostsCurrent_32ea1a88-ce88-41ab-803c-92abc29d4f8f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_d72fe3c7-04ff-4a1e-a7ad-ba9b94409712" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_EmployeeRelatedLiabilitiesCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrentAndNoncurrent_fa5769dd-e4d8-4e6d-8bb8-001fa8f242db" xlink:to="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_d72fe3c7-04ff-4a1e-a7ad-ba9b94409712" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.ngmbio.com/role/CommitmentsandContingenciesComponentsofLeaseCostsDetails" xlink:type="simple" xlink:href="ngm-20220630.xsd#CommitmentsandContingenciesComponentsofLeaseCostsDetails"/>
  <link:calculationLink xlink:role="http://www.ngmbio.com/role/CommitmentsandContingenciesComponentsofLeaseCostsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LeaseCost_874948e7-47a9-4e29-a6ca-55d273abb5e0" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LeaseCost"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseCost_498a9ad7-4331-4fe8-87d6-139d29db63a7" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OperatingLeaseCost"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LeaseCost_874948e7-47a9-4e29-a6ca-55d273abb5e0" xlink:to="loc_us-gaap_OperatingLeaseCost_498a9ad7-4331-4fe8-87d6-139d29db63a7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_VariableLeaseCost_6f8d3f49-142b-45e8-9ebf-887e8e04ff7e" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_VariableLeaseCost"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LeaseCost_874948e7-47a9-4e29-a6ca-55d273abb5e0" xlink:to="loc_us-gaap_VariableLeaseCost_6f8d3f49-142b-45e8-9ebf-887e8e04ff7e" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.ngmbio.com/role/CommitmentsandContingenciesOperatingLeaseLiabilityMaturityDetails" xlink:type="simple" xlink:href="ngm-20220630.xsd#CommitmentsandContingenciesOperatingLeaseLiabilityMaturityDetails"/>
  <link:calculationLink xlink:role="http://www.ngmbio.com/role/CommitmentsandContingenciesOperatingLeaseLiabilityMaturityDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_77f604bf-60aa-4d19-ab4a-035728591ffd" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_8034b04d-46ba-4469-90d2-1deaf3b12bcc" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_77f604bf-60aa-4d19-ab4a-035728591ffd" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_8034b04d-46ba-4469-90d2-1deaf3b12bcc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear_b3d60b54-3d0c-44bf-8e6c-45b147bff156" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_77f604bf-60aa-4d19-ab4a-035728591ffd" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear_b3d60b54-3d0c-44bf-8e6c-45b147bff156" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.ngmbio.com/role/CommitmentsandContingenciesOperatingLeaseLiabilityMaturityDetails_1" xlink:type="simple" xlink:href="ngm-20220630.xsd#CommitmentsandContingenciesOperatingLeaseLiabilityMaturityDetails_1"/>
  <link:calculationLink xlink:role="http://www.ngmbio.com/role/CommitmentsandContingenciesOperatingLeaseLiabilityMaturityDetails_1" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_eac755c0-2c74-4925-9cc4-26e8f94e5d2b" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount_687d8f2b-7d5b-470a-a493-ea9024d8612c" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_eac755c0-2c74-4925-9cc4-26e8f94e5d2b" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount_687d8f2b-7d5b-470a-a493-ea9024d8612c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiability_b8d33189-dbd2-4da8-bd2e-661497c00e55" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OperatingLeaseLiability"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_eac755c0-2c74-4925-9cc4-26e8f94e5d2b" xlink:to="loc_us-gaap_OperatingLeaseLiability_b8d33189-dbd2-4da8-bd2e-661497c00e55" xlink:type="arc"/>
  </link:calculationLink>
</link:linkbase>
