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

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2026 Workiva-->
<!--r:019dff0b-c3c9-7ee8-8c59-ebf4da2fce87,g:e4dbf352-24e5-40a4-8696-207b06439ffb-->
<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-20260705.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_019dff0b-c48b-7654-8176-d84128d3bad3" 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_019dff0b-c48b-7217-a20a-6d16e663f381" 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_019dff0b-c48b-7654-8176-d84128d3bad3" xlink:to="loc_us-gaap_GrossProfit_019dff0b-c48b-7217-a20a-6d16e663f381" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_019dff0b-c48b-79cf-923e-2101249b8bc6" 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_019dff0b-c48b-7654-8176-d84128d3bad3" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_019dff0b-c48b-79cf-923e-2101249b8bc6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ResearchAndDevelopmentExpense_019dff0b-c48b-72d8-b9e1-79a9b57e3a60" 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_019dff0b-c48b-7654-8176-d84128d3bad3" xlink:to="loc_us-gaap_ResearchAndDevelopmentExpense_019dff0b-c48b-72d8-b9e1-79a9b57e3a60" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossProfit_019dff0b-c48b-78e1-9219-4d6046b2e98c" 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_019dff0b-c48b-7e21-aba9-4e1eb8e9f370" 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_019dff0b-c48b-78e1-9219-4d6046b2e98c" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_019dff0b-c48b-7e21-aba9-4e1eb8e9f370" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfGoodsAndServicesSold_019dff0b-c48b-7882-90bb-20e23cb23e39" 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_019dff0b-c48b-78e1-9219-4d6046b2e98c" xlink:to="loc_us-gaap_CostOfGoodsAndServicesSold_019dff0b-c48b-7882-90bb-20e23cb23e39" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019dff0b-c48b-7ed2-ba7c-055a496e101f" 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_019dff0b-c48b-7a9e-b629-85f749d2d95b" 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_019dff0b-c48b-7ed2-ba7c-055a496e101f" xlink:to="loc_us-gaap_OperatingIncomeLoss_019dff0b-c48b-7a9e-b629-85f749d2d95b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ForeignCurrencyTransactionGainLossBeforeTax_019dff0b-c48b-7f2c-aa38-3a7f7a58096e" 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_019dff0b-c48b-7ed2-ba7c-055a496e101f" xlink:to="loc_us-gaap_ForeignCurrencyTransactionGainLossBeforeTax_019dff0b-c48b-7f2c-aa38-3a7f7a58096e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeNonoperating_019dff0b-c48b-7d0d-bf8f-234678f76141" 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_019dff0b-c48b-7ed2-ba7c-055a496e101f" xlink:to="loc_us-gaap_InvestmentIncomeNonoperating_019dff0b-c48b-7d0d-bf8f-234678f76141" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_019dff0b-c48b-70f7-91a3-a8740a846b71" 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_019dff0b-c48b-7ed2-ba7c-055a496e101f" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_019dff0b-c48b-70f7-91a3-a8740a846b71" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_019dff0b-c48b-7647-820c-0eecbe4ee1fd" 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_019dff0b-c48b-7aec-8103-86f0031d176e" 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_019dff0b-c48b-7647-820c-0eecbe4ee1fd" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019dff0b-c48b-7aec-8103-86f0031d176e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_019dff0b-c48b-78c2-abb2-7ebad3493c01" 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_019dff0b-c48b-7647-820c-0eecbe4ee1fd" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_019dff0b-c48b-78c2-abb2-7ebad3493c01" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/ConsolidatedStatementsofComprehensiveIncomeLoss" xlink:type="simple" xlink:href="cgnx-20260705.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_ComprehensiveIncomeNetOfTax_019dff0b-c48b-74cf-93ad-110f51164c05" 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_019dff0b-c48b-75ce-a0aa-eb8552ee4840" 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_019dff0b-c48b-74cf-93ad-110f51164c05" xlink:to="loc_us-gaap_NetIncomeLoss_019dff0b-c48b-75ce-a0aa-eb8552ee4840" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_019dff0b-c48b-77fe-b141-70d03618460a" 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_019dff0b-c48b-74cf-93ad-110f51164c05" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_019dff0b-c48b-77fe-b141-70d03618460a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent_019dff0b-c48b-7a45-9c72-145fdfbe49e1" 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_019dff0b-c48b-78cf-a21f-a8d72f16cc38" 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_019dff0b-c48b-7a45-9c72-145fdfbe49e1" xlink:to="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax_019dff0b-c48b-78cf-a21f-a8d72f16cc38" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax_019dff0b-c48b-7fd7-890f-443c1b734caf" 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_019dff0b-c48b-7a45-9c72-145fdfbe49e1" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax_019dff0b-c48b-7fd7-890f-443c1b734caf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_019dff0b-c48b-710e-8651-eefec17d69e4" 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_019dff0b-c48b-760a-af92-fd24273afece" 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_019dff0b-c48b-710e-8651-eefec17d69e4" xlink:to="loc_us-gaap_OtherComprehensiveIncomeForeignCurrencyTransactionAndTranslationAdjustmentNetOfTaxPortionAttributableToParent_019dff0b-c48b-760a-af92-fd24273afece" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent_019dff0b-c48b-7a45-a492-4cd4db3bc0fe" 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_019dff0b-c48b-710e-8651-eefec17d69e4" xlink:to="loc_us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent_019dff0b-c48b-7a45-a492-4cd4db3bc0fe" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/ConsolidatedBalanceSheets" xlink:type="simple" xlink:href="cgnx-20260705.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_019dff0b-c48b-7da0-a02e-6d1a088a6943" 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_019dff0b-c48b-71d9-a338-1db2807e95a2" 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_019dff0b-c48b-7da0-a02e-6d1a088a6943" xlink:to="loc_us-gaap_AccountsPayableCurrent_019dff0b-c48b-71d9-a338-1db2807e95a2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_019dff0b-c48b-7fa1-884f-1791549899c7" 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_019dff0b-c48b-7da0-a02e-6d1a088a6943" xlink:to="loc_us-gaap_AccruedLiabilitiesCurrent_019dff0b-c48b-7fa1-884f-1791549899c7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedIncomeTaxesCurrent_019dff0b-c48b-76a9-ab34-74fb83a84010" 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_019dff0b-c48b-7da0-a02e-6d1a088a6943" xlink:to="loc_us-gaap_AccruedIncomeTaxesCurrent_019dff0b-c48b-76a9-ab34-74fb83a84010" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerLiabilityCurrent_019dff0b-c48b-7d98-b828-abfa288115aa" 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_019dff0b-c48b-7da0-a02e-6d1a088a6943" xlink:to="loc_us-gaap_ContractWithCustomerLiabilityCurrent_019dff0b-c48b-7d98-b828-abfa288115aa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_019dff0b-c48b-7ffe-866d-9e20ddc7dec6" 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_019dff0b-c48b-7da0-a02e-6d1a088a6943" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_019dff0b-c48b-7ffe-866d-9e20ddc7dec6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_019dff0b-c48b-72ea-a2d7-6b4967f6dcd2" 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_019dff0b-c48b-7eff-b859-0f198328ef83" 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_019dff0b-c48b-72ea-a2d7-6b4967f6dcd2" xlink:to="loc_us-gaap_AdditionalPaidInCapitalCommonStock_019dff0b-c48b-7eff-b859-0f198328ef83" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_019dff0b-c48b-7b73-80ec-590cbdb9124c" 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_019dff0b-c48b-72ea-a2d7-6b4967f6dcd2" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_019dff0b-c48b-7b73-80ec-590cbdb9124c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_019dff0b-c48b-7232-830c-4c5387d702a2" 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_019dff0b-c48b-72ea-a2d7-6b4967f6dcd2" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_019dff0b-c48b-7232-830c-4c5387d702a2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockValueOutstanding_019dff0b-c48b-75ab-b8c8-18d7ca2e0c8c" 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_019dff0b-c48b-72ea-a2d7-6b4967f6dcd2" xlink:to="loc_us-gaap_PreferredStockValueOutstanding_019dff0b-c48b-75ab-b8c8-18d7ca2e0c8c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValueOutstanding_019dff0b-c48b-7b82-9cf5-526b8fd850a3" 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_019dff0b-c48b-72ea-a2d7-6b4967f6dcd2" xlink:to="loc_us-gaap_CommonStockValueOutstanding_019dff0b-c48b-7b82-9cf5-526b8fd850a3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_019dff0b-c48b-7c06-ad87-4021da5ef23f" 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_019dff0b-c48b-7d99-bfc7-8ccc1e10ac5f" 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_019dff0b-c48b-7c06-ad87-4021da5ef23f" xlink:to="loc_us-gaap_AssetsCurrent_019dff0b-c48b-7d99-bfc7-8ccc1e10ac5f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermInvestments_019dff0b-c48b-7c4e-8898-541f194fe1a5" 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_019dff0b-c48b-7c06-ad87-4021da5ef23f" xlink:to="loc_us-gaap_LongTermInvestments_019dff0b-c48b-7c4e-8898-541f194fe1a5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_019dff0b-c48b-723f-952d-74bdc02c77a9" 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_019dff0b-c48b-7c06-ad87-4021da5ef23f" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_019dff0b-c48b-723f-952d-74bdc02c77a9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_019dff0b-c48b-77f0-ace3-1611d0646106" 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_019dff0b-c48b-7c06-ad87-4021da5ef23f" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_019dff0b-c48b-77f0-ace3-1611d0646106" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_019dff0b-c48b-70be-833c-792c19c44229" 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_019dff0b-c48b-7c06-ad87-4021da5ef23f" xlink:to="loc_us-gaap_Goodwill_019dff0b-c48b-70be-833c-792c19c44229" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019dff0b-c48b-7aae-89b0-f6eae271d37f" 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_019dff0b-c48b-7c06-ad87-4021da5ef23f" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019dff0b-c48b-7aae-89b0-f6eae271d37f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_019dff0b-c48b-73dc-b7d0-9ecb537e20a6" 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_019dff0b-c48b-7c06-ad87-4021da5ef23f" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_019dff0b-c48b-73dc-b7d0-9ecb537e20a6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_019dff0b-c48b-7b17-b8cc-c1797bcec200" 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_019dff0b-c48b-7c06-ad87-4021da5ef23f" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_019dff0b-c48b-7b17-b8cc-c1797bcec200" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_019dff0b-c48b-74a3-81e6-6c485146d0f9" 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_019dff0b-c48b-7215-a8e0-94db333beb08" 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_019dff0b-c48b-74a3-81e6-6c485146d0f9" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_019dff0b-c48b-7215-a8e0-94db333beb08" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecuritiesCurrent_019dff0b-c48b-749b-a709-548a3dda5ab4" 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_019dff0b-c48b-74a3-81e6-6c485146d0f9" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecuritiesCurrent_019dff0b-c48b-749b-a709-548a3dda5ab4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsReceivableNetCurrent_019dff0b-c48b-799d-bd81-318e28f53387" 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_019dff0b-c48b-74a3-81e6-6c485146d0f9" xlink:to="loc_us-gaap_AccountsReceivableNetCurrent_019dff0b-c48b-799d-bd81-318e28f53387" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UnbilledReceivablesCurrent_019dff0b-c48b-78de-9d29-d934cdbc4f9d" 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_019dff0b-c48b-74a3-81e6-6c485146d0f9" xlink:to="loc_us-gaap_UnbilledReceivablesCurrent_019dff0b-c48b-78de-9d29-d934cdbc4f9d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryNet_019dff0b-c48b-7b4c-8265-9805cb40273e" 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_019dff0b-c48b-74a3-81e6-6c485146d0f9" xlink:to="loc_us-gaap_InventoryNet_019dff0b-c48b-7b4c-8265-9805cb40273e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_019dff0b-c48b-7926-b6d0-c366d4d0101f" 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_019dff0b-c48b-74a3-81e6-6c485146d0f9" xlink:to="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_019dff0b-c48b-7926-b6d0-c366d4d0101f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_019dff0b-c48b-7fec-922a-22c04bb1239f" 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_019dff0b-c48b-7eb0-9b8e-055e0b7401d2" 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_019dff0b-c48b-7fec-922a-22c04bb1239f" xlink:to="loc_us-gaap_LiabilitiesCurrent_019dff0b-c48b-7eb0-9b8e-055e0b7401d2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_019dff0b-c48b-77f1-8279-56691855729f" 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_019dff0b-c48b-7fec-922a-22c04bb1239f" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_019dff0b-c48b-77f1-8279-56691855729f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_019dff0b-c48b-7a97-bcea-ae9ef8167850" 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_019dff0b-c48b-7fec-922a-22c04bb1239f" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_019dff0b-c48b-7a97-bcea-ae9ef8167850" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilityForUncertainTaxPositionsNoncurrent_019dff0b-c48b-7a39-bd7d-374a97e9cc8d" 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_019dff0b-c48b-7fec-922a-22c04bb1239f" xlink:to="loc_us-gaap_LiabilityForUncertainTaxPositionsNoncurrent_019dff0b-c48b-7a39-bd7d-374a97e9cc8d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesNoncurrent_019dff0b-c48b-7fef-8c9d-e134a2351dcf" 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_019dff0b-c48b-7fec-922a-22c04bb1239f" xlink:to="loc_us-gaap_OtherLiabilitiesNoncurrent_019dff0b-c48b-7fef-8c9d-e134a2351dcf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_019dff0b-c48b-70dd-ae67-86c81766f6a8" 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_019dff0b-c48b-7ca9-9c63-db51ac72e188" 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_019dff0b-c48b-70dd-ae67-86c81766f6a8" xlink:to="loc_us-gaap_Liabilities_019dff0b-c48b-7ca9-9c63-db51ac72e188" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommitmentsAndContingencies_019dff0b-c48b-7741-87ae-bcc210ad354b" 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_019dff0b-c48b-70dd-ae67-86c81766f6a8" xlink:to="loc_us-gaap_CommitmentsAndContingencies_019dff0b-c48b-7741-87ae-bcc210ad354b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_019dff0b-c48b-7ce4-8b0f-22f4317aa680" 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_019dff0b-c48b-70dd-ae67-86c81766f6a8" xlink:to="loc_us-gaap_StockholdersEquity_019dff0b-c48b-7ce4-8b0f-22f4317aa680" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/ConsolidatedStatementsofCashFlows" xlink:type="simple" xlink:href="cgnx-20260705.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_NetCashProvidedByUsedInOperatingActivities_019dff0b-c48b-7ba0-b4a2-1bea358ab27e" 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_019dff0b-c48b-7964-8919-35ce06368bea" 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_019dff0b-c48b-7ba0-b4a2-1bea358ab27e" xlink:to="loc_us-gaap_NetIncomeLoss_019dff0b-c48b-7964-8919-35ce06368bea" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockOptionPlanExpense_019dff0b-c48b-796a-afa2-08f29300bd89" 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_019dff0b-c48b-7ba0-b4a2-1bea358ab27e" xlink:to="loc_us-gaap_StockOptionPlanExpense_019dff0b-c48b-796a-afa2-08f29300bd89" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Depreciation_019dff0b-c48b-7c33-b009-e88c3934f9bd" 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_019dff0b-c48b-7ba0-b4a2-1bea358ab27e" xlink:to="loc_us-gaap_Depreciation_019dff0b-c48b-7c33-b009-e88c3934f9bd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AmortizationOfIntangibleAssets_019dff0b-c48b-7385-b75c-1a73f329b8ab" 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_019dff0b-c48b-7ba0-b4a2-1bea358ab27e" xlink:to="loc_us-gaap_AmortizationOfIntangibleAssets_019dff0b-c48b-7385-b75c-1a73f329b8ab" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_ExcessAndObsoleteInventoryCharges_019dff0b-c48b-7532-8ec7-69b8b63d7631" xlink:href="cgnx-20260705.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_019dff0b-c48b-7ba0-b4a2-1bea358ab27e" xlink:to="loc_cgnx_ExcessAndObsoleteInventoryCharges_019dff0b-c48b-7532-8ec7-69b8b63d7631" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInDeferredIncomeTaxes_019dff0b-c48b-7523-8b6b-9fd66bf98e17" 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_019dff0b-c48b-7ba0-b4a2-1bea358ab27e" xlink:to="loc_us-gaap_IncreaseDecreaseInDeferredIncomeTaxes_019dff0b-c48b-7523-8b6b-9fd66bf98e17" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_019dff0b-c48b-7dad-aaf2-df62a521baf8" 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_019dff0b-c48b-7ba0-b4a2-1bea358ab27e" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_019dff0b-c48b-7dad-aaf2-df62a521baf8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInContractWithCustomerLiability_019dff0b-c48b-7c50-805d-7da735171d06" 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_019dff0b-c48b-7ba0-b4a2-1bea358ab27e" xlink:to="loc_us-gaap_IncreaseDecreaseInContractWithCustomerLiability_019dff0b-c48b-7c50-805d-7da735171d06" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInInventories_019dff0b-c48b-7000-bf64-0c9300243396" 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_019dff0b-c48b-7ba0-b4a2-1bea358ab27e" xlink:to="loc_us-gaap_IncreaseDecreaseInInventories_019dff0b-c48b-7000-bf64-0c9300243396" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_019dff0b-c48c-78d7-baf3-b5f4941ffd14" 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_019dff0b-c48b-7ba0-b4a2-1bea358ab27e" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_019dff0b-c48c-78d7-baf3-b5f4941ffd14" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayable_019dff0b-c48c-7e95-b11d-ed97ad54dd12" 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_019dff0b-c48b-7ba0-b4a2-1bea358ab27e" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayable_019dff0b-c48c-7e95-b11d-ed97ad54dd12" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_019dff0b-c48c-7cc5-8f3e-0d3c30a94ff2" 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_019dff0b-c48b-7ba0-b4a2-1bea358ab27e" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_019dff0b-c48c-7cc5-8f3e-0d3c30a94ff2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedTaxesPayable_019dff0b-c48c-750d-9644-fd9b93ed0c60" 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_019dff0b-c48b-7ba0-b4a2-1bea358ab27e" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedTaxesPayable_019dff0b-c48c-750d-9644-fd9b93ed0c60" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInDeferredRevenue_019dff0b-c48c-7f1d-859b-b77eaf9f9713" 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_019dff0b-c48b-7ba0-b4a2-1bea358ab27e" xlink:to="loc_us-gaap_IncreaseDecreaseInDeferredRevenue_019dff0b-c48c-7f1d-859b-b77eaf9f9713" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherOperatingCapitalNet_019dff0b-c48c-702d-b67d-ec146f2d827b" 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_019dff0b-c48b-7ba0-b4a2-1bea358ab27e" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherOperatingCapitalNet_019dff0b-c48c-702d-b67d-ec146f2d827b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForOtherOperatingActivities_019dff0b-c48c-703b-8398-0aec6b1499de" 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_019dff0b-c48b-7ba0-b4a2-1bea358ab27e" xlink:to="loc_us-gaap_PaymentsForOtherOperatingActivities_019dff0b-c48c-703b-8398-0aec6b1499de" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnSaleOfBusiness_019dff0b-c48c-781e-9eed-c9b78417e224" 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_019dff0b-c48b-7ba0-b4a2-1bea358ab27e" xlink:to="loc_us-gaap_GainLossOnSaleOfBusiness_019dff0b-c48c-781e-9eed-c9b78417e224" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019dff0b-c48b-7e8f-9693-efbb8b088654" 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_019dff0b-c48b-7aeb-8970-40a0cca374fb" xlink:href="cgnx-20260705.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_019dff0b-c48b-7e8f-9693-efbb8b088654" xlink:to="loc_cgnx_ProceedsPaymentsIssuanceOfSharesShareBasedPaymentArrangementIncludingOptionExercisedNet_019dff0b-c48b-7aeb-8970-40a0cca374fb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_019dff0b-c48b-7c56-9ecd-a1da0c4662b9" 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_019dff0b-c48b-7e8f-9693-efbb8b088654" xlink:to="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_019dff0b-c48b-7c56-9ecd-a1da0c4662b9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_PaymentOfExciseTaxPriorYearCommonStockRepurchases_019fb48e-70df-793c-b1aa-0b803846d566" xlink:href="cgnx-20260705.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_019dff0b-c48b-7e8f-9693-efbb8b088654" xlink:to="loc_cgnx_PaymentOfExciseTaxPriorYearCommonStockRepurchases_019fb48e-70df-793c-b1aa-0b803846d566" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsOfDividendsCommonStock_019dff0b-c48b-75f7-ab69-b4dce96d44cb" 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_019dff0b-c48b-7e8f-9693-efbb8b088654" xlink:to="loc_us-gaap_PaymentsOfDividendsCommonStock_019dff0b-c48b-75f7-ab69-b4dce96d44cb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019dff0b-c48b-703f-8244-8a7369a4865e" 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_019dff0b-c48b-7dc7-921c-088dc344012e" 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_019dff0b-c48b-703f-8244-8a7369a4865e" xlink:to="loc_us-gaap_PaymentsToAcquireInvestments_019dff0b-c48b-7dc7-921c-088dc344012e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleMaturityAndCollectionsOfInvestments_019dff0b-c48b-7fad-a052-5f8dfc29ddf2" 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_019dff0b-c48b-703f-8244-8a7369a4865e" xlink:to="loc_us-gaap_ProceedsFromSaleMaturityAndCollectionsOfInvestments_019dff0b-c48b-7fad-a052-5f8dfc29ddf2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromDivestitureOfBusinesses_019dff0b-c48b-7c93-9e1f-6e7d09386e70" 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_019dff0b-c48b-703f-8244-8a7369a4865e" xlink:to="loc_us-gaap_ProceedsFromDivestitureOfBusinesses_019dff0b-c48b-7c93-9e1f-6e7d09386e70" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_019dff0b-c48b-7f93-8599-1889909ecab6" 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_019dff0b-c48b-703f-8244-8a7369a4865e" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_019dff0b-c48b-7f93-8599-1889909ecab6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019dff0b-c48b-78be-bea0-fa2897a9abe1" 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_019dff0b-c48b-76d7-88a5-5fcb675ef915" 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_019dff0b-c48b-78be-bea0-fa2897a9abe1" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019dff0b-c48b-76d7-88a5-5fcb675ef915" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019dff0b-c48b-70e7-8022-0bcb95391f7a" 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_019dff0b-c48b-78be-bea0-fa2897a9abe1" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019dff0b-c48b-70e7-8022-0bcb95391f7a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019dff0b-c48b-710e-8b63-8e74767152ce" 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_019dff0b-c48b-78be-bea0-fa2897a9abe1" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019dff0b-c48b-710e-8b63-8e74767152ce" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_019dff0b-c48b-7059-b23e-a6a86338246c" 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_019dff0b-c48b-78be-bea0-fa2897a9abe1" xlink:to="loc_us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_019dff0b-c48b-7059-b23e-a6a86338246c" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/FinancialInstrumentsComponentsofCashCashEquivalentsandInvestmentsDetails" xlink:type="simple" xlink:href="cgnx-20260705.xsd#FinancialInstrumentsComponentsofCashCashEquivalentsandInvestmentsDetails"/>
  <link:calculationLink xlink:role="http://www.cognex.com/role/FinancialInstrumentsComponentsofCashCashEquivalentsandInvestmentsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_CashCashEquivalentsShortTermAndLongTermInvestments_019dff0b-c55e-7dee-b2f9-ee1700402cf1" xlink:href="cgnx-20260705.xsd#cgnx_CashCashEquivalentsShortTermAndLongTermInvestments"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_019dff0b-c55e-7bb5-b266-1bb666cb90b7" 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_019dff0b-c55e-7dee-b2f9-ee1700402cf1" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_019dff0b-c55e-7bb5-b266-1bb666cb90b7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_019dff0b-c55e-7b3d-8391-1ad1a1d178b5" 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_019dff0b-c55e-7dee-b2f9-ee1700402cf1" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_019dff0b-c55e-7b3d-8391-1ad1a1d178b5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_CashCashEquivalentsShortTermAndLongTermInvestmentsFairValue_019dff0b-c55e-7ec7-987a-37c6720e2cdc" xlink:href="cgnx-20260705.xsd#cgnx_CashCashEquivalentsShortTermAndLongTermInvestmentsFairValue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_019dff0b-c55e-7c05-8b79-8ef5037775ac" 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_019dff0b-c55e-7ec7-987a-37c6720e2cdc" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_019dff0b-c55e-7c05-8b79-8ef5037775ac" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsFairValueDisclosure_019dff0b-c55e-7257-b34c-830d96900ded" 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_019dff0b-c55e-7ec7-987a-37c6720e2cdc" xlink:to="loc_us-gaap_CashAndCashEquivalentsFairValueDisclosure_019dff0b-c55e-7257-b34c-830d96900ded" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/FinancialInstrumentsGrossUnrealizedLossesandFairValuesforAvailableforSaleInvestmentsDetails" xlink:type="simple" xlink:href="cgnx-20260705.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_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss_019dff0b-c55e-7b9c-8ec1-947054c46445" 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_019dff0b-c55e-7fb1-8918-b6a2a0d8b1bb" 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_019dff0b-c55e-7b9c-8ec1-947054c46445" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_019dff0b-c55e-7fb1-8918-b6a2a0d8b1bb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_019dff0b-c55e-771a-8ceb-4b7bf6f41d89" 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_019dff0b-c55e-7b9c-8ec1-947054c46445" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_019dff0b-c55e-771a-8ceb-4b7bf6f41d89" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition_019dff0b-c55e-78ca-b1b6-01a3a3db6d5c" 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_019dff0b-c55e-7681-8477-a4ce7a79b279" 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_019dff0b-c55e-78ca-b1b6-01a3a3db6d5c" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_019dff0b-c55e-7681-8477-a4ce7a79b279" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_019dff0b-c55e-7f10-806d-b09711c232de" 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_019dff0b-c55e-78ca-b1b6-01a3a3db6d5c" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_019dff0b-c55e-7f10-806d-b09711c232de" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/FinancialInstrumentsEffectiveMaturityDatesofAvailableforSaleInvestmentsDetails" xlink:type="simple" xlink:href="cgnx-20260705.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_019dff0b-c55e-786c-8cbb-2442c5f9809e" 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_019dff0b-c55e-78c3-9d3d-67e32052e2e7" 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_019dff0b-c55e-786c-8cbb-2442c5f9809e" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_019dff0b-c55e-78c3-9d3d-67e32052e2e7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterOneYearBeforeTwoYearsFairValue_019dff0b-c55e-74fe-b58f-a249ee9f7559" xlink:href="cgnx-20260705.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_019dff0b-c55e-786c-8cbb-2442c5f9809e" xlink:to="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterOneYearBeforeTwoYearsFairValue_019dff0b-c55e-74fe-b58f-a249ee9f7559" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterTwoYearsBeforeThreeYearsFairValue_019dff0b-c55e-7d47-9561-c8ff8766f04b" xlink:href="cgnx-20260705.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_019dff0b-c55e-786c-8cbb-2442c5f9809e" xlink:to="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterTwoYearsBeforeThreeYearsFairValue_019dff0b-c55e-7d47-9561-c8ff8766f04b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterThreeYearsBeforeFourYearsFairValue_019dff0b-c55e-7c2e-b7d6-d98d62bee44a" xlink:href="cgnx-20260705.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_019dff0b-c55e-786c-8cbb-2442c5f9809e" xlink:to="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterThreeYearsBeforeFourYearsFairValue_019dff0b-c55e-7c2e-b7d6-d98d62bee44a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterFourYearsBeforeFiveYearsFairValue_019dff0b-c55e-7295-83b8-605a9702f39d" xlink:href="cgnx-20260705.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_019dff0b-c55e-786c-8cbb-2442c5f9809e" xlink:to="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterFourYearsBeforeFiveYearsFairValue_019dff0b-c55e-7295-83b8-605a9702f39d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveYearsBeforeEightYearsFairValue_019dff0b-c55e-7031-b42e-85a111404bc4" xlink:href="cgnx-20260705.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_019dff0b-c55e-786c-8cbb-2442c5f9809e" xlink:to="loc_cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveYearsBeforeEightYearsFairValue_019dff0b-c55e-7031-b42e-85a111404bc4" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/FinancialInstrumentsAssetsandliabilitiespresentedonanetbasisduetotherightofoffsetDetails" xlink:type="simple" xlink:href="cgnx-20260705.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_019dff0b-c55e-78a3-819e-e517dd33add4" 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_019dff0b-c55e-7366-aee4-6d0020504610" 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_019dff0b-c55e-78a3-819e-e517dd33add4" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeAsset_019dff0b-c55e-7366-aee4-6d0020504610" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetCollateralObligationToReturnCashOffset_019dff0b-c55e-7496-8c62-3407a985b3f9" 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_019dff0b-c55e-78a3-819e-e517dd33add4" xlink:to="loc_us-gaap_DerivativeAssetCollateralObligationToReturnCashOffset_019dff0b-c55e-7496-8c62-3407a985b3f9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilities_019dff0b-c55e-77de-ba9d-d0836d243a06" 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_019dff0b-c55e-74a9-b65a-aae0706dc6b6" 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_019dff0b-c55e-77de-ba9d-d0836d243a06" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeLiability_019dff0b-c55e-74a9-b65a-aae0706dc6b6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilityCollateralRightToReclaimCashOffset_019dff0b-c55e-7bf6-818e-37f21fe453e0" 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_019dff0b-c55e-77de-ba9d-d0836d243a06" xlink:to="loc_us-gaap_DerivativeLiabilityCollateralRightToReclaimCashOffset_019dff0b-c55e-7bf6-818e-37f21fe453e0" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/InventoriesDetails" xlink:type="simple" xlink:href="cgnx-20260705.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_019dff0b-c55e-7e37-98e0-6e6b4c28b944" 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_019dff0b-c55e-7081-b8d9-cb431e4722dc" 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_019dff0b-c55e-7e37-98e0-6e6b4c28b944" xlink:to="loc_us-gaap_InventoryRawMaterialsNetOfReserves_019dff0b-c55e-7081-b8d9-cb431e4722dc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryWorkInProcessNetOfReserves_019dff0b-c55e-7f88-acfd-b00847999175" 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_019dff0b-c55e-7e37-98e0-6e6b4c28b944" xlink:to="loc_us-gaap_InventoryWorkInProcessNetOfReserves_019dff0b-c55e-7f88-acfd-b00847999175" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryFinishedGoodsNetOfReserves_019dff0b-c55e-75bc-b4d5-b610a2992bea" 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_019dff0b-c55e-7e37-98e0-6e6b4c28b944" xlink:to="loc_us-gaap_InventoryFinishedGoodsNetOfReserves_019dff0b-c55e-75bc-b4d5-b610a2992bea" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/GoodwillandIntangibleAssetsAmortizedAssetsandFutureAmortizationExpenseDetails" xlink:type="simple" xlink:href="cgnx-20260705.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_019dff0b-c55e-7c49-a0c9-5c952872fc12" 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_019dff0b-c55e-7594-8362-e9c684591bc7" 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_019dff0b-c55e-7c49-a0c9-5c952872fc12" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsGross_019dff0b-c55e-7594-8362-e9c684591bc7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_019dff0b-c55e-7ea0-9be6-17cb50805b97" 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_019dff0b-c55e-7c49-a0c9-5c952872fc12" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_019dff0b-c55e-7ea0-9be6-17cb50805b97" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/GoodwillandIntangibleAssetsAmortizedAssetsandFutureAmortizationExpenseDetails_1" xlink:type="simple" xlink:href="cgnx-20260705.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_019dff0b-c55e-77e8-8a15-2ee05f018c1a" 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_019dff0b-c55e-7454-91dd-e30f0127afbe" 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_019dff0b-c55e-77e8-8a15-2ee05f018c1a" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour_019dff0b-c55e-7454-91dd-e30f0127afbe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths_019dff0b-c55e-77e4-9fd7-e5e73cda645f" 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_019dff0b-c55e-77e8-8a15-2ee05f018c1a" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths_019dff0b-c55e-77e4-9fd7-e5e73cda645f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo_019dff0b-c55e-785a-9774-d5affb1f3adf" 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_019dff0b-c55e-77e8-8a15-2ee05f018c1a" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo_019dff0b-c55e-785a-9774-d5affb1f3adf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree_019dff0b-c55e-7d5f-82b7-1311d2b07f6f" 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_019dff0b-c55e-77e8-8a15-2ee05f018c1a" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree_019dff0b-c55e-7d5f-82b7-1311d2b07f6f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFive_019dff0b-c55e-75fd-8e68-c14bef00e3e4" 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_019dff0b-c55e-77e8-8a15-2ee05f018c1a" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFive_019dff0b-c55e-75fd-8e68-c14bef00e3e4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseRemainderOfFiscalYear_019dff0b-c55e-71f9-b444-48aea480665e" 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_019dff0b-c55e-77e8-8a15-2ee05f018c1a" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseRemainderOfFiscalYear_019dff0b-c55e-71f9-b444-48aea480665e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseAfterYearFive_019dff0b-c55e-79ca-ae5f-e7d9b2dbcf1a" 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_019dff0b-c55e-77e8-8a15-2ee05f018c1a" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseAfterYearFive_019dff0b-c55e-79ca-ae5f-e7d9b2dbcf1a" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/EarningsperShareCalculationofWeightedAverageSharesDetails" xlink:type="simple" xlink:href="cgnx-20260705.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_019dff0b-c55f-70d6-a3a9-722b1abaed72" 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_019dff0b-c55f-7e8e-85f2-b9a744e1462a" 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_019dff0b-c55f-70d6-a3a9-722b1abaed72" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_019dff0b-c55f-7e8e-85f2-b9a744e1462a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment_019dff0b-c55f-78bf-831d-eff8e62de6ac" 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_019dff0b-c55f-70d6-a3a9-722b1abaed72" xlink:to="loc_us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment_019dff0b-c55f-78bf-831d-eff8e62de6ac" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/SegmentInformationDisaggregationofSegmentExpensesDetails" xlink:type="simple" xlink:href="cgnx-20260705.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_SellingGeneralAndAdministrativeExpense_019dff0b-c55f-7afb-a2bb-4c8652d873ef" 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_019dff0b-c55f-7e1f-80c2-47cfe154e336" 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_019dff0b-c55f-7afb-a2bb-4c8652d873ef" xlink:to="loc_us-gaap_LaborAndRelatedExpense_019dff0b-c55f-7e1f-80c2-47cfe154e336" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherSellingGeneralAndAdministrativeExpense_019dff0b-c55f-7578-ba14-d375382262f3" 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_019dff0b-c55f-7afb-a2bb-4c8652d873ef" xlink:to="loc_us-gaap_OtherSellingGeneralAndAdministrativeExpense_019dff0b-c55f-7578-ba14-d375382262f3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AllocatedShareBasedCompensationExpense_019dff0b-c55f-7896-984f-628e7e695534" 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_019dff0b-c55f-7afb-a2bb-4c8652d873ef" xlink:to="loc_us-gaap_AllocatedShareBasedCompensationExpense_019dff0b-c55f-7896-984f-628e7e695534" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_IncentiveCompensationExpenseBonusAndSalesCommissions_019dff0b-c55f-7830-89ee-c5d2077d01ee" xlink:href="cgnx-20260705.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_019dff0b-c55f-7afb-a2bb-4c8652d873ef" xlink:to="loc_cgnx_IncentiveCompensationExpenseBonusAndSalesCommissions_019dff0b-c55f-7830-89ee-c5d2077d01ee" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_019dff0b-c55f-708b-a3f7-c625362f6a2f" 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_019dff0b-c55f-7afb-a2bb-4c8652d873ef" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_019dff0b-c55f-708b-a3f7-c625362f6a2f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ResearchAndDevelopmentExpense_019dff0b-c55f-775b-8da2-0027f1fa0fb5" 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_019dff0b-c55f-7d36-9d5f-b0b7efda91a1" 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_019dff0b-c55f-775b-8da2-0027f1fa0fb5" xlink:to="loc_us-gaap_OtherSellingGeneralAndAdministrativeExpense_019dff0b-c55f-7d36-9d5f-b0b7efda91a1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_cgnx_IncentiveCompensationExpenseBonusAndSalesCommissions_019dff0b-c55f-779a-b65d-a0eba2599e06" xlink:href="cgnx-20260705.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_019dff0b-c55f-775b-8da2-0027f1fa0fb5" xlink:to="loc_cgnx_IncentiveCompensationExpenseBonusAndSalesCommissions_019dff0b-c55f-779a-b65d-a0eba2599e06" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AllocatedShareBasedCompensationExpense_019dff0b-c55f-74b2-b871-fad7e0266ba0" 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_019dff0b-c55f-775b-8da2-0027f1fa0fb5" xlink:to="loc_us-gaap_AllocatedShareBasedCompensationExpense_019dff0b-c55f-74b2-b871-fad7e0266ba0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LaborAndRelatedExpense_019dff0b-c55f-72b2-996b-84898c8a3eaa" 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_019dff0b-c55f-775b-8da2-0027f1fa0fb5" xlink:to="loc_us-gaap_LaborAndRelatedExpense_019dff0b-c55f-72b2-996b-84898c8a3eaa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_019dff0b-c55f-7f88-bf06-a35ff824e854" 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_019dff0b-c55f-775b-8da2-0027f1fa0fb5" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_019dff0b-c55f-7f88-bf06-a35ff824e854" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.cognex.com/role/BusinessDisposalScheduleofMajorAssetsandLiabilitiesIncludedasPartofDisposalGroupDetails" xlink:type="simple" xlink:href="cgnx-20260705.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_019dff0b-c55f-72dc-8096-889fb05c01e8" 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_019dff0b-c55f-7fa5-b330-0f2e7f7c89da" 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_019dff0b-c55f-72dc-8096-889fb05c01e8" xlink:to="loc_us-gaap_DisposalGroupIncludingDiscontinuedOperationInventory1_019dff0b-c55f-7fa5-b330-0f2e7f7c89da" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupIncludingDiscontinuedOperationGoodwill1_019dff0b-c55f-759e-a481-f6e3094c2cb9" 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_019dff0b-c55f-72dc-8096-889fb05c01e8" xlink:to="loc_us-gaap_DisposalGroupIncludingDiscontinuedOperationGoodwill1_019dff0b-c55f-759e-a481-f6e3094c2cb9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisposalGroupIncludingDiscontinuedOperationIntangibleAssets_019dff0b-c55f-7f42-966b-b04b71d7ab80" 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_019dff0b-c55f-72dc-8096-889fb05c01e8" xlink:to="loc_us-gaap_DisposalGroupIncludingDiscontinuedOperationIntangibleAssets_019dff0b-c55f-7f42-966b-b04b71d7ab80" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesOfDisposalGroupIncludingDiscontinuedOperation_019dff0b-c55f-76ba-8b46-314dd418a3f4" 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_019dff0b-c55f-7c0a-bbcf-1ea245ee274a" 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_019dff0b-c55f-76ba-8b46-314dd418a3f4" xlink:to="loc_us-gaap_DisposalGroupIncludingDiscontinuedOperationAccruedLiabilities_019dff0b-c55f-7c0a-bbcf-1ea245ee274a" xlink:type="arc"/>
  </link:calculationLink>
</link:linkbase>
