<?xml version="1.0" encoding="US-ASCII"?>
<!--XBRL Document Created with Wdesk from Workiva-->
<!-- -->
<link:linkbase xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd" 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">
  <link:roleRef roleURI="http://www.sanmina.com/role/AccountingPoliciesPolicies" xlink:href="sanm-20191228.xsd#AccountingPoliciesPolicies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/CondensedConsolidatedBalanceSheets" xlink:href="sanm-20191228.xsd#CondensedConsolidatedBalanceSheets" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/CondensedConsolidatedBalanceSheetsParentheticals" xlink:href="sanm-20191228.xsd#CondensedConsolidatedBalanceSheetsParentheticals" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/CondensedConsolidatedStatementOfComprehensiveIncome" xlink:href="sanm-20191228.xsd#CondensedConsolidatedStatementOfComprehensiveIncome" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/CondensedConsolidatedStatementsOfCashFlows" xlink:href="sanm-20191228.xsd#CondensedConsolidatedStatementsOfCashFlows" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/CondensedConsolidatedStatementsOfIncome" xlink:href="sanm-20191228.xsd#CondensedConsolidatedStatementsOfIncome" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/CondensedConsolidatedStatementsOfStockholdersEquityStatement" xlink:href="sanm-20191228.xsd#CondensedConsolidatedStatementsOfStockholdersEquityStatement" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/DocumentAndEntityInformationDocument" xlink:href="sanm-20191228.xsd#DocumentAndEntityInformationDocument" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note10IncomeTax" xlink:href="sanm-20191228.xsd#Note10IncomeTax" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note10IncomeTaxDetails" xlink:href="sanm-20191228.xsd#Note10IncomeTaxDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note11DerivativesDetails" xlink:href="sanm-20191228.xsd#Note11DerivativesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note11StockRepurchaseDetails" xlink:href="sanm-20191228.xsd#Note11StockRepurchaseDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note11StockholdersEquity" xlink:href="sanm-20191228.xsd#Note11StockholdersEquity" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note11StockholdersEquityDetails" xlink:href="sanm-20191228.xsd#Note11StockholdersEquityDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note11StockholdersEquityTables" xlink:href="sanm-20191228.xsd#Note11StockholdersEquityTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note12BusinessSegmentGeographicAndCustomerInformation" xlink:href="sanm-20191228.xsd#Note12BusinessSegmentGeographicAndCustomerInformation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note12BusinessSegmentGeographicAndCustomerInformationTables" xlink:href="sanm-20191228.xsd#Note12BusinessSegmentGeographicAndCustomerInformationTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note12RevenueAndGrossProfitBySegmentDetails" xlink:href="sanm-20191228.xsd#Note12RevenueAndGrossProfitBySegmentDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note12SegmentReportingByGeographicSegmentDetails" xlink:href="sanm-20191228.xsd#Note12SegmentReportingByGeographicSegmentDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note13EarningsPerShare" xlink:href="sanm-20191228.xsd#Note13EarningsPerShare" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note13EarningsPerShareDetails" xlink:href="sanm-20191228.xsd#Note13EarningsPerShareDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note13EarningsPerShareTables" xlink:href="sanm-20191228.xsd#Note13EarningsPerShareTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note14AdditionalInformationDetails" xlink:href="sanm-20191228.xsd#Note14AdditionalInformationDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note14RestrictedStockRollforwardDetails" xlink:href="sanm-20191228.xsd#Note14RestrictedStockRollforwardDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note14ShareBasedCompensationArrangementsDetails" xlink:href="sanm-20191228.xsd#Note14ShareBasedCompensationArrangementsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note14SharesAuthorizedForFutureIssuanceAndAvailableForGrantDetails" xlink:href="sanm-20191228.xsd#Note14SharesAuthorizedForFutureIssuanceAndAvailableForGrantDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note14StockBasedCompensation" xlink:href="sanm-20191228.xsd#Note14StockBasedCompensation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note14StockBasedCompensationTables" xlink:href="sanm-20191228.xsd#Note14StockBasedCompensationTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note14UnrecognizedStockBasedCompensationExpenseDetails" xlink:href="sanm-20191228.xsd#Note14UnrecognizedStockBasedCompensationExpenseDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note1BasisOfPresentation" xlink:href="sanm-20191228.xsd#Note1BasisOfPresentation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note1BasisOfPresentationDetails" xlink:href="sanm-20191228.xsd#Note1BasisOfPresentationDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note2Inventories" xlink:href="sanm-20191228.xsd#Note2Inventories" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note2InventoriesDetails" xlink:href="sanm-20191228.xsd#Note2InventoriesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note2InventoriesTables" xlink:href="sanm-20191228.xsd#Note2InventoriesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note3DisagregationOfRevenueDetails" xlink:href="sanm-20191228.xsd#Note3DisagregationOfRevenueDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note3RevenueRecognition" xlink:href="sanm-20191228.xsd#Note3RevenueRecognition" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note3RevenueRecognitionTables" xlink:href="sanm-20191228.xsd#Note3RevenueRecognitionTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note4DerivativeFinancialInstrumentsTables" xlink:href="sanm-20191228.xsd#Note4DerivativeFinancialInstrumentsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note4DerivativesDetails" xlink:href="sanm-20191228.xsd#Note4DerivativesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note4FairValueDetails" xlink:href="sanm-20191228.xsd#Note4FairValueDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note4FinancialInstruments" xlink:href="sanm-20191228.xsd#Note4FinancialInstruments" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note5Debt" xlink:href="sanm-20191228.xsd#Note5Debt" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note5DebtScheduleDetails" xlink:href="sanm-20191228.xsd#Note5DebtScheduleDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note5DebtTables" xlink:href="sanm-20191228.xsd#Note5DebtTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note5LineOfCreditFacilityDetails" xlink:href="sanm-20191228.xsd#Note5LineOfCreditFacilityDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note6FutureLeaseLiabilityDetails" xlink:href="sanm-20191228.xsd#Note6FutureLeaseLiabilityDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note6LeaseCostDetails" xlink:href="sanm-20191228.xsd#Note6LeaseCostDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note6Leases" xlink:href="sanm-20191228.xsd#Note6Leases" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note6LeasesDetail" xlink:href="sanm-20191228.xsd#Note6LeasesDetail" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note6LeasesTables" xlink:href="sanm-20191228.xsd#Note6LeasesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note6LesseeLeaseDescriptionDetails" xlink:href="sanm-20191228.xsd#Note6LesseeLeaseDescriptionDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note7AccountsReceivableSaleProgram" xlink:href="sanm-20191228.xsd#Note7AccountsReceivableSaleProgram" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note7AccountsReceivableSaleProgramDetails" xlink:href="sanm-20191228.xsd#Note7AccountsReceivableSaleProgramDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note8CommitmentsAndContingencies" xlink:href="sanm-20191228.xsd#Note8CommitmentsAndContingencies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note8ContingenciesDetails" xlink:href="sanm-20191228.xsd#Note8ContingenciesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note9Restructuring" xlink:href="sanm-20191228.xsd#Note9Restructuring" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note9RestructuringAndRelatedActivitiesTables" xlink:href="sanm-20191228.xsd#Note9RestructuringAndRelatedActivitiesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note9RestructuringDetails" xlink:href="sanm-20191228.xsd#Note9RestructuringDetails" xlink:type="simple" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/AccountingPoliciesPolicies" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/CondensedConsolidatedBalanceSheets" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_Assets" xlink:label="loc_us-gaap_Assets_17ef3f41-42f7-52c0-cba1-93e7e0e1116a" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AssetsCurrent" xlink:label="loc_us-gaap_AssetsCurrent_0b3bd361-d592-2906-279e-2682647fdd27" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_17ef3f41-42f7-52c0-cba1-93e7e0e1116a" xlink:to="loc_us-gaap_AssetsCurrent_0b3bd361-d592-2906-279e-2682647fdd27" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_1de780cc-9607-daa3-0bed-03c88ae94769" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_0b3bd361-d592-2906-279e-2682647fdd27" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_1de780cc-9607-daa3-0bed-03c88ae94769" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AccountsAndOtherReceivablesNetCurrent" xlink:label="loc_us-gaap_AccountsAndOtherReceivablesNetCurrent_0ae8fd7c-c7fc-4ed0-1719-a62b1bcb2109" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_0b3bd361-d592-2906-279e-2682647fdd27" xlink:to="loc_us-gaap_AccountsAndOtherReceivablesNetCurrent_0ae8fd7c-c7fc-4ed0-1719-a62b1bcb2109" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ContractWithCustomerAssetNetCurrent" xlink:label="loc_us-gaap_ContractWithCustomerAssetNetCurrent_fcc3b672-6260-acd3-7f04-cb65043e671c" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_0b3bd361-d592-2906-279e-2682647fdd27" xlink:to="loc_us-gaap_ContractWithCustomerAssetNetCurrent_fcc3b672-6260-acd3-7f04-cb65043e671c" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_InventoryNet" xlink:label="loc_us-gaap_InventoryNet_cc720f44-4c90-5acc-2e7e-b88e80f2af28" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_0b3bd361-d592-2906-279e-2682647fdd27" xlink:to="loc_us-gaap_InventoryNet_cc720f44-4c90-5acc-2e7e-b88e80f2af28" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PrepaidExpenseAndOtherAssetsCurrent" xlink:label="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_5fd9c643-899e-95d7-aab9-c3a9d6240218" xlink:type="locator" />
    <link:calculationArc order="5" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_0b3bd361-d592-2906-279e-2682647fdd27" xlink:to="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_5fd9c643-899e-95d7-aab9-c3a9d6240218" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_4246ec24-1a4c-19dd-57c9-32d4a8e0cbaa" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_17ef3f41-42f7-52c0-cba1-93e7e0e1116a" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_4246ec24-1a4c-19dd-57c9-32d4a8e0cbaa" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DeferredIncomeTaxAssetsNet" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_60654fa3-82c2-3e38-ce88-436acda713ac" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_17ef3f41-42f7-52c0-cba1-93e7e0e1116a" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_60654fa3-82c2-3e38-ce88-436acda713ac" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherAssetsNoncurrent" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_bd8545de-cfc2-6f31-bff6-ed0d4012c357" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_17ef3f41-42f7-52c0-cba1-93e7e0e1116a" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_bd8545de-cfc2-6f31-bff6-ed0d4012c357" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LiabilitiesAndStockholdersEquity" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_d7f1ad03-6ed4-706a-15fc-eae794dee33a" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LiabilitiesCurrent" xlink:label="loc_us-gaap_LiabilitiesCurrent_30dca50d-a7bd-cff0-949a-3d7ae869c50d" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_d7f1ad03-6ed4-706a-15fc-eae794dee33a" xlink:to="loc_us-gaap_LiabilitiesCurrent_30dca50d-a7bd-cff0-949a-3d7ae869c50d" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AccountsPayableCurrent" xlink:label="loc_us-gaap_AccountsPayableCurrent_9c889623-7b4f-c89a-bbb3-2bc9fb9ad9f5" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_30dca50d-a7bd-cff0-949a-3d7ae869c50d" xlink:to="loc_us-gaap_AccountsPayableCurrent_9c889623-7b4f-c89a-bbb3-2bc9fb9ad9f5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherLiabilitiesCurrent" xlink:label="loc_us-gaap_OtherLiabilitiesCurrent_ebb4c1f8-b5df-aab0-ee90-1e91fd21cf92" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_30dca50d-a7bd-cff0-949a-3d7ae869c50d" xlink:to="loc_us-gaap_OtherLiabilitiesCurrent_ebb4c1f8-b5df-aab0-ee90-1e91fd21cf92" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_EmployeeRelatedLiabilitiesCurrent" xlink:label="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_a2b836a7-cc87-0e4f-38a0-c91a29535622" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_30dca50d-a7bd-cff0-949a-3d7ae869c50d" xlink:to="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_a2b836a7-cc87-0e4f-38a0-c91a29535622" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtCurrent" xlink:label="loc_us-gaap_DebtCurrent_1417330d-29f9-c4e9-abb6-2898d623f603" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_30dca50d-a7bd-cff0-949a-3d7ae869c50d" xlink:to="loc_us-gaap_DebtCurrent_1417330d-29f9-c4e9-abb6-2898d623f603" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LiabilitiesNoncurrent" xlink:label="loc_us-gaap_LiabilitiesNoncurrent_dd41e762-f7ac-df9a-4912-590eca3f6a48" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_d7f1ad03-6ed4-706a-15fc-eae794dee33a" xlink:to="loc_us-gaap_LiabilitiesNoncurrent_dd41e762-f7ac-df9a-4912-590eca3f6a48" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LongTermDebtNoncurrent" xlink:label="loc_us-gaap_LongTermDebtNoncurrent_aa2e73c1-d03e-7f76-3502-7a650f99607c" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesNoncurrent_dd41e762-f7ac-df9a-4912-590eca3f6a48" xlink:to="loc_us-gaap_LongTermDebtNoncurrent_aa2e73c1-d03e-7f76-3502-7a650f99607c" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherLiabilitiesNoncurrent" xlink:label="loc_us-gaap_OtherLiabilitiesNoncurrent_8c850143-cd0c-0f85-9038-e19d8c4f7808" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesNoncurrent_dd41e762-f7ac-df9a-4912-590eca3f6a48" xlink:to="loc_us-gaap_OtherLiabilitiesNoncurrent_8c850143-cd0c-0f85-9038-e19d8c4f7808" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_StockholdersEquity" xlink:label="loc_us-gaap_StockholdersEquity_4b9904d8-8624-0dbb-a949-29ff2cf808a8" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_d7f1ad03-6ed4-706a-15fc-eae794dee33a" xlink:to="loc_us-gaap_StockholdersEquity_4b9904d8-8624-0dbb-a949-29ff2cf808a8" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.sanmina.com/role/CondensedConsolidatedBalanceSheetsParentheticals" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/CondensedConsolidatedStatementOfComprehensiveIncome" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ComprehensiveIncomeNetOfTax" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_5c8b3520-1ca2-0a91-0912-70d62831826c" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_e170ce1e-c3a8-e8ee-88b0-37e8dd7b1d11" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_5c8b3520-1ca2-0a91-0912-70d62831826c" xlink:to="loc_us-gaap_NetIncomeLoss_e170ce1e-c3a8-e8ee-88b0-37e8dd7b1d11" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_5e0cb0dc-b25c-aaae-62f8-cb90f31a16a1" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_5c8b3520-1ca2-0a91-0912-70d62831826c" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_5e0cb0dc-b25c-aaae-62f8-cb90f31a16a1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansNetOfTax_e0994e64-4a16-23a5-f507-55cb5ada37eb" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_5e0cb0dc-b25c-aaae-62f8-cb90f31a16a1" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansNetOfTax_e0994e64-4a16-23a5-f507-55cb5ada37eb" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeReclassificationAdjustmentsNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeReclassificationAdjustmentsNetOfTax_cdfc366b-a5f3-6bba-8c34-2aa2ab578085" xlink:type="locator" />
    <link:calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_5e0cb0dc-b25c-aaae-62f8-cb90f31a16a1" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeReclassificationAdjustmentsNetOfTax_cdfc366b-a5f3-6bba-8c34-2aa2ab578085" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIOnDerivativesNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIOnDerivativesNetOfTax_93de04c3-ace0-a2f0-c272-f037b3709822" xlink:type="locator" />
    <link:calculationArc order="3" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_5e0cb0dc-b25c-aaae-62f8-cb90f31a16a1" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIOnDerivativesNetOfTax_93de04c3-ace0-a2f0-c272-f037b3709822" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherComprehensiveIncomeUnrealizedGainLossOnDerivativesArisingDuringPeriodNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeUnrealizedGainLossOnDerivativesArisingDuringPeriodNetOfTax_397a475b-0af5-f3eb-f91e-9518c9a0cfd9" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_5e0cb0dc-b25c-aaae-62f8-cb90f31a16a1" xlink:to="loc_us-gaap_OtherComprehensiveIncomeUnrealizedGainLossOnDerivativesArisingDuringPeriodNetOfTax_397a475b-0af5-f3eb-f91e-9518c9a0cfd9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_68a2669c-01f8-c962-bf95-0b4231cd45da" xlink:type="locator" />
    <link:calculationArc order="5" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_5e0cb0dc-b25c-aaae-62f8-cb90f31a16a1" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_68a2669c-01f8-c962-bf95-0b4231cd45da" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.sanmina.com/role/CondensedConsolidatedStatementsOfCashFlows" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_50231013-f048-89e7-0e20-ba139224c5f7" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_50231013-f048-89e7-0e20-ba139224c5f7" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_e170ce1e-c3a8-e8ee-88b0-37e8dd7b1d11" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_NetIncomeLoss_e170ce1e-c3a8-e8ee-88b0-37e8dd7b1d11" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DepreciationDepletionAndAmortization" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_ebef248a-da21-637d-9d28-3d42ff90e8e2" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_ebef248a-da21-637d-9d28-3d42ff90e8e2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ShareBasedCompensation" xlink:label="loc_us-gaap_ShareBasedCompensation_f0b9d825-b0b9-37fd-4d25-9294a8598890" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_ShareBasedCompensation_f0b9d825-b0b9-37fd-4d25-9294a8598890" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit" xlink:label="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_3421bed6-296e-da4e-f0e9-a2a8fa1f6d19" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_3421bed6-296e-da4e-f0e9-a2a8fa1f6d19" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherOperatingActivitiesCashFlowStatement" xlink:label="loc_us-gaap_OtherOperatingActivitiesCashFlowStatement_1571e7d6-d666-48e2-395f-6e58ea563df3" xlink:type="locator" />
    <link:calculationArc order="5" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_OtherOperatingActivitiesCashFlowStatement_1571e7d6-d666-48e2-395f-6e58ea563df3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncreaseDecreaseInAccountsReceivable" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_09b7b41a-f5a1-c45e-d61b-846fff462802" xlink:type="locator" />
    <link:calculationArc order="6" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_09b7b41a-f5a1-c45e-d61b-846fff462802" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncreaseDecreaseInContractWithCustomerAsset" xlink:label="loc_us-gaap_IncreaseDecreaseInContractWithCustomerAsset_591bbf45-d531-0671-adc1-cfca3447af6c" xlink:type="locator" />
    <link:calculationArc order="7" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_IncreaseDecreaseInContractWithCustomerAsset_591bbf45-d531-0671-adc1-cfca3447af6c" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncreaseDecreaseInInventories" xlink:label="loc_us-gaap_IncreaseDecreaseInInventories_f2b34f8d-2445-12ee-2c68-fa0c5409d5e0" xlink:type="locator" />
    <link:calculationArc order="8" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_IncreaseDecreaseInInventories_f2b34f8d-2445-12ee-2c68-fa0c5409d5e0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_dfcbd6f7-83fa-00c2-bd9e-6c5c1de7d890" xlink:type="locator" />
    <link:calculationArc order="9" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_dfcbd6f7-83fa-00c2-bd9e-6c5c1de7d890" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncreaseDecreaseInAccountsPayable" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayable_792166b2-b561-55ef-12fd-ca8b50f64a38" xlink:type="locator" />
    <link:calculationArc order="10" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayable_792166b2-b561-55ef-12fd-ca8b50f64a38" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncreaseDecreaseInOtherOperatingLiabilities" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherOperatingLiabilities_d7de2883-fea4-6e7c-2c8b-7fee9aa34369" xlink:type="locator" />
    <link:calculationArc order="11" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ce0d7b63-a366-bc9b-79e1-780981e428fe" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherOperatingLiabilities_d7de2883-fea4-6e7c-2c8b-7fee9aa34369" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_0f07a806-a2da-6d18-a7a9-d734fad1f3b0" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_50231013-f048-89e7-0e20-ba139224c5f7" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_0f07a806-a2da-6d18-a7a9-d734fad1f3b0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PaymentsToAcquirePropertyPlantAndEquipment" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_0f8df60b-841f-6df5-83c3-e4049d366459" xlink:type="locator" />
    <link:calculationArc order="1" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_0f07a806-a2da-6d18-a7a9-d734fad1f3b0" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_0f8df60b-841f-6df5-83c3-e4049d366459" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment" xlink:label="loc_us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment_6d7a72cc-b15d-447c-3b26-c3564dc5b0b1" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_0f07a806-a2da-6d18-a7a9-d734fad1f3b0" xlink:to="loc_us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment_6d7a72cc-b15d-447c-3b26-c3564dc5b0b1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1efd93c0-bb90-2a64-a997-3a70afaa3faa" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_50231013-f048-89e7-0e20-ba139224c5f7" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1efd93c0-bb90-2a64-a997-3a70afaa3faa" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_RepaymentsOfLongTermDebtAndCapitalSecurities" xlink:label="loc_us-gaap_RepaymentsOfLongTermDebtAndCapitalSecurities_d9fb5934-4f13-92b2-8e44-5640fd135622" xlink:type="locator" />
    <link:calculationArc order="1" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1efd93c0-bb90-2a64-a997-3a70afaa3faa" xlink:to="loc_us-gaap_RepaymentsOfLongTermDebtAndCapitalSecurities_d9fb5934-4f13-92b2-8e44-5640fd135622" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ProceedsFromLinesOfCredit" xlink:label="loc_us-gaap_ProceedsFromLinesOfCredit_2285f3f4-b3a8-b01c-280e-6c886bd81b27" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1efd93c0-bb90-2a64-a997-3a70afaa3faa" xlink:to="loc_us-gaap_ProceedsFromLinesOfCredit_2285f3f4-b3a8-b01c-280e-6c886bd81b27" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_RepaymentsOfLinesOfCredit" xlink:label="loc_us-gaap_RepaymentsOfLinesOfCredit_05859378-438b-57d1-1cca-74dc23f15c9a" xlink:type="locator" />
    <link:calculationArc order="3" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1efd93c0-bb90-2a64-a997-3a70afaa3faa" xlink:to="loc_us-gaap_RepaymentsOfLinesOfCredit_05859378-438b-57d1-1cca-74dc23f15c9a" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PaymentsOfDebtIssuanceCosts" xlink:label="loc_us-gaap_PaymentsOfDebtIssuanceCosts_d03b640f-8d2c-4108-a1c4-1354103a7ee2" xlink:type="locator" />
    <link:calculationArc order="4" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1efd93c0-bb90-2a64-a997-3a70afaa3faa" xlink:to="loc_us-gaap_PaymentsOfDebtIssuanceCosts_d03b640f-8d2c-4108-a1c4-1354103a7ee2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlansIncludingStockOptions" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlansIncludingStockOptions_3b304564-1a0d-03c8-a331-770e72d1f6fc" xlink:type="locator" />
    <link:calculationArc order="5" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1efd93c0-bb90-2a64-a997-3a70afaa3faa" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlansIncludingStockOptions_3b304564-1a0d-03c8-a331-770e72d1f6fc" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PaymentsForRepurchaseOfCommonStock" xlink:label="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_3f804297-91a1-3939-541d-a39b6288c9f9" xlink:type="locator" />
    <link:calculationArc order="6" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1efd93c0-bb90-2a64-a997-3a70afaa3faa" xlink:to="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_3f804297-91a1-3939-541d-a39b6288c9f9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_EffectOfExchangeRateOnCashAndCashEquivalents" xlink:label="loc_us-gaap_EffectOfExchangeRateOnCashAndCashEquivalents_32f0c8eb-accb-9ab7-5d53-b9d2845af404" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_50231013-f048-89e7-0e20-ba139224c5f7" xlink:to="loc_us-gaap_EffectOfExchangeRateOnCashAndCashEquivalents_32f0c8eb-accb-9ab7-5d53-b9d2845af404" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.sanmina.com/role/CondensedConsolidatedStatementsOfIncome" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_e170ce1e-c3a8-e8ee-88b0-37e8dd7b1d11" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments_d71649eb-5769-933d-7982-2a2ada9ea257" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_e170ce1e-c3a8-e8ee-88b0-37e8dd7b1d11" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments_d71649eb-5769-933d-7982-2a2ada9ea257" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NonoperatingIncomeExpense" xlink:label="loc_us-gaap_NonoperatingIncomeExpense_28fe77ae-e122-e428-d718-aff2ad445bc8" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments_d71649eb-5769-933d-7982-2a2ada9ea257" xlink:to="loc_us-gaap_NonoperatingIncomeExpense_28fe77ae-e122-e428-d718-aff2ad445bc8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_InterestAndOtherIncome" xlink:label="loc_us-gaap_InterestAndOtherIncome_96f7f20e-e49e-0553-3bc6-1ab6e52eead0" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NonoperatingIncomeExpense_28fe77ae-e122-e428-d718-aff2ad445bc8" xlink:to="loc_us-gaap_InterestAndOtherIncome_96f7f20e-e49e-0553-3bc6-1ab6e52eead0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_InterestExpense" xlink:label="loc_us-gaap_InterestExpense_16e9f6a6-5524-a7b1-7e7c-73ee97610ec6" xlink:type="locator" />
    <link:calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NonoperatingIncomeExpense_28fe77ae-e122-e428-d718-aff2ad445bc8" xlink:to="loc_us-gaap_InterestExpense_16e9f6a6-5524-a7b1-7e7c-73ee97610ec6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherNonoperatingIncomeExpense" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_7a3a9730-2927-590e-4e76-6aeb4157256e" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NonoperatingIncomeExpense_28fe77ae-e122-e428-d718-aff2ad445bc8" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_7a3a9730-2927-590e-4e76-6aeb4157256e" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OperatingIncomeLoss" xlink:label="loc_us-gaap_OperatingIncomeLoss_8db01d6d-ae17-523f-94b9-8ab4add4a22e" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments_d71649eb-5769-933d-7982-2a2ada9ea257" xlink:to="loc_us-gaap_OperatingIncomeLoss_8db01d6d-ae17-523f-94b9-8ab4add4a22e" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_GrossProfit" xlink:label="loc_us-gaap_GrossProfit_98c25af7-47ba-69a3-12c4-e52bd51b359e" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_8db01d6d-ae17-523f-94b9-8ab4add4a22e" xlink:to="loc_us-gaap_GrossProfit_98c25af7-47ba-69a3-12c4-e52bd51b359e" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_Revenues" xlink:label="loc_us-gaap_Revenues_425ada39-f194-a279-47ac-dd09cf899fb1" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GrossProfit_98c25af7-47ba-69a3-12c4-e52bd51b359e" xlink:to="loc_us-gaap_Revenues_425ada39-f194-a279-47ac-dd09cf899fb1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CostOfGoodsAndServicesSold" xlink:label="loc_us-gaap_CostOfGoodsAndServicesSold_3549c1c0-2f2a-e44b-026b-b4042153e489" xlink:type="locator" />
    <link:calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GrossProfit_98c25af7-47ba-69a3-12c4-e52bd51b359e" xlink:to="loc_us-gaap_CostOfGoodsAndServicesSold_3549c1c0-2f2a-e44b-026b-b4042153e489" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OperatingExpenses" xlink:label="loc_us-gaap_OperatingExpenses_56807cce-1c23-b2ed-01fd-e029fa0d6e79" xlink:type="locator" />
    <link:calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_8db01d6d-ae17-523f-94b9-8ab4add4a22e" xlink:to="loc_us-gaap_OperatingExpenses_56807cce-1c23-b2ed-01fd-e029fa0d6e79" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_SellingGeneralAndAdministrativeExpense" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_89fcc343-1933-1e77-588e-68d1c2f1a04f" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingExpenses_56807cce-1c23-b2ed-01fd-e029fa0d6e79" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_89fcc343-1933-1e77-588e-68d1c2f1a04f" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ResearchAndDevelopmentExpense" xlink:label="loc_us-gaap_ResearchAndDevelopmentExpense_ef2ac9e8-006f-b467-3389-9a8ceec4bee5" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingExpenses_56807cce-1c23-b2ed-01fd-e029fa0d6e79" xlink:to="loc_us-gaap_ResearchAndDevelopmentExpense_ef2ac9e8-006f-b467-3389-9a8ceec4bee5" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_RestructuringandOtherOperatingExpense" xlink:label="loc_sanm_RestructuringandOtherOperatingExpense_D71C121B605C3B5D65CD212229A334F2" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingExpenses_56807cce-1c23-b2ed-01fd-e029fa0d6e79" xlink:to="loc_sanm_RestructuringandOtherOperatingExpense_D71C121B605C3B5D65CD212229A334F2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_666ca9f0-28f1-b21a-025e-36222808a6c3" xlink:type="locator" />
    <link:calculationArc order="2" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_e170ce1e-c3a8-e8ee-88b0-37e8dd7b1d11" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_666ca9f0-28f1-b21a-025e-36222808a6c3" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.sanmina.com/role/CondensedConsolidatedStatementsOfStockholdersEquityStatement" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/DocumentAndEntityInformationDocument" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note10IncomeTax" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note10IncomeTaxDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note11DerivativesDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note11StockRepurchaseDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note11StockholdersEquity" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note11StockholdersEquityDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_988c1346-b444-a867-fe80-f3aec1443d54" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax_4d245d7e-ad6c-dd35-41be-465e2f0e7195" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_988c1346-b444-a867-fe80-f3aec1443d54" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax_4d245d7e-ad6c-dd35-41be-465e2f0e7195" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossCumulativeChangesInNetGainLossFromCashFlowHedgesEffectNetOfTax" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossCumulativeChangesInNetGainLossFromCashFlowHedgesEffectNetOfTax_0b822c63-7e20-1238-4fa9-9cc0fd58e6b0" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_988c1346-b444-a867-fe80-f3aec1443d54" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossCumulativeChangesInNetGainLossFromCashFlowHedgesEffectNetOfTax_0b822c63-7e20-1238-4fa9-9cc0fd58e6b0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax_39b41dd7-e18e-f7b7-a9b1-8d77b8bbb39c" xlink:type="locator" />
    <link:calculationArc order="3" weight="-1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_988c1346-b444-a867-fe80-f3aec1443d54" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax_39b41dd7-e18e-f7b7-a9b1-8d77b8bbb39c" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note11StockholdersEquityTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note12BusinessSegmentGeographicAndCustomerInformation" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note12BusinessSegmentGeographicAndCustomerInformationTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note12RevenueAndGrossProfitBySegmentDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note12SegmentReportingByGeographicSegmentDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note13EarningsPerShare" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note13EarningsPerShareDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding" xlink:label="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_8c9389ea-1fbb-7e45-ce1f-5a1d89572c0d" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingBasic" xlink:label="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_fbdbb03d-8583-701f-d6e2-69f8229c6051" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_8c9389ea-1fbb-7e45-ce1f-5a1d89572c0d" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_fbdbb03d-8583-701f-d6e2-69f8229c6051" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment" xlink:label="loc_us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment_72ad9ebf-e829-cc37-8382-628e47c585ab" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_8c9389ea-1fbb-7e45-ce1f-5a1d89572c0d" xlink:to="loc_us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment_72ad9ebf-e829-cc37-8382-628e47c585ab" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note13EarningsPerShareTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note14AdditionalInformationDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note14RestrictedStockRollforwardDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note14ShareBasedCompensationArrangementsDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note14SharesAuthorizedForFutureIssuanceAndAvailableForGrantDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note14StockBasedCompensation" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note14StockBasedCompensationTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note14UnrecognizedStockBasedCompensationExpenseDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note1BasisOfPresentation" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note1BasisOfPresentationDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note2Inventories" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note2InventoriesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_InventoryNet" xlink:label="loc_us-gaap_InventoryNet_cc720f44-4c90-5acc-2e7e-b88e80f2af28" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_InventoryRawMaterialsNetOfReserves" xlink:label="loc_us-gaap_InventoryRawMaterialsNetOfReserves_a142eb63-af8d-4212-6321-d7c0ac27f958" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InventoryNet_cc720f44-4c90-5acc-2e7e-b88e80f2af28" xlink:to="loc_us-gaap_InventoryRawMaterialsNetOfReserves_a142eb63-af8d-4212-6321-d7c0ac27f958" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_InventoryWorkInProcessNetOfReserves" xlink:label="loc_us-gaap_InventoryWorkInProcessNetOfReserves_f4920785-d6c0-a217-e01a-0e0ef529643a" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InventoryNet_cc720f44-4c90-5acc-2e7e-b88e80f2af28" xlink:to="loc_us-gaap_InventoryWorkInProcessNetOfReserves_f4920785-d6c0-a217-e01a-0e0ef529643a" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_InventoryFinishedGoodsNetOfReserves" xlink:label="loc_us-gaap_InventoryFinishedGoodsNetOfReserves_2dee2782-8369-5635-44bf-51d0e8aa0f1e" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InventoryNet_cc720f44-4c90-5acc-2e7e-b88e80f2af28" xlink:to="loc_us-gaap_InventoryFinishedGoodsNetOfReserves_2dee2782-8369-5635-44bf-51d0e8aa0f1e" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note2InventoriesTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note3DisagregationOfRevenueDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note3RevenueRecognition" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note3RevenueRecognitionTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note4DerivativeFinancialInstrumentsTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note4DerivativesDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note4FairValueDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note4FinancialInstruments" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note5Debt" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note5DebtScheduleDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note5DebtTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note5LineOfCreditFacilityDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note6FutureLeaseLiabilityDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note6LeaseCostDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note6Leases" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note6LeasesDetail" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note6LeasesTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note6LesseeLeaseDescriptionDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note7AccountsReceivableSaleProgram" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note7AccountsReceivableSaleProgramDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note8CommitmentsAndContingencies" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note8ContingenciesDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note9Restructuring" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note9RestructuringAndRelatedActivitiesTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.sanmina.com/role/Note9RestructuringDetails" xlink:type="extended" />
</link:linkbase>
