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

<!--XBRL Document Created with Wdesk from Workiva-->
<!--Copyright 2022 Workiva-->
<!--r:9a42c90f-1f2c-4255-874b-46c5c1bc9b83,g:47439a38-1ffc-44c5-b2f0-e902fcc31613-->
<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.cognex.com/role/ConsolidatedStatementsofOperations" xlink:type="simple" xlink:href="cgnx-20221002.xsd#ConsolidatedStatementsofOperations"/>
  <link:calculationLink xlink:role="http://www.cognex.com/role/ConsolidatedStatementsofOperations" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_c6e7d733-8439-43cf-b932-e4fc19468110" 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_LossFromCatastrophes_1470fee7-6db3-4eb6-b3bb-133f516613f9" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LossFromCatastrophes"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_c6e7d733-8439-43cf-b932-e4fc19468110" xlink:to="loc_us-gaap_LossFromCatastrophes_1470fee7-6db3-4eb6-b3bb-133f516613f9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ResearchAndDevelopmentExpense_a9f18bcd-109e-422a-bead-68425f666a3b" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ResearchAndDevelopmentExpense"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_c6e7d733-8439-43cf-b932-e4fc19468110" xlink:to="loc_us-gaap_ResearchAndDevelopmentExpense_a9f18bcd-109e-422a-bead-68425f666a3b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossProfit_4cc095ac-f5f4-49d4-9440-7f26c1b846b8" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_GrossProfit"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_c6e7d733-8439-43cf-b932-e4fc19468110" xlink:to="loc_us-gaap_GrossProfit_4cc095ac-f5f4-49d4-9440-7f26c1b846b8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_4025f07b-bb7b-4e05-8dc5-56c67c464d82" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_SellingGeneralAndAdministrativeExpense"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_c6e7d733-8439-43cf-b932-e4fc19468110" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_4025f07b-bb7b-4e05-8dc5-56c67c464d82" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_266b3ca3-8dfc-44cf-a111-aac76d454b5d" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_150c1187-38a4-471f-b425-12ed46d839b0" 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_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_266b3ca3-8dfc-44cf-a111-aac76d454b5d" xlink:to="loc_us-gaap_OperatingIncomeLoss_150c1187-38a4-471f-b425-12ed46d839b0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ForeignCurrencyTransactionGainLossBeforeTax_a33cf6a8-c691-4e3a-ad08-421cab75743b" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ForeignCurrencyTransactionGainLossBeforeTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_266b3ca3-8dfc-44cf-a111-aac76d454b5d" xlink:to="loc_us-gaap_ForeignCurrencyTransactionGainLossBeforeTax_a33cf6a8-c691-4e3a-ad08-421cab75743b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeNonoperating_14276093-4470-4f9f-80d9-aea19e572cc3" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_InvestmentIncomeNonoperating"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_266b3ca3-8dfc-44cf-a111-aac76d454b5d" xlink:to="loc_us-gaap_InvestmentIncomeNonoperating_14276093-4470-4f9f-80d9-aea19e572cc3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_0ec962d6-42f9-4d36-a780-4a3d09816fe4" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_266b3ca3-8dfc-44cf-a111-aac76d454b5d" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_0ec962d6-42f9-4d36-a780-4a3d09816fe4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossProfit_ae2bcb48-d0ef-4c58-ab2c-4d8e96a675f3" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_GrossProfit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_90b7b939-27ff-4a86-a82f-f6fd0f658987" 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_GrossProfit_ae2bcb48-d0ef-4c58-ab2c-4d8e96a675f3" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_90b7b939-27ff-4a86-a82f-f6fd0f658987" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfGoodsAndServicesSold_f51f7f92-321d-4ea8-8b50-6f11df9ac192" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_CostOfGoodsAndServicesSold"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GrossProfit_ae2bcb48-d0ef-4c58-ab2c-4d8e96a675f3" xlink:to="loc_us-gaap_CostOfGoodsAndServicesSold_f51f7f92-321d-4ea8-8b50-6f11df9ac192" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_e42c74f1-95a8-4139-8d80-589737fbfb65" 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_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_a03f0c27-3279-4a47-838e-9d227d7b2d27" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_e42c74f1-95a8-4139-8d80-589737fbfb65" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_a03f0c27-3279-4a47-838e-9d227d7b2d27" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_9025a449-9a57-4a33-bcd2-4fc7d7900b3d" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_e42c74f1-95a8-4139-8d80-589737fbfb65" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_9025a449-9a57-4a33-bcd2-4fc7d7900b3d" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/ConsolidatedStatementsofComprehensiveIncome" xlink:type="simple" xlink:href="cgnx-20221002.xsd#ConsolidatedStatementsofComprehensiveIncome"/>
  <link:calculationLink xlink:role="http://www.cognex.com/role/ConsolidatedStatementsofComprehensiveIncome" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_b8f4d086-04ec-4b86-a5c4-d13b8c2326f1" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeForeignCurrencyTransactionAndTranslationAdjustmentNetOfTaxPortionAttributableToParent_a57888a1-647e-42d0-a635-50879c17abff" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherComprehensiveIncomeForeignCurrencyTransactionAndTranslationAdjustmentNetOfTaxPortionAttributableToParent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_b8f4d086-04ec-4b86-a5c4-d13b8c2326f1" xlink:to="loc_us-gaap_OtherComprehensiveIncomeForeignCurrencyTransactionAndTranslationAdjustmentNetOfTaxPortionAttributableToParent_a57888a1-647e-42d0-a635-50879c17abff" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent_0524d5e2-938c-4cd2-a9eb-172e89ff61ee" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_b8f4d086-04ec-4b86-a5c4-d13b8c2326f1" xlink:to="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent_0524d5e2-938c-4cd2-a9eb-172e89ff61ee" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_686481c9-dac2-41e3-b1e0-4c46cd653601" 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_a317b911-e346-4e32-935a-a68a397e341c" 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_686481c9-dac2-41e3-b1e0-4c46cd653601" xlink:to="loc_us-gaap_NetIncomeLoss_a317b911-e346-4e32-935a-a68a397e341c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_41fc3bb5-464a-4f5a-941e-882f33a8c0e0" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_686481c9-dac2-41e3-b1e0-4c46cd653601" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_41fc3bb5-464a-4f5a-941e-882f33a8c0e0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent_a672e3e4-6517-4a99-a21d-291fc506039f" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax_7e1b8948-5c08-4e4f-953f-5396cc194812" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent_a672e3e4-6517-4a99-a21d-291fc506039f" xlink:to="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax_7e1b8948-5c08-4e4f-953f-5396cc194812" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax_91e6b219-3c72-426a-85d4-2b5a50cec46a" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent_a672e3e4-6517-4a99-a21d-291fc506039f" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax_91e6b219-3c72-426a-85d4-2b5a50cec46a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeForeignCurrencyTransactionAndTranslationAdjustmentNetOfTaxPortionAttributableToParent_fadd9288-4864-411e-b39d-855079f3a4c7" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherComprehensiveIncomeForeignCurrencyTransactionAndTranslationAdjustmentNetOfTaxPortionAttributableToParent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_0cdb5820-0e71-47d6-b85c-5ebd9aba6475" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeForeignCurrencyTransactionAndTranslationAdjustmentNetOfTaxPortionAttributableToParent_fadd9288-4864-411e-b39d-855079f3a4c7" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_0cdb5820-0e71-47d6-b85c-5ebd9aba6475" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/ConsolidatedBalanceSheets" xlink:type="simple" xlink:href="cgnx-20221002.xsd#ConsolidatedBalanceSheets"/>
  <link:calculationLink xlink:role="http://www.cognex.com/role/ConsolidatedBalanceSheets" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_6b0ee0b5-75d6-4ef6-ac57-f143e5b2bb19" 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_198785e9-579b-4da8-8078-91f509f48c8c" 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_6b0ee0b5-75d6-4ef6-ac57-f143e5b2bb19" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_198785e9-579b-4da8-8078-91f509f48c8c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecuritiesCurrent_0b3b5bcf-23a5-40c3-9ecb-afa0cab434c2" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecuritiesCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_6b0ee0b5-75d6-4ef6-ac57-f143e5b2bb19" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecuritiesCurrent_0b3b5bcf-23a5-40c3-9ecb-afa0cab434c2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsReceivableNetCurrent_64e1e65a-c54d-441e-b145-c99075c94822" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AccountsReceivableNetCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_6b0ee0b5-75d6-4ef6-ac57-f143e5b2bb19" xlink:to="loc_us-gaap_AccountsReceivableNetCurrent_64e1e65a-c54d-441e-b145-c99075c94822" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UnbilledReceivablesCurrent_91fd5f31-2807-48de-b22b-021d462977b6" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_UnbilledReceivablesCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_6b0ee0b5-75d6-4ef6-ac57-f143e5b2bb19" xlink:to="loc_us-gaap_UnbilledReceivablesCurrent_91fd5f31-2807-48de-b22b-021d462977b6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryNet_576f0ed9-9c26-4cfb-8080-eb3976518d50" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_InventoryNet"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_6b0ee0b5-75d6-4ef6-ac57-f143e5b2bb19" xlink:to="loc_us-gaap_InventoryNet_576f0ed9-9c26-4cfb-8080-eb3976518d50" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_aff648e8-629e-43e1-8e58-e44a6f8b7786" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PrepaidExpenseAndOtherAssetsCurrent"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_6b0ee0b5-75d6-4ef6-ac57-f143e5b2bb19" xlink:to="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_aff648e8-629e-43e1-8e58-e44a6f8b7786" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_90cdd4d2-06b3-4a42-8bdf-d114ea66af6d" 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_331b539d-711e-40df-9c36-74c53da4aa49" 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_90cdd4d2-06b3-4a42-8bdf-d114ea66af6d" xlink:to="loc_us-gaap_Liabilities_331b539d-711e-40df-9c36-74c53da4aa49" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_12ce825d-2159-4176-a5eb-2ced09ba3842" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_StockholdersEquity"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_90cdd4d2-06b3-4a42-8bdf-d114ea66af6d" xlink:to="loc_us-gaap_StockholdersEquity_12ce825d-2159-4176-a5eb-2ced09ba3842" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_d2b123e5-0db5-4936-9739-7d2a75107d49" 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_b2fc4519-f0e4-40d8-9968-ce8f8f2d1075" 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_d2b123e5-0db5-4936-9739-7d2a75107d49" xlink:to="loc_us-gaap_AssetsCurrent_b2fc4519-f0e4-40d8-9968-ce8f8f2d1075" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermInvestments_509b9f83-f57f-4881-a72a-fb35d72c4cd0" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LongTermInvestments"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_d2b123e5-0db5-4936-9739-7d2a75107d49" xlink:to="loc_us-gaap_LongTermInvestments_509b9f83-f57f-4881-a72a-fb35d72c4cd0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_e9884037-155c-4847-8f53-2d7a439f4d4c" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_d2b123e5-0db5-4936-9739-7d2a75107d49" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_e9884037-155c-4847-8f53-2d7a439f4d4c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_5a7dda29-66d1-4aa1-a1fe-a8454c295f0e" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OperatingLeaseRightOfUseAsset"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_d2b123e5-0db5-4936-9739-7d2a75107d49" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_5a7dda29-66d1-4aa1-a1fe-a8454c295f0e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_09962e61-8a7b-4ce4-a7b7-e9611889b529" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_Goodwill"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_d2b123e5-0db5-4936-9739-7d2a75107d49" xlink:to="loc_us-gaap_Goodwill_09962e61-8a7b-4ce4-a7b7-e9611889b529" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsNet_c889a8b4-4f72-45d7-ad2f-f6cc5f366b47" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FiniteLivedIntangibleAssetsNet"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_d2b123e5-0db5-4936-9739-7d2a75107d49" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsNet_c889a8b4-4f72-45d7-ad2f-f6cc5f366b47" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_8e71befd-9654-4da8-a6c2-d48b8d13fc02" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredIncomeTaxAssetsNet"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_d2b123e5-0db5-4936-9739-7d2a75107d49" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_8e71befd-9654-4da8-a6c2-d48b8d13fc02" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_395c1323-d20b-4543-83cc-2d4cf4cf6f11" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherAssetsNoncurrent"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_d2b123e5-0db5-4936-9739-7d2a75107d49" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_395c1323-d20b-4543-83cc-2d4cf4cf6f11" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_3aa19b9e-305e-4943-8c36-294c7f99c33b" 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_AdditionalPaidInCapitalCommonStock_5a0fe1d6-7e59-4f9e-a08e-65cc51fd1d7a" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AdditionalPaidInCapitalCommonStock"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_3aa19b9e-305e-4943-8c36-294c7f99c33b" xlink:to="loc_us-gaap_AdditionalPaidInCapitalCommonStock_5a0fe1d6-7e59-4f9e-a08e-65cc51fd1d7a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_a988418a-977a-40ce-92ac-241f39e2d2e4" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_3aa19b9e-305e-4943-8c36-294c7f99c33b" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_a988418a-977a-40ce-92ac-241f39e2d2e4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_bcbc401f-b7d6-4aa0-92bf-72e58fe69074" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_3aa19b9e-305e-4943-8c36-294c7f99c33b" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_bcbc401f-b7d6-4aa0-92bf-72e58fe69074" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockValueOutstanding_45169402-c3a5-4f8e-923f-95c899c80183" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PreferredStockValueOutstanding"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_3aa19b9e-305e-4943-8c36-294c7f99c33b" xlink:to="loc_us-gaap_PreferredStockValueOutstanding_45169402-c3a5-4f8e-923f-95c899c80183" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValueOutstanding_7263a8e5-7fab-403c-812a-f503228acb07" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_CommonStockValueOutstanding"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_3aa19b9e-305e-4943-8c36-294c7f99c33b" xlink:to="loc_us-gaap_CommonStockValueOutstanding_7263a8e5-7fab-403c-812a-f503228acb07" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_ce14f4d8-8db7-43f4-805e-b63c22a6fdb8" 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_AccountsPayableCurrent_910c6536-de82-4c86-9b77-00a15a8aa1d5" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AccountsPayableCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_ce14f4d8-8db7-43f4-805e-b63c22a6fdb8" xlink:to="loc_us-gaap_AccountsPayableCurrent_910c6536-de82-4c86-9b77-00a15a8aa1d5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_b9a5f628-df7e-43ce-910c-8e324d8cb2b3" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_ce14f4d8-8db7-43f4-805e-b63c22a6fdb8" xlink:to="loc_us-gaap_AccruedLiabilitiesCurrent_b9a5f628-df7e-43ce-910c-8e324d8cb2b3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedIncomeTaxesCurrent_f3593a10-07e6-4cf3-acc1-fb6e5540fd3b" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AccruedIncomeTaxesCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_ce14f4d8-8db7-43f4-805e-b63c22a6fdb8" xlink:to="loc_us-gaap_AccruedIncomeTaxesCurrent_f3593a10-07e6-4cf3-acc1-fb6e5540fd3b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerLiabilityCurrent_194c480a-8c8e-4cb0-8b3b-50efe6138d01" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ContractWithCustomerLiabilityCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_ce14f4d8-8db7-43f4-805e-b63c22a6fdb8" xlink:to="loc_us-gaap_ContractWithCustomerLiabilityCurrent_194c480a-8c8e-4cb0-8b3b-50efe6138d01" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_69783e9d-10eb-47d8-ba05-e17fd8ee9387" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OperatingLeaseLiabilityCurrent"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_ce14f4d8-8db7-43f4-805e-b63c22a6fdb8" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_69783e9d-10eb-47d8-ba05-e17fd8ee9387" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_9af0f1a6-c040-405a-bbfb-8d63e144c848" 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_6a642c57-861f-4f32-9e85-249358bbc803" 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_9af0f1a6-c040-405a-bbfb-8d63e144c848" xlink:to="loc_us-gaap_LiabilitiesCurrent_6a642c57-861f-4f32-9e85-249358bbc803" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_152bd064-59e8-4359-a523-74bcf2b2dad3" 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_9af0f1a6-c040-405a-bbfb-8d63e144c848" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_152bd064-59e8-4359-a523-74bcf2b2dad3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_61cff56e-f5eb-413b-87d8-05290787d7d3" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredIncomeTaxLiabilitiesNet"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_9af0f1a6-c040-405a-bbfb-8d63e144c848" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_61cff56e-f5eb-413b-87d8-05290787d7d3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilityForUncertainTaxPositionsNoncurrent_74a2593a-d744-4772-bdf0-c66f91f7fd3b" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LiabilityForUncertainTaxPositionsNoncurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_9af0f1a6-c040-405a-bbfb-8d63e144c848" xlink:to="loc_us-gaap_LiabilityForUncertainTaxPositionsNoncurrent_74a2593a-d744-4772-bdf0-c66f91f7fd3b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedIncomeTaxes_9bc84e81-420d-4537-a18b-972a077c1730" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AccruedIncomeTaxes"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_9af0f1a6-c040-405a-bbfb-8d63e144c848" xlink:to="loc_us-gaap_AccruedIncomeTaxes_9bc84e81-420d-4537-a18b-972a077c1730" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesNoncurrent_675de67a-7a6b-4d4e-adc0-ec265b5f2f0d" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherLiabilitiesNoncurrent"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_9af0f1a6-c040-405a-bbfb-8d63e144c848" xlink:to="loc_us-gaap_OtherLiabilitiesNoncurrent_675de67a-7a6b-4d4e-adc0-ec265b5f2f0d" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/ConsolidatedStatementsofCashFlows" xlink:type="simple" xlink:href="cgnx-20221002.xsd#ConsolidatedStatementsofCashFlows"/>
  <link:calculationLink xlink:role="http://www.cognex.com/role/ConsolidatedStatementsofCashFlows" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_6e1a03b6-4460-4d7b-a9aa-f2b490c7b727" 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_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlansIncludingStockOptions_f451e65c-34c2-42f2-814b-0109c797fa91" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlansIncludingStockOptions"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_6e1a03b6-4460-4d7b-a9aa-f2b490c7b727" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlansIncludingStockOptions_f451e65c-34c2-42f2-814b-0109c797fa91" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsOfDividendsCommonStock_5cae2444-09f9-458d-9807-f1b9061631f0" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PaymentsOfDividendsCommonStock"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_6e1a03b6-4460-4d7b-a9aa-f2b490c7b727" xlink:to="loc_us-gaap_PaymentsOfDividendsCommonStock_5cae2444-09f9-458d-9807-f1b9061631f0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_97c09ee3-fba7-41b8-86e4-4eba5e038084" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PaymentsForRepurchaseOfCommonStock"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_6e1a03b6-4460-4d7b-a9aa-f2b490c7b727" xlink:to="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_97c09ee3-fba7-41b8-86e4-4eba5e038084" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_a9a5421c-f8e6-46dd-beaa-48b68c9697f1" 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_7cdf7e6f-6ccd-4770-94c4-e53bf2ac89e1" 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_a9a5421c-f8e6-46dd-beaa-48b68c9697f1" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_7cdf7e6f-6ccd-4770-94c4-e53bf2ac89e1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_588c8b95-ea05-4637-be76-5cc80a756ccd" 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_a9a5421c-f8e6-46dd-beaa-48b68c9697f1" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_588c8b95-ea05-4637-be76-5cc80a756ccd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c7cee46c-2289-43f9-a6a6-199a94c357dd" 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_a9a5421c-f8e6-46dd-beaa-48b68c9697f1" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c7cee46c-2289-43f9-a6a6-199a94c357dd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_af8c9923-e681-43c3-98f3-c10e55af9c79" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_a9a5421c-f8e6-46dd-beaa-48b68c9697f1" xlink:to="loc_us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_af8c9923-e681-43c3-98f3-c10e55af9c79" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_64a2ed48-ed81-4d99-ad89-342926f73688" 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_GainLossOnDispositionOfAssets1_98b50320-7511-4eeb-bfe2-cd40b08efa9a" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_GainLossOnDispositionOfAssets1"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_64a2ed48-ed81-4d99-ad89-342926f73688" xlink:to="loc_us-gaap_GainLossOnDispositionOfAssets1_98b50320-7511-4eeb-bfe2-cd40b08efa9a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInContractWithCustomerLiability_f568f25b-ddb2-4c5f-a237-cde0629cc33c" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncreaseDecreaseInContractWithCustomerLiability"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_64a2ed48-ed81-4d99-ad89-342926f73688" xlink:to="loc_us-gaap_IncreaseDecreaseInContractWithCustomerLiability_f568f25b-ddb2-4c5f-a237-cde0629cc33c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedTaxesPayable_7a173daf-3aa1-4eb4-a582-7ce013ba3609" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncreaseDecreaseInAccruedTaxesPayable"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_64a2ed48-ed81-4d99-ad89-342926f73688" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedTaxesPayable_7a173daf-3aa1-4eb4-a582-7ce013ba3609" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_5a686f97-dfe1-4302-a335-2769868fdcd8" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncreaseDecreaseInAccountsReceivable"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_64a2ed48-ed81-4d99-ad89-342926f73688" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_5a686f97-dfe1-4302-a335-2769868fdcd8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInDeferredIncomeTaxes_c44e7ea3-9a22-4b61-a22a-7cb129d6ef49" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncreaseDecreaseInDeferredIncomeTaxes"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_64a2ed48-ed81-4d99-ad89-342926f73688" xlink:to="loc_us-gaap_IncreaseDecreaseInDeferredIncomeTaxes_c44e7ea3-9a22-4b61-a22a-7cb129d6ef49" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_3254ae53-2dbc-426f-8f13-ea9305aea6ad" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_64a2ed48-ed81-4d99-ad89-342926f73688" xlink:to="loc_us-gaap_NetIncomeLoss_3254ae53-2dbc-426f-8f13-ea9305aea6ad" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_babd8883-29de-41f8-aa70-5e413e38a541" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncreaseDecreaseInAccruedLiabilities"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_64a2ed48-ed81-4d99-ad89-342926f73688" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_babd8883-29de-41f8-aa70-5e413e38a541" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_8a63ab90-442b-4e2b-8b3e-ca0b701b0484" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets"/>
    <link:calculationArc order="8" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_64a2ed48-ed81-4d99-ad89-342926f73688" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_8a63ab90-442b-4e2b-8b3e-ca0b701b0484" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_ExcessAndObsoleteInventoryCharges_759565b7-d4b7-452c-999b-8882f502895c" xlink:href="cgnx-20221002.xsd#cgnx_ExcessAndObsoleteInventoryCharges"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_64a2ed48-ed81-4d99-ad89-342926f73688" xlink:to="loc_cgnx_ExcessAndObsoleteInventoryCharges_759565b7-d4b7-452c-999b-8882f502895c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AmortizationOfIntangibleAssets_c5a8a472-5cd6-4f25-bc64-289bf1e030da" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AmortizationOfIntangibleAssets"/>
    <link:calculationArc order="10" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_64a2ed48-ed81-4d99-ad89-342926f73688" xlink:to="loc_us-gaap_AmortizationOfIntangibleAssets_c5a8a472-5cd6-4f25-bc64-289bf1e030da" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayable_657f9ad1-a55e-40be-886a-c84b8e075b40" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncreaseDecreaseInAccountsPayable"/>
    <link:calculationArc order="11" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_64a2ed48-ed81-4d99-ad89-342926f73688" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayable_657f9ad1-a55e-40be-886a-c84b8e075b40" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockOptionPlanExpense_b7c0c22d-b735-4879-ad2c-a8f5f197169b" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_StockOptionPlanExpense"/>
    <link:calculationArc order="12" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_64a2ed48-ed81-4d99-ad89-342926f73688" xlink:to="loc_us-gaap_StockOptionPlanExpense_b7c0c22d-b735-4879-ad2c-a8f5f197169b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInDeferredRevenue_e05031b6-0d25-4f27-8955-7004cc6a4e51" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncreaseDecreaseInDeferredRevenue"/>
    <link:calculationArc order="13" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_64a2ed48-ed81-4d99-ad89-342926f73688" xlink:to="loc_us-gaap_IncreaseDecreaseInDeferredRevenue_e05031b6-0d25-4f27-8955-7004cc6a4e51" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnSaleOfInvestments_7a97107b-8db7-44c1-838f-ffef1b335094" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_GainLossOnSaleOfInvestments"/>
    <link:calculationArc order="14" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_64a2ed48-ed81-4d99-ad89-342926f73688" xlink:to="loc_us-gaap_GainLossOnSaleOfInvestments_7a97107b-8db7-44c1-838f-ffef1b335094" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInInventories_088ebc94-343f-4f24-b925-616e0c008656" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncreaseDecreaseInInventories"/>
    <link:calculationArc order="15" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_64a2ed48-ed81-4d99-ad89-342926f73688" xlink:to="loc_us-gaap_IncreaseDecreaseInInventories_088ebc94-343f-4f24-b925-616e0c008656" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments_8ee7936e-acc1-4cb8-9834-a82028fb567e" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments"/>
    <link:calculationArc order="16" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_64a2ed48-ed81-4d99-ad89-342926f73688" xlink:to="loc_us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments_8ee7936e-acc1-4cb8-9834-a82028fb567e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Depreciation_cbe7f491-5db0-4475-94c0-46a93817b37f" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_Depreciation"/>
    <link:calculationArc order="17" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_64a2ed48-ed81-4d99-ad89-342926f73688" xlink:to="loc_us-gaap_Depreciation_cbe7f491-5db0-4475-94c0-46a93817b37f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherOperatingCapitalNet_d25bfcd3-8323-48ad-8767-142453629cb7" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncreaseDecreaseInOtherOperatingCapitalNet"/>
    <link:calculationArc order="18" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_64a2ed48-ed81-4d99-ad89-342926f73688" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherOperatingCapitalNet_d25bfcd3-8323-48ad-8767-142453629cb7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_NonCashLossFromCatastrophes_74d6a620-197b-4694-8b5b-c79f879e9739" xlink:href="cgnx-20221002.xsd#cgnx_NonCashLossFromCatastrophes"/>
    <link:calculationArc order="19" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_64a2ed48-ed81-4d99-ad89-342926f73688" xlink:to="loc_cgnx_NonCashLossFromCatastrophes_74d6a620-197b-4694-8b5b-c79f879e9739" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_83ccaae2-7632-4b1c-a2ab-f73b6a98ad5f" 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_ProceedsFromSaleMaturityAndCollectionsOfInvestments_0f853f62-8503-4448-b6a1-3fc9ee834c32" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ProceedsFromSaleMaturityAndCollectionsOfInvestments"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_83ccaae2-7632-4b1c-a2ab-f73b6a98ad5f" xlink:to="loc_us-gaap_ProceedsFromSaleMaturityAndCollectionsOfInvestments_0f853f62-8503-4448-b6a1-3fc9ee834c32" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireInvestments_83804b74-6b0f-437e-8236-0d024f50dc8d" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PaymentsToAcquireInvestments"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_83ccaae2-7632-4b1c-a2ab-f73b6a98ad5f" xlink:to="loc_us-gaap_PaymentsToAcquireInvestments_83804b74-6b0f-437e-8236-0d024f50dc8d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_9b49e6a8-617a-4027-bbbc-14f3d626e098" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PaymentsToAcquirePropertyPlantAndEquipment"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_83ccaae2-7632-4b1c-a2ab-f73b6a98ad5f" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_9b49e6a8-617a-4027-bbbc-14f3d626e098" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/CashCashEquivalentsandInvestmentsComponentsofCashCashEquivalentsandInvestmentsDetails" xlink:type="simple" xlink:href="cgnx-20221002.xsd#CashCashEquivalentsandInvestmentsComponentsofCashCashEquivalentsandInvestmentsDetails"/>
  <link:calculationLink xlink:role="http://www.cognex.com/role/CashCashEquivalentsandInvestmentsComponentsofCashCashEquivalentsandInvestmentsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_CashCashEquivalentsShortTermAndLongTermInvestments_4da76032-c700-4208-837a-38bdbd5bddc5" xlink:href="cgnx-20221002.xsd#cgnx_CashCashEquivalentsShortTermAndLongTermInvestments"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_6094ec8d-528d-40cf-81dd-71ca83897c00" 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_cgnx_CashCashEquivalentsShortTermAndLongTermInvestments_4da76032-c700-4208-837a-38bdbd5bddc5" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_6094ec8d-528d-40cf-81dd-71ca83897c00" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecuritiesCurrent_6c9bc3cb-2cdd-4e08-8e90-5458ec428649" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecuritiesCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_cgnx_CashCashEquivalentsShortTermAndLongTermInvestments_4da76032-c700-4208-837a-38bdbd5bddc5" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecuritiesCurrent_6c9bc3cb-2cdd-4e08-8e90-5458ec428649" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermInvestments_a26e5d55-99c9-4487-aa04-d7540393f635" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LongTermInvestments"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_cgnx_CashCashEquivalentsShortTermAndLongTermInvestments_4da76032-c700-4208-837a-38bdbd5bddc5" xlink:to="loc_us-gaap_LongTermInvestments_a26e5d55-99c9-4487-aa04-d7540393f635" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_045b9924-5583-4519-9637-6879480af1f6" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MoneyMarketFundsAtCarryingValue_1887c828-73c0-4d51-b89e-35752f51df30" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_MoneyMarketFundsAtCarryingValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_045b9924-5583-4519-9637-6879480af1f6" xlink:to="loc_us-gaap_MoneyMarketFundsAtCarryingValue_1887c828-73c0-4d51-b89e-35752f51df30" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Cash_93fbc351-3c3d-4aec-8b81-96e71031ec9b" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_Cash"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_045b9924-5583-4519-9637-6879480af1f6" xlink:to="loc_us-gaap_Cash_93fbc351-3c3d-4aec-8b81-96e71031ec9b" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/CashCashEquivalentsandInvestmentsSummaryofAvailableforSaleInvestmentsDetails" xlink:type="simple" xlink:href="cgnx-20221002.xsd#CashCashEquivalentsandInvestmentsSummaryofAvailableforSaleInvestmentsDetails"/>
  <link:calculationLink xlink:role="http://www.cognex.com/role/CashCashEquivalentsandInvestmentsSummaryofAvailableforSaleInvestmentsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_33e5f86e-19ee-4edb-865d-b04f241b8ba9" 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_AvailableForSaleSecuritiesDebtSecurities_8f4936bc-7401-462a-aefe-41dc66f00aab" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_33e5f86e-19ee-4edb-865d-b04f241b8ba9" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_8f4936bc-7401-462a-aefe-41dc66f00aab" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_d4cdfe2a-0397-4642-91b2-cc2edc50b1e1" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_33e5f86e-19ee-4edb-865d-b04f241b8ba9" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_d4cdfe2a-0397-4642-91b2-cc2edc50b1e1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_d41575d6-95d8-4e96-a927-76106b94e12f" 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_33e5f86e-19ee-4edb-865d-b04f241b8ba9" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_d41575d6-95d8-4e96-a927-76106b94e12f" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/CashCashEquivalentsandInvestmentsGrossUnrealizedLossesandFairValuesforAvailableforSaleInvestmentsDetails" xlink:type="simple" xlink:href="cgnx-20221002.xsd#CashCashEquivalentsandInvestmentsGrossUnrealizedLossesandFairValuesforAvailableforSaleInvestmentsDetails"/>
  <link:calculationLink xlink:role="http://www.cognex.com/role/CashCashEquivalentsandInvestmentsGrossUnrealizedLossesandFairValuesforAvailableforSaleInvestmentsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition_07e997ab-da9f-4645-ad1c-c03df9b38858" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_5d2a1544-f1ec-4335-b13a-8a4986f25cb6" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition_07e997ab-da9f-4645-ad1c-c03df9b38858" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_5d2a1544-f1ec-4335-b13a-8a4986f25cb6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_36524af6-547f-49e9-8dd9-4492869ae2b6" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition_07e997ab-da9f-4645-ad1c-c03df9b38858" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_36524af6-547f-49e9-8dd9-4492869ae2b6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss_efa9c149-59c9-4b92-830c-528838199fec" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_87e8ba26-68c2-49cd-a44e-f22ac13381fe" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss_efa9c149-59c9-4b92-830c-528838199fec" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_87e8ba26-68c2-49cd-a44e-f22ac13381fe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_34e0bf5c-d72e-4f1b-aa9f-49a23015258d" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss_efa9c149-59c9-4b92-830c-528838199fec" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_34e0bf5c-d72e-4f1b-aa9f-49a23015258d" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/CashCashEquivalentsandInvestmentsEffectiveMaturityDatesofAvailableforSaleInvestmentsDetails" xlink:type="simple" xlink:href="cgnx-20221002.xsd#CashCashEquivalentsandInvestmentsEffectiveMaturityDatesofAvailableforSaleInvestmentsDetails"/>
  <link:calculationLink xlink:role="http://www.cognex.com/role/CashCashEquivalentsandInvestmentsEffectiveMaturityDatesofAvailableforSaleInvestmentsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_53c83b62-97a1-4cec-84b4-cadfd9385216" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterTwoYearsBeforeThreeYearsFairValue_d807909b-3efd-484f-bada-720e45013bf0" xlink:href="cgnx-20221002.xsd#cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterTwoYearsBeforeThreeYearsFairValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_53c83b62-97a1-4cec-84b4-cadfd9385216" xlink:to="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterTwoYearsBeforeThreeYearsFairValue_d807909b-3efd-484f-bada-720e45013bf0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_e9fa6813-72a2-4a22-b215-6aa22c3c1f0f" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_53c83b62-97a1-4cec-84b4-cadfd9385216" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_e9fa6813-72a2-4a22-b215-6aa22c3c1f0f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterThreeYearsBeforeFourYearsFairValue_f975dca0-778f-46e9-8442-e758f31950e3" xlink:href="cgnx-20221002.xsd#cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterThreeYearsBeforeFourYearsFairValue"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_53c83b62-97a1-4cec-84b4-cadfd9385216" xlink:to="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterThreeYearsBeforeFourYearsFairValue_f975dca0-778f-46e9-8442-e758f31950e3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterFourYearsBeforeFiveYearsFairValue_e197b9ec-2fdc-4be0-82e3-2bb5bb57e0ce" xlink:href="cgnx-20221002.xsd#cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterFourYearsBeforeFiveYearsFairValue"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_53c83b62-97a1-4cec-84b4-cadfd9385216" xlink:to="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterFourYearsBeforeFiveYearsFairValue_e197b9ec-2fdc-4be0-82e3-2bb5bb57e0ce" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterOneYearBeforeTwoYearsFairValue_71060ab1-162b-48db-9fbe-f663db176b65" xlink:href="cgnx-20221002.xsd#cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterOneYearBeforeTwoYearsFairValue"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_53c83b62-97a1-4cec-84b4-cadfd9385216" xlink:to="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterOneYearBeforeTwoYearsFairValue_71060ab1-162b-48db-9fbe-f663db176b65" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/InventoriesScheduleofInventoriesDetails" xlink:type="simple" xlink:href="cgnx-20221002.xsd#InventoriesScheduleofInventoriesDetails"/>
  <link:calculationLink xlink:role="http://www.cognex.com/role/InventoriesScheduleofInventoriesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryNet_f6fcfc32-98ef-4708-b531-d2cefd7ce170" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_InventoryNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryRawMaterialsNetOfReserves_74895347-dea6-422b-8fd9-39271dfc64a6" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_InventoryRawMaterialsNetOfReserves"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InventoryNet_f6fcfc32-98ef-4708-b531-d2cefd7ce170" xlink:to="loc_us-gaap_InventoryRawMaterialsNetOfReserves_74895347-dea6-422b-8fd9-39271dfc64a6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryWorkInProcessNetOfReserves_42dd7802-4aca-4ff0-ace8-00cda81a8761" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_InventoryWorkInProcessNetOfReserves"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InventoryNet_f6fcfc32-98ef-4708-b531-d2cefd7ce170" xlink:to="loc_us-gaap_InventoryWorkInProcessNetOfReserves_42dd7802-4aca-4ff0-ace8-00cda81a8761" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryFinishedGoodsNetOfReserves_9839138f-90d7-4946-a5e8-453da40ceab1" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_InventoryFinishedGoodsNetOfReserves"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InventoryNet_f6fcfc32-98ef-4708-b531-d2cefd7ce170" xlink:to="loc_us-gaap_InventoryFinishedGoodsNetOfReserves_9839138f-90d7-4946-a5e8-453da40ceab1" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/LeasesFutureMinimumLeasePaymentObligationsUnderOperatingLeasesDetails" xlink:type="simple" xlink:href="cgnx-20221002.xsd#LeasesFutureMinimumLeasePaymentObligationsUnderOperatingLeasesDetails"/>
  <link:calculationLink xlink:role="http://www.cognex.com/role/LeasesFutureMinimumLeasePaymentObligationsUnderOperatingLeasesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_caa2e0a6-e5e6-45f5-b6e9-1f5795352366" 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_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear_e5bd0cbb-bfa2-4cd5-91ae-f88669f062a9" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_caa2e0a6-e5e6-45f5-b6e9-1f5795352366" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear_e5bd0cbb-bfa2-4cd5-91ae-f88669f062a9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_ead026ba-32a6-4a47-b448-27c5cde24a04" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_caa2e0a6-e5e6-45f5-b6e9-1f5795352366" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_ead026ba-32a6-4a47-b448-27c5cde24a04" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_cd6f04b5-e4b5-473b-a234-aa4f414a43da" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_caa2e0a6-e5e6-45f5-b6e9-1f5795352366" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_cd6f04b5-e4b5-473b-a234-aa4f414a43da" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_c81996e0-9f57-4bf0-8e19-72dc9a7ed5c0" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_caa2e0a6-e5e6-45f5-b6e9-1f5795352366" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_c81996e0-9f57-4bf0-8e19-72dc9a7ed5c0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_93453b8d-6e24-4eb1-b881-9f283ae1de14" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_caa2e0a6-e5e6-45f5-b6e9-1f5795352366" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_93453b8d-6e24-4eb1-b881-9f283ae1de14" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive_2ebe8481-6e28-43aa-968c-96a489a9a5ea" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_caa2e0a6-e5e6-45f5-b6e9-1f5795352366" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive_2ebe8481-6e28-43aa-968c-96a489a9a5ea" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive_28c0e4db-6429-4c30-8a0f-37ee44f228b2" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_caa2e0a6-e5e6-45f5-b6e9-1f5795352366" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive_28c0e4db-6429-4c30-8a0f-37ee44f228b2" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/IntangibleAssetsDetails" xlink:type="simple" xlink:href="cgnx-20221002.xsd#IntangibleAssetsDetails"/>
  <link:calculationLink xlink:role="http://www.cognex.com/role/IntangibleAssetsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsNet_fdb16b4a-23b8-42bc-9bd1-7c85d920d2a3" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FiniteLivedIntangibleAssetsNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsGross_1b3460fe-7f3c-41ba-9162-9d55ada731a6" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FiniteLivedIntangibleAssetsGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_fdb16b4a-23b8-42bc-9bd1-7c85d920d2a3" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsGross_1b3460fe-7f3c-41ba-9162-9d55ada731a6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_aea5eeb6-5aa3-4302-9c5d-7ad99d81962b" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_fdb16b4a-23b8-42bc-9bd1-7c85d920d2a3" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_aea5eeb6-5aa3-4302-9c5d-7ad99d81962b" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/IntangibleAssetsDetails_1" xlink:type="simple" xlink:href="cgnx-20221002.xsd#IntangibleAssetsDetails_1"/>
  <link:calculationLink xlink:role="http://www.cognex.com/role/IntangibleAssetsDetails_1" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsNet_f8309744-6c67-43cd-9e43-a07b262d23fd" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FiniteLivedIntangibleAssetsNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseRemainderOfFiscalYear_2198e8bb-f1f5-4e5c-8efb-4a9651deb2a7" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseRemainderOfFiscalYear"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_f8309744-6c67-43cd-9e43-a07b262d23fd" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseRemainderOfFiscalYear_2198e8bb-f1f5-4e5c-8efb-4a9651deb2a7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths_02e0ce7d-2a73-4e5b-bfaf-a23a26f95910" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_f8309744-6c67-43cd-9e43-a07b262d23fd" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths_02e0ce7d-2a73-4e5b-bfaf-a23a26f95910" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo_98888adc-40d9-4296-a422-3b3750d7b0af" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_f8309744-6c67-43cd-9e43-a07b262d23fd" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo_98888adc-40d9-4296-a422-3b3750d7b0af" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree_e192bbc8-501b-4a23-ac7b-f142554f03d7" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_f8309744-6c67-43cd-9e43-a07b262d23fd" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree_e192bbc8-501b-4a23-ac7b-f142554f03d7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour_50b51d86-6a24-4627-91d9-801644cbb82e" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_f8309744-6c67-43cd-9e43-a07b262d23fd" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour_50b51d86-6a24-4627-91d9-801644cbb82e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFive_0649b8ec-9b01-4060-9bf8-4ae6d7f7fc98" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFive"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_f8309744-6c67-43cd-9e43-a07b262d23fd" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFive_0649b8ec-9b01-4060-9bf8-4ae6d7f7fc98" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/DerivativeInstrumentsOffsettingAssetsDetails" xlink:type="simple" xlink:href="cgnx-20221002.xsd#DerivativeInstrumentsOffsettingAssetsDetails"/>
  <link:calculationLink xlink:role="http://www.cognex.com/role/DerivativeInstrumentsOffsettingAssetsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssets_1deb7331-df19-485e-aaed-2c56409e876b" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DerivativeAssets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeAsset_e8782232-e2ef-43ea-9d21-6b6016add802" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DerivativeFairValueOfDerivativeAsset"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeAssets_1deb7331-df19-485e-aaed-2c56409e876b" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeAsset_e8782232-e2ef-43ea-9d21-6b6016add802" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetCollateralObligationToReturnCashOffset_203058ae-438f-4a1a-acb6-1f3c14e57758" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DerivativeAssetCollateralObligationToReturnCashOffset"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeAssets_1deb7331-df19-485e-aaed-2c56409e876b" xlink:to="loc_us-gaap_DerivativeAssetCollateralObligationToReturnCashOffset_203058ae-438f-4a1a-acb6-1f3c14e57758" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilities_31ed505b-6892-43cb-acb3-69cb9d875563" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DerivativeLiabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeLiability_9c0ad11a-91c2-45ac-abb8-9c603601dcb0" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DerivativeFairValueOfDerivativeLiability"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeLiabilities_31ed505b-6892-43cb-acb3-69cb9d875563" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeLiability_9c0ad11a-91c2-45ac-abb8-9c603601dcb0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilityCollateralRightToReclaimCashOffset_397d21b9-6085-42af-b52f-bfd519f9ba77" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DerivativeLiabilityCollateralRightToReclaimCashOffset"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeLiabilities_31ed505b-6892-43cb-acb3-69cb9d875563" xlink:to="loc_us-gaap_DerivativeLiabilityCollateralRightToReclaimCashOffset_397d21b9-6085-42af-b52f-bfd519f9ba77" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/WeightedAverageSharesCalculationofWeightedAverageSharesDetails" xlink:type="simple" xlink:href="cgnx-20221002.xsd#WeightedAverageSharesCalculationofWeightedAverageSharesDetails"/>
  <link:calculationLink xlink:role="http://www.cognex.com/role/WeightedAverageSharesCalculationofWeightedAverageSharesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_246b9e87-7c08-48a9-b576-6ef701421b87" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_66398b46-f921-422a-b937-ad80c36638bd" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingBasic"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_246b9e87-7c08-48a9-b576-6ef701421b87" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_66398b46-f921-422a-b937-ad80c36638bd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment_c3610f42-3e83-4808-9b66-7c10aa47b2e4" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_246b9e87-7c08-48a9-b576-6ef701421b87" xlink:to="loc_us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment_c3610f42-3e83-4808-9b66-7c10aa47b2e4" xlink:type="arc"/>
  </link:calculationLink>
</link:linkbase>
