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

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2026 Workiva-->
<!--r:019fd25a-c65c-7ad1-af56-54a3a1cd85e7,g:a2f68e2e-5e49-46f7-8b61-ebcaf0b4635f-->
<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:arcroleRef arcroleURI="https://xbrl.org/2023/arcrole/summation-item" xlink:type="simple" xlink:href="https://www.xbrl.org/2023/calculation-1.1.xsd#summation-item"/>
  <link:roleRef roleURI="http://www.cognex.com/role/ConsolidatedStatementsofOperations" xlink:type="simple" xlink:href="cgnx-20261004.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_GrossProfit_019fd25a-c6f6-74c7-9093-91e22f56fc3a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_GrossProfit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_019fd25a-c6f6-71e1-a6d9-b676815a6c40" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_GrossProfit_019fd25a-c6f6-74c7-9093-91e22f56fc3a" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_019fd25a-c6f6-71e1-a6d9-b676815a6c40" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfGoodsAndServicesSold_019fd25a-c6f6-7bb3-a856-3b86290f9d62" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CostOfGoodsAndServicesSold"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_GrossProfit_019fd25a-c6f6-74c7-9093-91e22f56fc3a" xlink:to="loc_us-gaap_CostOfGoodsAndServicesSold_019fd25a-c6f6-7bb3-a856-3b86290f9d62" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_019fd25a-c6f6-70cd-95e4-cc1cc0ee40dc" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019fd25a-c6f6-74be-b115-7198304b3571" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_019fd25a-c6f6-70cd-95e4-cc1cc0ee40dc" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019fd25a-c6f6-74be-b115-7198304b3571" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_019fd25a-c6f6-7c92-ba6a-27550727b452" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_019fd25a-c6f6-70cd-95e4-cc1cc0ee40dc" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_019fd25a-c6f6-7c92-ba6a-27550727b452" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019fd25a-c6f6-7038-98dd-7fee62c5e4e2" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_019fd25a-c6f6-7335-8efe-97a8eaf9c3bf" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019fd25a-c6f6-7038-98dd-7fee62c5e4e2" xlink:to="loc_us-gaap_OperatingIncomeLoss_019fd25a-c6f6-7335-8efe-97a8eaf9c3bf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ForeignCurrencyTransactionGainLossBeforeTax_019fd25a-c6f6-71a7-9bc7-5be714a51295" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ForeignCurrencyTransactionGainLossBeforeTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019fd25a-c6f6-7038-98dd-7fee62c5e4e2" xlink:to="loc_us-gaap_ForeignCurrencyTransactionGainLossBeforeTax_019fd25a-c6f6-71a7-9bc7-5be714a51295" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeNonoperating_019fd25a-c6f6-7265-8746-57d5a895071b" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InvestmentIncomeNonoperating"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019fd25a-c6f6-7038-98dd-7fee62c5e4e2" xlink:to="loc_us-gaap_InvestmentIncomeNonoperating_019fd25a-c6f6-7265-8746-57d5a895071b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_019fd25a-c6f6-79d6-943c-bdc5c5f132cc" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019fd25a-c6f6-7038-98dd-7fee62c5e4e2" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_019fd25a-c6f6-79d6-943c-bdc5c5f132cc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_019fd25a-c6f6-7939-b979-994242ef1899" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossProfit_019fd25a-c6f6-79db-8982-08af8474fd44" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_GrossProfit"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_019fd25a-c6f6-7939-b979-994242ef1899" xlink:to="loc_us-gaap_GrossProfit_019fd25a-c6f6-79db-8982-08af8474fd44" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_019fd25a-c6f6-7f97-a6cb-fd6b0a2af205" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SellingGeneralAndAdministrativeExpense"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_019fd25a-c6f6-7939-b979-994242ef1899" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_019fd25a-c6f6-7f97-a6cb-fd6b0a2af205" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ResearchAndDevelopmentExpense_019fd25a-c6f6-7475-bf6d-fbe3d37961b3" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ResearchAndDevelopmentExpense"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_019fd25a-c6f6-7939-b979-994242ef1899" xlink:to="loc_us-gaap_ResearchAndDevelopmentExpense_019fd25a-c6f6-7475-bf6d-fbe3d37961b3" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/ConsolidatedStatementsofComprehensiveIncomeLoss" xlink:type="simple" xlink:href="cgnx-20261004.xsd#ConsolidatedStatementsofComprehensiveIncomeLoss"/>
  <link:calculationLink xlink:role="http://www.cognex.com/role/ConsolidatedStatementsofComprehensiveIncomeLoss" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_019fd25a-c6f6-7d60-a525-9781df2b528c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeForeignCurrencyTransactionAndTranslationAdjustmentNetOfTaxPortionAttributableToParent_019fd25a-c6f6-74c9-a71d-1ecf5f3b7dc9" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherComprehensiveIncomeForeignCurrencyTransactionAndTranslationAdjustmentNetOfTaxPortionAttributableToParent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_019fd25a-c6f6-7d60-a525-9781df2b528c" xlink:to="loc_us-gaap_OtherComprehensiveIncomeForeignCurrencyTransactionAndTranslationAdjustmentNetOfTaxPortionAttributableToParent_019fd25a-c6f6-74c9-a71d-1ecf5f3b7dc9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent_019fd25a-c6f6-7ebf-82c5-2f6f02719612" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_019fd25a-c6f6-7d60-a525-9781df2b528c" xlink:to="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent_019fd25a-c6f6-7ebf-82c5-2f6f02719612" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent_019fd25a-c6f6-7f02-9fe0-3cee0d34c882" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax_019fd25a-c6f6-797a-9610-c9a7c1bded5f" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent_019fd25a-c6f6-7f02-9fe0-3cee0d34c882" xlink:to="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax_019fd25a-c6f6-797a-9610-c9a7c1bded5f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax_019fd25a-c6f6-7f11-a6d5-413f2fe2ac64" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent_019fd25a-c6f6-7f02-9fe0-3cee0d34c882" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax_019fd25a-c6f6-7f11-a6d5-413f2fe2ac64" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_019fd25a-c6f6-721e-b816-ec09cc6db208" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ComprehensiveIncomeNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_019fd25a-c6f6-7950-9ea7-8009f4132c49" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_019fd25a-c6f6-721e-b816-ec09cc6db208" xlink:to="loc_us-gaap_NetIncomeLoss_019fd25a-c6f6-7950-9ea7-8009f4132c49" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_019fd25a-c6f6-7cb2-8250-29bc4ce91a71" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_019fd25a-c6f6-721e-b816-ec09cc6db208" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_019fd25a-c6f6-7cb2-8250-29bc4ce91a71" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/ConsolidatedBalanceSheets" xlink:type="simple" xlink:href="cgnx-20261004.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_LiabilitiesCurrent_019fd25a-c6f6-74eb-b0e7-bb8b7d392dc2" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LiabilitiesCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableCurrent_019fd25a-c6f6-763b-9c5d-e452c36fc7c3" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountsPayableCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_019fd25a-c6f6-74eb-b0e7-bb8b7d392dc2" xlink:to="loc_us-gaap_AccountsPayableCurrent_019fd25a-c6f6-763b-9c5d-e452c36fc7c3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_019fd25a-c6f6-7902-ba6d-9eaf793855d1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_019fd25a-c6f6-74eb-b0e7-bb8b7d392dc2" xlink:to="loc_us-gaap_AccruedLiabilitiesCurrent_019fd25a-c6f6-7902-ba6d-9eaf793855d1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedIncomeTaxesCurrent_019fd25a-c6f6-7108-9c1e-49bd054f47ab" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccruedIncomeTaxesCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_019fd25a-c6f6-74eb-b0e7-bb8b7d392dc2" xlink:to="loc_us-gaap_AccruedIncomeTaxesCurrent_019fd25a-c6f6-7108-9c1e-49bd054f47ab" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerLiabilityCurrent_019fd25a-c6f6-71e7-8ef2-7ce0d024f260" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ContractWithCustomerLiabilityCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_019fd25a-c6f6-74eb-b0e7-bb8b7d392dc2" xlink:to="loc_us-gaap_ContractWithCustomerLiabilityCurrent_019fd25a-c6f6-71e7-8ef2-7ce0d024f260" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_019fd25a-c6f6-7459-9cd4-82193c62aceb" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseLiabilityCurrent"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_019fd25a-c6f6-74eb-b0e7-bb8b7d392dc2" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_019fd25a-c6f6-7459-9cd4-82193c62aceb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_019fd25a-c6f6-75b7-a9f1-438b704e4a47" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Assets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_019fd25a-c6f6-7521-af07-4c162bb3dcdc" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AssetsCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019fd25a-c6f6-75b7-a9f1-438b704e4a47" xlink:to="loc_us-gaap_AssetsCurrent_019fd25a-c6f6-7521-af07-4c162bb3dcdc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermInvestments_019fd25a-c6f6-75d8-8c8e-6f93e810ef85" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LongTermInvestments"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019fd25a-c6f6-75b7-a9f1-438b704e4a47" xlink:to="loc_us-gaap_LongTermInvestments_019fd25a-c6f6-75d8-8c8e-6f93e810ef85" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_019fd25a-c6f6-751a-b948-6a07bf4ab993" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019fd25a-c6f6-75b7-a9f1-438b704e4a47" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_019fd25a-c6f6-751a-b948-6a07bf4ab993" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_019fd25a-c6f6-7ebf-8dcc-5d4e8e25d59e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseRightOfUseAsset"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019fd25a-c6f6-75b7-a9f1-438b704e4a47" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_019fd25a-c6f6-7ebf-8dcc-5d4e8e25d59e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_019fd25a-c6f6-7154-a779-27a0eea5855b" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Goodwill"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019fd25a-c6f6-75b7-a9f1-438b704e4a47" xlink:to="loc_us-gaap_Goodwill_019fd25a-c6f6-7154-a779-27a0eea5855b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019fd25a-c6f6-7e49-9f19-c733b6432471" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FiniteLivedIntangibleAssetsNet"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019fd25a-c6f6-75b7-a9f1-438b704e4a47" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019fd25a-c6f6-7e49-9f19-c733b6432471" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_019fd25a-c6f6-7acf-943a-cfa79c855fb6" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredIncomeTaxAssetsNet"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019fd25a-c6f6-75b7-a9f1-438b704e4a47" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_019fd25a-c6f6-7acf-943a-cfa79c855fb6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_019fd25a-c6f6-7b72-8bb3-7099d8b33f21" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherAssetsNoncurrent"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019fd25a-c6f6-75b7-a9f1-438b704e4a47" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_019fd25a-c6f6-7b72-8bb3-7099d8b33f21" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_019fd25a-c6f6-7434-9dc1-c2cc58b9f4d5" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Liabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_019fd25a-c6f6-70a0-b517-e00f44026bc8" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LiabilitiesCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019fd25a-c6f6-7434-9dc1-c2cc58b9f4d5" xlink:to="loc_us-gaap_LiabilitiesCurrent_019fd25a-c6f6-70a0-b517-e00f44026bc8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_019fd25a-c6f6-7414-a454-5ec4fa993f72" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseLiabilityNoncurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019fd25a-c6f6-7434-9dc1-c2cc58b9f4d5" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_019fd25a-c6f6-7414-a454-5ec4fa993f72" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_019fd25a-c6f6-7223-8868-a92ab48466dd" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredIncomeTaxLiabilitiesNet"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019fd25a-c6f6-7434-9dc1-c2cc58b9f4d5" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_019fd25a-c6f6-7223-8868-a92ab48466dd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilityForUncertainTaxPositionsNoncurrent_019fd25a-c6f6-7caf-aba9-f6d4b618b431" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LiabilityForUncertainTaxPositionsNoncurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019fd25a-c6f6-7434-9dc1-c2cc58b9f4d5" xlink:to="loc_us-gaap_LiabilityForUncertainTaxPositionsNoncurrent_019fd25a-c6f6-7caf-aba9-f6d4b618b431" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesNoncurrent_019fd25a-c6f6-7110-96b7-bc949d1aa891" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherLiabilitiesNoncurrent"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019fd25a-c6f6-7434-9dc1-c2cc58b9f4d5" xlink:to="loc_us-gaap_OtherLiabilitiesNoncurrent_019fd25a-c6f6-7110-96b7-bc949d1aa891" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_019fd25a-c6f6-7020-929e-b60e6f32e7cc" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AssetsCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_019fd25a-c6f6-77cb-bbf0-03cb7e93cfee" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_019fd25a-c6f6-7020-929e-b60e6f32e7cc" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_019fd25a-c6f6-77cb-bbf0-03cb7e93cfee" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecuritiesCurrent_019fd25a-c6f6-74f1-b9cc-625b2c37b7ff" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecuritiesCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_019fd25a-c6f6-7020-929e-b60e6f32e7cc" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecuritiesCurrent_019fd25a-c6f6-74f1-b9cc-625b2c37b7ff" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsReceivableNetCurrent_019fd25a-c6f6-76d6-84a3-e1f9727c6b48" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountsReceivableNetCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_019fd25a-c6f6-7020-929e-b60e6f32e7cc" xlink:to="loc_us-gaap_AccountsReceivableNetCurrent_019fd25a-c6f6-76d6-84a3-e1f9727c6b48" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UnbilledReceivablesCurrent_019fd25a-c6f6-7f36-8f6e-947c5d3eb413" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_UnbilledReceivablesCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_019fd25a-c6f6-7020-929e-b60e6f32e7cc" xlink:to="loc_us-gaap_UnbilledReceivablesCurrent_019fd25a-c6f6-7f36-8f6e-947c5d3eb413" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryNet_019fd25a-c6f6-7ac0-89d8-f11c371644c1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InventoryNet"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_019fd25a-c6f6-7020-929e-b60e6f32e7cc" xlink:to="loc_us-gaap_InventoryNet_019fd25a-c6f6-7ac0-89d8-f11c371644c1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_019fd25a-c6f6-7191-86d9-5ba68406eeac" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PrepaidExpenseAndOtherAssetsCurrent"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_019fd25a-c6f6-7020-929e-b60e6f32e7cc" xlink:to="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_019fd25a-c6f6-7191-86d9-5ba68406eeac" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_019fd25a-c6f6-7cbd-9b10-bbaa62876e9f" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapitalCommonStock_019fd25a-c6f6-7f43-9263-3e6a95b17ad3" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AdditionalPaidInCapitalCommonStock"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019fd25a-c6f6-7cbd-9b10-bbaa62876e9f" xlink:to="loc_us-gaap_AdditionalPaidInCapitalCommonStock_019fd25a-c6f6-7f43-9263-3e6a95b17ad3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_019fd25a-c6f6-75e7-b45c-7d64b8b9862f" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019fd25a-c6f6-7cbd-9b10-bbaa62876e9f" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_019fd25a-c6f6-75e7-b45c-7d64b8b9862f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_019fd25a-c6f6-74fd-a006-2aa8469898b3" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019fd25a-c6f6-7cbd-9b10-bbaa62876e9f" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_019fd25a-c6f6-74fd-a006-2aa8469898b3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockValueOutstanding_019fd25a-c6f6-74c0-92c7-eaccc588d5bb" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PreferredStockValueOutstanding"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019fd25a-c6f6-7cbd-9b10-bbaa62876e9f" xlink:to="loc_us-gaap_PreferredStockValueOutstanding_019fd25a-c6f6-74c0-92c7-eaccc588d5bb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValueOutstanding_019fd25a-c6f6-755f-99e6-46c295ebf1d2" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommonStockValueOutstanding"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019fd25a-c6f6-7cbd-9b10-bbaa62876e9f" xlink:to="loc_us-gaap_CommonStockValueOutstanding_019fd25a-c6f6-755f-99e6-46c295ebf1d2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_019fd25a-c6f6-7cbc-9c5d-c946bcadd814" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_019fd25a-c6f6-7df2-b1a0-967946c99bf6" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Liabilities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_019fd25a-c6f6-7cbc-9c5d-c946bcadd814" xlink:to="loc_us-gaap_Liabilities_019fd25a-c6f6-7df2-b1a0-967946c99bf6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommitmentsAndContingencies_019fd25a-c6f6-7085-9a2d-bab925efe51b" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommitmentsAndContingencies"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_019fd25a-c6f6-7cbc-9c5d-c946bcadd814" xlink:to="loc_us-gaap_CommitmentsAndContingencies_019fd25a-c6f6-7085-9a2d-bab925efe51b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_019fd25a-c6f6-7d8f-8542-4b7777f127fd" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockholdersEquity"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_019fd25a-c6f6-7cbc-9c5d-c946bcadd814" xlink:to="loc_us-gaap_StockholdersEquity_019fd25a-c6f6-7d8f-8542-4b7777f127fd" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/ConsolidatedStatementsofCashFlows" xlink:type="simple" xlink:href="cgnx-20261004.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_019fd25a-c789-7134-9f3f-cba801ec6e4b" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_ProceedsPaymentsIssuanceOfSharesShareBasedPaymentArrangementIncludingOptionExercisedNet_019fd25a-c789-77da-a6aa-d0a92b3be901" xlink:href="cgnx-20261004.xsd#cgnx_ProceedsPaymentsIssuanceOfSharesShareBasedPaymentArrangementIncludingOptionExercisedNet"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019fd25a-c789-7134-9f3f-cba801ec6e4b" xlink:to="loc_cgnx_ProceedsPaymentsIssuanceOfSharesShareBasedPaymentArrangementIncludingOptionExercisedNet_019fd25a-c789-77da-a6aa-d0a92b3be901" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_019fd25a-c789-7f7a-a418-902ceaddfab5" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsForRepurchaseOfCommonStock"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019fd25a-c789-7134-9f3f-cba801ec6e4b" xlink:to="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_019fd25a-c789-7f7a-a418-902ceaddfab5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_PaymentOfExciseTaxPriorYearCommonStockRepurchases_019fd25a-c789-77ec-9e7f-bce8526e8b55" xlink:href="cgnx-20261004.xsd#cgnx_PaymentOfExciseTaxPriorYearCommonStockRepurchases"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019fd25a-c789-7134-9f3f-cba801ec6e4b" xlink:to="loc_cgnx_PaymentOfExciseTaxPriorYearCommonStockRepurchases_019fd25a-c789-77ec-9e7f-bce8526e8b55" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsOfDividendsCommonStock_019fd25a-c789-7830-ab67-55f07c01c2c3" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsOfDividendsCommonStock"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019fd25a-c789-7134-9f3f-cba801ec6e4b" xlink:to="loc_us-gaap_PaymentsOfDividendsCommonStock_019fd25a-c789-7830-ab67-55f07c01c2c3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019fd25a-c789-7111-8f23-3285f4d682c1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireInvestments_019fd25a-c789-714a-a132-16f4ffd58f1e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsToAcquireInvestments"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019fd25a-c789-7111-8f23-3285f4d682c1" xlink:to="loc_us-gaap_PaymentsToAcquireInvestments_019fd25a-c789-714a-a132-16f4ffd58f1e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleMaturityAndCollectionsOfInvestments_019fd25a-c789-7c60-8ec6-8fa721632827" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromSaleMaturityAndCollectionsOfInvestments"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019fd25a-c789-7111-8f23-3285f4d682c1" xlink:to="loc_us-gaap_ProceedsFromSaleMaturityAndCollectionsOfInvestments_019fd25a-c789-7c60-8ec6-8fa721632827" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromDivestitureOfBusinesses_019fd25a-c789-7d9e-baf5-772617bd2920" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromDivestitureOfBusinesses"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019fd25a-c789-7111-8f23-3285f4d682c1" xlink:to="loc_us-gaap_ProceedsFromDivestitureOfBusinesses_019fd25a-c789-7d9e-baf5-772617bd2920" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_019fd25a-c789-7569-969f-bc979fbc46b2" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsToAcquirePropertyPlantAndEquipment"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019fd25a-c789-7111-8f23-3285f4d682c1" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_019fd25a-c789-7569-969f-bc979fbc46b2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019fd25a-c789-70ef-9f07-2a0961911599" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_019fd25a-c789-755d-829c-5d51a0047170" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019fd25a-c789-70ef-9f07-2a0961911599" xlink:to="loc_us-gaap_NetIncomeLoss_019fd25a-c789-755d-829c-5d51a0047170" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockOptionPlanExpense_019fd25a-c789-7abb-b001-4286f9570ce1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockOptionPlanExpense"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019fd25a-c789-70ef-9f07-2a0961911599" xlink:to="loc_us-gaap_StockOptionPlanExpense_019fd25a-c789-7abb-b001-4286f9570ce1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Depreciation_019fd25a-c789-7308-bc5b-6f3d5591cec1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Depreciation"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019fd25a-c789-70ef-9f07-2a0961911599" xlink:to="loc_us-gaap_Depreciation_019fd25a-c789-7308-bc5b-6f3d5591cec1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AmortizationOfIntangibleAssets_019fd25a-c789-78de-b7f6-7e2cf06cbdea" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AmortizationOfIntangibleAssets"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019fd25a-c789-70ef-9f07-2a0961911599" xlink:to="loc_us-gaap_AmortizationOfIntangibleAssets_019fd25a-c789-78de-b7f6-7e2cf06cbdea" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_ExcessAndObsoleteInventoryCharges_019fd25a-c789-72c1-9796-d4a625de7af7" xlink:href="cgnx-20261004.xsd#cgnx_ExcessAndObsoleteInventoryCharges"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019fd25a-c789-70ef-9f07-2a0961911599" xlink:to="loc_cgnx_ExcessAndObsoleteInventoryCharges_019fd25a-c789-72c1-9796-d4a625de7af7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInDeferredIncomeTaxes_019fd25a-c789-7802-adc6-9e3ff749ecbf" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInDeferredIncomeTaxes"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019fd25a-c789-70ef-9f07-2a0961911599" xlink:to="loc_us-gaap_IncreaseDecreaseInDeferredIncomeTaxes_019fd25a-c789-7802-adc6-9e3ff749ecbf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_019fd25a-c789-7727-918d-278d24a71180" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInAccountsReceivable"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019fd25a-c789-70ef-9f07-2a0961911599" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_019fd25a-c789-7727-918d-278d24a71180" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInContractWithCustomerLiability_019fd25a-c789-705c-8f1a-835916403e00" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInContractWithCustomerLiability"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019fd25a-c789-70ef-9f07-2a0961911599" xlink:to="loc_us-gaap_IncreaseDecreaseInContractWithCustomerLiability_019fd25a-c789-705c-8f1a-835916403e00" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInInventories_019fd25a-c789-7775-be05-2dd70f365923" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInInventories"/>
    <link:calculationArc order="9" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019fd25a-c789-70ef-9f07-2a0961911599" xlink:to="loc_us-gaap_IncreaseDecreaseInInventories_019fd25a-c789-7775-be05-2dd70f365923" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_019fd25a-c789-7f49-a851-2396aac0fac3" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets"/>
    <link:calculationArc order="10" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019fd25a-c789-70ef-9f07-2a0961911599" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_019fd25a-c789-7f49-a851-2396aac0fac3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayable_019fd25a-c789-71bb-a003-c5fcc90b1d08" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInAccountsPayable"/>
    <link:calculationArc order="11" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019fd25a-c789-70ef-9f07-2a0961911599" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayable_019fd25a-c789-71bb-a003-c5fcc90b1d08" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_019fd25a-c789-7de4-b980-bb9acd179414" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInAccruedLiabilities"/>
    <link:calculationArc order="12" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019fd25a-c789-70ef-9f07-2a0961911599" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_019fd25a-c789-7de4-b980-bb9acd179414" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedTaxesPayable_019fd25a-c789-7325-af42-bf15125c2d18" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInAccruedTaxesPayable"/>
    <link:calculationArc order="13" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019fd25a-c789-70ef-9f07-2a0961911599" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedTaxesPayable_019fd25a-c789-7325-af42-bf15125c2d18" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInDeferredRevenue_019fd25a-c789-7fcd-bf40-2f906d4ddeb2" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInDeferredRevenue"/>
    <link:calculationArc order="14" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019fd25a-c789-70ef-9f07-2a0961911599" xlink:to="loc_us-gaap_IncreaseDecreaseInDeferredRevenue_019fd25a-c789-7fcd-bf40-2f906d4ddeb2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherOperatingCapitalNet_019fd25a-c789-7ce6-89e5-6192e1d4535b" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInOtherOperatingCapitalNet"/>
    <link:calculationArc order="15" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019fd25a-c789-70ef-9f07-2a0961911599" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherOperatingCapitalNet_019fd25a-c789-7ce6-89e5-6192e1d4535b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForOtherOperatingActivities_019fd25a-c789-72e2-a465-54004dcb1f1a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsForOtherOperatingActivities"/>
    <link:calculationArc order="16" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019fd25a-c789-70ef-9f07-2a0961911599" xlink:to="loc_us-gaap_PaymentsForOtherOperatingActivities_019fd25a-c789-72e2-a465-54004dcb1f1a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnSaleOfBusiness_019fd25a-c789-7d33-a67a-301da3365728" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_GainLossOnSaleOfBusiness"/>
    <link:calculationArc order="17" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019fd25a-c789-70ef-9f07-2a0961911599" xlink:to="loc_us-gaap_GainLossOnSaleOfBusiness_019fd25a-c789-7d33-a67a-301da3365728" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnSaleOfInvestments_01a18833-0100-72a0-a939-94c8c7ff0851" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_GainLossOnSaleOfInvestments"/>
    <link:calculationArc order="18" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019fd25a-c789-70ef-9f07-2a0961911599" xlink:to="loc_us-gaap_GainLossOnSaleOfInvestments_01a18833-0100-72a0-a939-94c8c7ff0851" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019fd25a-c789-7933-813c-689ad2653c2a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019fd25a-c789-765c-a920-ed4f3b5760f5" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019fd25a-c789-7933-813c-689ad2653c2a" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019fd25a-c789-765c-a920-ed4f3b5760f5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019fd25a-c789-78ba-9fd9-534608cb24c9" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019fd25a-c789-7933-813c-689ad2653c2a" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019fd25a-c789-78ba-9fd9-534608cb24c9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019fd25a-c789-7e0a-a668-ab361b118cec" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019fd25a-c789-7933-813c-689ad2653c2a" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019fd25a-c789-7e0a-a668-ab361b118cec" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_019fd25a-c789-75bc-bc3d-b5e11d000b7d" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019fd25a-c789-7933-813c-689ad2653c2a" xlink:to="loc_us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_019fd25a-c789-75bc-bc3d-b5e11d000b7d" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/FinancialInstrumentsComponentsofCashCashEquivalentsandInvestmentsDetails" xlink:type="simple" xlink:href="cgnx-20261004.xsd#FinancialInstrumentsComponentsofCashCashEquivalentsandInvestmentsDetails"/>
  <link:calculationLink xlink:role="http://www.cognex.com/role/FinancialInstrumentsComponentsofCashCashEquivalentsandInvestmentsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_CashCashEquivalentsShortTermAndLongTermInvestmentsFairValue_019fd25a-c789-7c8f-b52e-85e95f17fd9a" xlink:href="cgnx-20261004.xsd#cgnx_CashCashEquivalentsShortTermAndLongTermInvestmentsFairValue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_019fd25a-c789-7e9e-a141-81482603d9ec" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_cgnx_CashCashEquivalentsShortTermAndLongTermInvestmentsFairValue_019fd25a-c789-7c8f-b52e-85e95f17fd9a" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_019fd25a-c789-7e9e-a141-81482603d9ec" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsFairValueDisclosure_019fd25a-c789-77af-b793-c6f95adcbe92" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CashAndCashEquivalentsFairValueDisclosure"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_cgnx_CashCashEquivalentsShortTermAndLongTermInvestmentsFairValue_019fd25a-c789-7c8f-b52e-85e95f17fd9a" xlink:to="loc_us-gaap_CashAndCashEquivalentsFairValueDisclosure_019fd25a-c789-77af-b793-c6f95adcbe92" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_CashCashEquivalentsShortTermAndLongTermInvestments_019fd25a-c789-7776-8930-24c53d0cf22c" xlink:href="cgnx-20261004.xsd#cgnx_CashCashEquivalentsShortTermAndLongTermInvestments"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_019fd25a-c789-75d3-a72e-6b92017b1c74" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_cgnx_CashCashEquivalentsShortTermAndLongTermInvestments_019fd25a-c789-7776-8930-24c53d0cf22c" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_019fd25a-c789-75d3-a72e-6b92017b1c74" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_019fd25a-c789-77e5-a968-d88920d9434e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_cgnx_CashCashEquivalentsShortTermAndLongTermInvestments_019fd25a-c789-7776-8930-24c53d0cf22c" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_019fd25a-c789-77e5-a968-d88920d9434e" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/FinancialInstrumentsGrossUnrealizedLossesandFairValuesforAvailableforSaleInvestmentsDetails" xlink:type="simple" xlink:href="cgnx-20261004.xsd#FinancialInstrumentsGrossUnrealizedLossesandFairValuesforAvailableforSaleInvestmentsDetails"/>
  <link:calculationLink xlink:role="http://www.cognex.com/role/FinancialInstrumentsGrossUnrealizedLossesandFairValuesforAvailableforSaleInvestmentsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition_019fd25a-c789-7c62-9a4b-943a73aaad8e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_019fd25a-c789-7b94-b513-793bdf025919" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition_019fd25a-c789-7c62-9a4b-943a73aaad8e" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_019fd25a-c789-7b94-b513-793bdf025919" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_019fd25a-c789-798c-845a-f1afc6c412b4" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition_019fd25a-c789-7c62-9a4b-943a73aaad8e" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_019fd25a-c789-798c-845a-f1afc6c412b4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss_019fd25a-c789-7f1d-b4cd-e3a4d72f026f" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_019fd25a-c789-745c-97be-4e07b1bad6bd" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss_019fd25a-c789-7f1d-b4cd-e3a4d72f026f" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_019fd25a-c789-745c-97be-4e07b1bad6bd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_019fd25a-c789-7f66-9132-9aa6a126f2c5" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss_019fd25a-c789-7f1d-b4cd-e3a4d72f026f" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_019fd25a-c789-7f66-9132-9aa6a126f2c5" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/FinancialInstrumentsEffectiveMaturityDatesofAvailableforSaleInvestmentsDetails" xlink:type="simple" xlink:href="cgnx-20261004.xsd#FinancialInstrumentsEffectiveMaturityDatesofAvailableforSaleInvestmentsDetails"/>
  <link:calculationLink xlink:role="http://www.cognex.com/role/FinancialInstrumentsEffectiveMaturityDatesofAvailableforSaleInvestmentsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_019fd25a-c789-7c3b-bb28-71b5c3f5aeda" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_019fd25a-c789-7ce5-9a44-092a70cfba0d" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_019fd25a-c789-7c3b-bb28-71b5c3f5aeda" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_019fd25a-c789-7ce5-9a44-092a70cfba0d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterOneYearBeforeTwoYearsFairValue_019fd25a-c789-77ce-bfe8-f7b67bd92f9c" xlink:href="cgnx-20261004.xsd#cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterOneYearBeforeTwoYearsFairValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_019fd25a-c789-7c3b-bb28-71b5c3f5aeda" xlink:to="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterOneYearBeforeTwoYearsFairValue_019fd25a-c789-77ce-bfe8-f7b67bd92f9c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterTwoYearsBeforeThreeYearsFairValue_019fd25a-c789-7eec-886d-85d53b155161" xlink:href="cgnx-20261004.xsd#cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterTwoYearsBeforeThreeYearsFairValue"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_019fd25a-c789-7c3b-bb28-71b5c3f5aeda" xlink:to="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterTwoYearsBeforeThreeYearsFairValue_019fd25a-c789-7eec-886d-85d53b155161" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterThreeYearsBeforeFourYearsFairValue_019fd25a-c789-74ff-af9a-43a4de5363da" xlink:href="cgnx-20261004.xsd#cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterThreeYearsBeforeFourYearsFairValue"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_019fd25a-c789-7c3b-bb28-71b5c3f5aeda" xlink:to="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterThreeYearsBeforeFourYearsFairValue_019fd25a-c789-74ff-af9a-43a4de5363da" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterFourYearsBeforeFiveYearsFairValue_019fd25a-c789-7996-8f1e-6d71580e85d2" xlink:href="cgnx-20261004.xsd#cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterFourYearsBeforeFiveYearsFairValue"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_019fd25a-c789-7c3b-bb28-71b5c3f5aeda" xlink:to="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterFourYearsBeforeFiveYearsFairValue_019fd25a-c789-7996-8f1e-6d71580e85d2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveYearsBeforeEightYearsFairValue_019fd25a-c789-7186-b857-f149f7d6f54e" xlink:href="cgnx-20261004.xsd#cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveYearsBeforeEightYearsFairValue"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_019fd25a-c789-7c3b-bb28-71b5c3f5aeda" xlink:to="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveYearsBeforeEightYearsFairValue_019fd25a-c789-7186-b857-f149f7d6f54e" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/FinancialInstrumentsAssetsandliabilitiespresentedonanetbasisduetotherightofoffsetDetails" xlink:type="simple" xlink:href="cgnx-20261004.xsd#FinancialInstrumentsAssetsandliabilitiespresentedonanetbasisduetotherightofoffsetDetails"/>
  <link:calculationLink xlink:role="http://www.cognex.com/role/FinancialInstrumentsAssetsandliabilitiespresentedonanetbasisduetotherightofoffsetDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssets_019fd25a-c789-7938-a80d-c5f39580f18c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeAssets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeAsset_019fd25a-c789-7410-a087-d545d86304dd" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeFairValueOfDerivativeAsset"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeAssets_019fd25a-c789-7938-a80d-c5f39580f18c" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeAsset_019fd25a-c789-7410-a087-d545d86304dd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetCollateralObligationToReturnCashOffset_019fd25a-c789-7ce5-8c88-05912943695e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeAssetCollateralObligationToReturnCashOffset"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeAssets_019fd25a-c789-7938-a80d-c5f39580f18c" xlink:to="loc_us-gaap_DerivativeAssetCollateralObligationToReturnCashOffset_019fd25a-c789-7ce5-8c88-05912943695e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilities_019fd25a-c789-7691-9dc6-c4568644faa4" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeLiabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeLiability_019fd25a-c789-7fa5-807d-350a834196a8" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeFairValueOfDerivativeLiability"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeLiabilities_019fd25a-c789-7691-9dc6-c4568644faa4" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeLiability_019fd25a-c789-7fa5-807d-350a834196a8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilityCollateralRightToReclaimCashOffset_019fd25a-c789-776a-ab05-7bf11edc4508" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeLiabilityCollateralRightToReclaimCashOffset"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeLiabilities_019fd25a-c789-7691-9dc6-c4568644faa4" xlink:to="loc_us-gaap_DerivativeLiabilityCollateralRightToReclaimCashOffset_019fd25a-c789-776a-ab05-7bf11edc4508" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/InventoriesDetails" xlink:type="simple" xlink:href="cgnx-20261004.xsd#InventoriesDetails"/>
  <link:calculationLink xlink:role="http://www.cognex.com/role/InventoriesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryNet_019fd25a-c789-7a10-89ef-b9f7d86bb9e5" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InventoryNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryRawMaterialsNetOfReserves_019fd25a-c789-73ed-8b33-cba5ea757cef" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InventoryRawMaterialsNetOfReserves"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_InventoryNet_019fd25a-c789-7a10-89ef-b9f7d86bb9e5" xlink:to="loc_us-gaap_InventoryRawMaterialsNetOfReserves_019fd25a-c789-73ed-8b33-cba5ea757cef" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryWorkInProcessNetOfReserves_019fd25a-c789-7387-9eb2-78e5ea1a4c4c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InventoryWorkInProcessNetOfReserves"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_InventoryNet_019fd25a-c789-7a10-89ef-b9f7d86bb9e5" xlink:to="loc_us-gaap_InventoryWorkInProcessNetOfReserves_019fd25a-c789-7387-9eb2-78e5ea1a4c4c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryFinishedGoodsNetOfReserves_019fd25a-c789-780c-84e5-ba88431c4ba6" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InventoryFinishedGoodsNetOfReserves"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_InventoryNet_019fd25a-c789-7a10-89ef-b9f7d86bb9e5" xlink:to="loc_us-gaap_InventoryFinishedGoodsNetOfReserves_019fd25a-c789-780c-84e5-ba88431c4ba6" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/GoodwillandIntangibleAssetsAmortizedAssetsandFutureAmortizationExpenseDetails" xlink:type="simple" xlink:href="cgnx-20261004.xsd#GoodwillandIntangibleAssetsAmortizedAssetsandFutureAmortizationExpenseDetails"/>
  <link:calculationLink xlink:role="http://www.cognex.com/role/GoodwillandIntangibleAssetsAmortizedAssetsandFutureAmortizationExpenseDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019fd25a-c789-73e7-9093-c7a0afececec" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FiniteLivedIntangibleAssetsNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsGross_019fd25a-c789-7141-a7ec-9200655fe703" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FiniteLivedIntangibleAssetsGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019fd25a-c789-73e7-9093-c7a0afececec" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsGross_019fd25a-c789-7141-a7ec-9200655fe703" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_019fd25a-c789-7697-9f70-8a293734008a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019fd25a-c789-73e7-9093-c7a0afececec" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_019fd25a-c789-7697-9f70-8a293734008a" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/GoodwillandIntangibleAssetsAmortizedAssetsandFutureAmortizationExpenseDetails_1" xlink:type="simple" xlink:href="cgnx-20261004.xsd#GoodwillandIntangibleAssetsAmortizedAssetsandFutureAmortizationExpenseDetails_1"/>
  <link:calculationLink xlink:role="http://www.cognex.com/role/GoodwillandIntangibleAssetsAmortizedAssetsandFutureAmortizationExpenseDetails_1" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019fd25a-c789-7f57-80b5-9a9971e6ec0c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FiniteLivedIntangibleAssetsNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour_019fd25a-c789-7abb-8c01-bc5d06aa0a6a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019fd25a-c789-7f57-80b5-9a9971e6ec0c" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour_019fd25a-c789-7abb-8c01-bc5d06aa0a6a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths_019fd25a-c789-7026-b067-37a1a17dcd6c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019fd25a-c789-7f57-80b5-9a9971e6ec0c" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths_019fd25a-c789-7026-b067-37a1a17dcd6c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo_019fd25a-c789-7d5a-a61d-b747b36cd043" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019fd25a-c789-7f57-80b5-9a9971e6ec0c" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo_019fd25a-c789-7d5a-a61d-b747b36cd043" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree_019fd25a-c789-7d69-b434-14997dc5dc51" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019fd25a-c789-7f57-80b5-9a9971e6ec0c" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree_019fd25a-c789-7d69-b434-14997dc5dc51" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFive_019fd25a-c789-74ad-a668-d12e063a3bd5" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFive"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019fd25a-c789-7f57-80b5-9a9971e6ec0c" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFive_019fd25a-c789-74ad-a668-d12e063a3bd5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseRemainderOfFiscalYear_019fd25a-c789-74d6-a9d0-e6ea6447c2f1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseRemainderOfFiscalYear"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019fd25a-c789-7f57-80b5-9a9971e6ec0c" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseRemainderOfFiscalYear_019fd25a-c789-74d6-a9d0-e6ea6447c2f1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseAfterYearFive_019fd25a-c789-7901-a2aa-650eb4fbea7c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseAfterYearFive"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019fd25a-c789-7f57-80b5-9a9971e6ec0c" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseAfterYearFive_019fd25a-c789-7901-a2aa-650eb4fbea7c" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/EarningsperShareCalculationofWeightedAverageSharesDetails" xlink:type="simple" xlink:href="cgnx-20261004.xsd#EarningsperShareCalculationofWeightedAverageSharesDetails"/>
  <link:calculationLink xlink:role="http://www.cognex.com/role/EarningsperShareCalculationofWeightedAverageSharesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_019fd25a-c789-7498-bb6a-6163fd296430" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_019fd25a-c789-76ce-ad95-20d0f1e8e06c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingBasic"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_019fd25a-c789-7498-bb6a-6163fd296430" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_019fd25a-c789-76ce-ad95-20d0f1e8e06c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment_019fd25a-c789-7f08-adce-443618100f1c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_019fd25a-c789-7498-bb6a-6163fd296430" xlink:to="loc_us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment_019fd25a-c789-7f08-adce-443618100f1c" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/SegmentInformationDisaggregationofSegmentExpensesDetails" xlink:type="simple" xlink:href="cgnx-20261004.xsd#SegmentInformationDisaggregationofSegmentExpensesDetails"/>
  <link:calculationLink xlink:role="http://www.cognex.com/role/SegmentInformationDisaggregationofSegmentExpensesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ResearchAndDevelopmentExpense_019fd25a-c789-7aa5-9af6-dee666c36ea0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ResearchAndDevelopmentExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherSellingGeneralAndAdministrativeExpense_019fd25a-c789-7ebf-88ae-09e781930c9f" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherSellingGeneralAndAdministrativeExpense"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_ResearchAndDevelopmentExpense_019fd25a-c789-7aa5-9af6-dee666c36ea0" xlink:to="loc_us-gaap_OtherSellingGeneralAndAdministrativeExpense_019fd25a-c789-7ebf-88ae-09e781930c9f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_IncentiveCompensationExpenseBonusAndSalesCommissions_019fd25a-c789-7fad-b64a-cf5875472206" xlink:href="cgnx-20261004.xsd#cgnx_IncentiveCompensationExpenseBonusAndSalesCommissions"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_ResearchAndDevelopmentExpense_019fd25a-c789-7aa5-9af6-dee666c36ea0" xlink:to="loc_cgnx_IncentiveCompensationExpenseBonusAndSalesCommissions_019fd25a-c789-7fad-b64a-cf5875472206" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AllocatedShareBasedCompensationExpense_019fd25a-c789-711d-bbf9-977d8521b733" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AllocatedShareBasedCompensationExpense"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_ResearchAndDevelopmentExpense_019fd25a-c789-7aa5-9af6-dee666c36ea0" xlink:to="loc_us-gaap_AllocatedShareBasedCompensationExpense_019fd25a-c789-711d-bbf9-977d8521b733" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LaborAndRelatedExpense_019fd25a-c789-7469-a746-e89e0840f003" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LaborAndRelatedExpense"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_ResearchAndDevelopmentExpense_019fd25a-c789-7aa5-9af6-dee666c36ea0" xlink:to="loc_us-gaap_LaborAndRelatedExpense_019fd25a-c789-7469-a746-e89e0840f003" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_019fd25a-c789-75f9-a9e5-7280ebb4a552" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DepreciationDepletionAndAmortization"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_ResearchAndDevelopmentExpense_019fd25a-c789-7aa5-9af6-dee666c36ea0" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_019fd25a-c789-75f9-a9e5-7280ebb4a552" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_019fd25a-c789-7672-8205-201a0e3bf5a4" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SellingGeneralAndAdministrativeExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LaborAndRelatedExpense_019fd25a-c789-7865-a8e5-1581efdb2f5a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LaborAndRelatedExpense"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_SellingGeneralAndAdministrativeExpense_019fd25a-c789-7672-8205-201a0e3bf5a4" xlink:to="loc_us-gaap_LaborAndRelatedExpense_019fd25a-c789-7865-a8e5-1581efdb2f5a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherSellingGeneralAndAdministrativeExpense_019fd25a-c789-706b-8e8f-9f04f7ab74c9" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherSellingGeneralAndAdministrativeExpense"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_SellingGeneralAndAdministrativeExpense_019fd25a-c789-7672-8205-201a0e3bf5a4" xlink:to="loc_us-gaap_OtherSellingGeneralAndAdministrativeExpense_019fd25a-c789-706b-8e8f-9f04f7ab74c9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AllocatedShareBasedCompensationExpense_019fd25a-c789-7e4f-8120-3b4ec756873e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AllocatedShareBasedCompensationExpense"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_SellingGeneralAndAdministrativeExpense_019fd25a-c789-7672-8205-201a0e3bf5a4" xlink:to="loc_us-gaap_AllocatedShareBasedCompensationExpense_019fd25a-c789-7e4f-8120-3b4ec756873e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_IncentiveCompensationExpenseBonusAndSalesCommissions_019fd25a-c789-7862-8db5-7deb0b325c8e" xlink:href="cgnx-20261004.xsd#cgnx_IncentiveCompensationExpenseBonusAndSalesCommissions"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_SellingGeneralAndAdministrativeExpense_019fd25a-c789-7672-8205-201a0e3bf5a4" xlink:to="loc_cgnx_IncentiveCompensationExpenseBonusAndSalesCommissions_019fd25a-c789-7862-8db5-7deb0b325c8e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_019fd25a-c789-701e-82d2-958b3ee679a8" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DepreciationDepletionAndAmortization"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_SellingGeneralAndAdministrativeExpense_019fd25a-c789-7672-8205-201a0e3bf5a4" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_019fd25a-c789-701e-82d2-958b3ee679a8" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/BusinessDisposalScheduleofMajorAssetsandLiabilitiesIncludedasPartofDisposalGroupDetails" xlink:type="simple" xlink:href="cgnx-20261004.xsd#BusinessDisposalScheduleofMajorAssetsandLiabilitiesIncludedasPartofDisposalGroupDetails"/>
  <link:calculationLink xlink:role="http://www.cognex.com/role/BusinessDisposalScheduleofMajorAssetsandLiabilitiesIncludedasPartofDisposalGroupDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsOfDisposalGroupIncludingDiscontinuedOperation_019fd25a-c789-7fec-9f2d-1c2cd0f838d5" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AssetsOfDisposalGroupIncludingDiscontinuedOperation"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupIncludingDiscontinuedOperationInventory1_019fd25a-c789-7acd-8f47-dd2056d48fef" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DisposalGroupIncludingDiscontinuedOperationInventory1"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsOfDisposalGroupIncludingDiscontinuedOperation_019fd25a-c789-7fec-9f2d-1c2cd0f838d5" xlink:to="loc_us-gaap_DisposalGroupIncludingDiscontinuedOperationInventory1_019fd25a-c789-7acd-8f47-dd2056d48fef" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupIncludingDiscontinuedOperationGoodwill1_019fd25a-c789-7635-b1f4-a7a889244a92" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DisposalGroupIncludingDiscontinuedOperationGoodwill1"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsOfDisposalGroupIncludingDiscontinuedOperation_019fd25a-c789-7fec-9f2d-1c2cd0f838d5" xlink:to="loc_us-gaap_DisposalGroupIncludingDiscontinuedOperationGoodwill1_019fd25a-c789-7635-b1f4-a7a889244a92" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupIncludingDiscontinuedOperationIntangibleAssets_019fd25a-c789-7cda-a342-ae941922979e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DisposalGroupIncludingDiscontinuedOperationIntangibleAssets"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsOfDisposalGroupIncludingDiscontinuedOperation_019fd25a-c789-7fec-9f2d-1c2cd0f838d5" xlink:to="loc_us-gaap_DisposalGroupIncludingDiscontinuedOperationIntangibleAssets_019fd25a-c789-7cda-a342-ae941922979e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesOfDisposalGroupIncludingDiscontinuedOperation_019fd25a-c789-7ae5-9291-7a64ba0e66ca" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LiabilitiesOfDisposalGroupIncludingDiscontinuedOperation"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupIncludingDiscontinuedOperationAccruedLiabilities_019fd25a-c789-7685-bf68-cf7a96c3ee64" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DisposalGroupIncludingDiscontinuedOperationAccruedLiabilities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesOfDisposalGroupIncludingDiscontinuedOperation_019fd25a-c789-7ae5-9291-7a64ba0e66ca" xlink:to="loc_us-gaap_DisposalGroupIncludingDiscontinuedOperationAccruedLiabilities_019fd25a-c789-7685-bf68-cf7a96c3ee64" xlink:type="arc"/>
  </link:calculationLink>
</link:linkbase>
