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

<!--XBRL Document Created with Wdesk from Workiva-->
<!--Copyright 2022 Workiva-->
<!--r:463faa3a-336b-40bf-9d79-ef71be338f20,g:1bf7e2a5-7885-4fb5-8c03-2345057240fb-->
<link:linkbase xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd">
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome" xlink:type="simple" xlink:href="mtrx-20220331.xsd#CondensedConsolidatedStatementsofIncome"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossProfit_d02b6187-b8a0-44ad-8e3f-be2ee52da5a9" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_GrossProfit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Revenues_650fe607-aa51-4749-8ed0-2776e5eb9bdf" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_Revenues"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GrossProfit_d02b6187-b8a0-44ad-8e3f-be2ee52da5a9" xlink:to="loc_us-gaap_Revenues_650fe607-aa51-4749-8ed0-2776e5eb9bdf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfGoodsAndServicesSold_f6610c82-df12-4c14-995b-372df2152e4c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CostOfGoodsAndServicesSold"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GrossProfit_d02b6187-b8a0-44ad-8e3f-be2ee52da5a9" xlink:to="loc_us-gaap_CostOfGoodsAndServicesSold_f6610c82-df12-4c14-995b-372df2152e4c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_2f60c2d4-ded1-4648-bee7-a710a17027cd" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossProfit_76324417-4535-4f86-ace8-06894e58ce55" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_GrossProfit"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_2f60c2d4-ded1-4648-bee7-a710a17027cd" xlink:to="loc_us-gaap_GrossProfit_76324417-4535-4f86-ace8-06894e58ce55" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_8d26967e-5c04-46c5-be7b-75521f6dde6b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_SellingGeneralAndAdministrativeExpense"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_2f60c2d4-ded1-4648-bee7-a710a17027cd" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_8d26967e-5c04-46c5-be7b-75521f6dde6b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillAndIntangibleAssetImpairment_bf545b1e-ed1f-4bbb-9131-ea1d486c3f32" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_GoodwillAndIntangibleAssetImpairment"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_2f60c2d4-ded1-4648-bee7-a710a17027cd" xlink:to="loc_us-gaap_GoodwillAndIntangibleAssetImpairment_bf545b1e-ed1f-4bbb-9131-ea1d486c3f32" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCharges_99a6ce19-1f84-40bf-9fe3-27b8299c1780" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RestructuringCharges"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_2f60c2d4-ded1-4648-bee7-a710a17027cd" xlink:to="loc_us-gaap_RestructuringCharges_99a6ce19-1f84-40bf-9fe3-27b8299c1780" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfitLoss_d920e896-aab7-4af3-b39e-3fd75f72b2b8" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProfitLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_11d0eb0c-3c43-470b-838d-5ec6a99a7cc3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ProfitLoss_d920e896-aab7-4af3-b39e-3fd75f72b2b8" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_11d0eb0c-3c43-470b-838d-5ec6a99a7cc3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_046e07f6-f2b5-4bd5-8722-f51a6947ead1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ProfitLoss_d920e896-aab7-4af3-b39e-3fd75f72b2b8" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_046e07f6-f2b5-4bd5-8722-f51a6947ead1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_ac814c9e-54a3-4d65-ac82-656fdc710005" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_bc8fa5ba-89c4-4b4d-bff2-379667a89395" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_ac814c9e-54a3-4d65-ac82-656fdc710005" xlink:to="loc_us-gaap_OperatingIncomeLoss_bc8fa5ba-89c4-4b4d-bff2-379667a89395" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpense_18cead47-64c2-46c9-966d-4e9d0a4f5db6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InterestExpense"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_ac814c9e-54a3-4d65-ac82-656fdc710005" xlink:to="loc_us-gaap_InterestExpense_18cead47-64c2-46c9-966d-4e9d0a4f5db6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeInterest_ba090ad4-c2bc-4d6f-8145-7b8c05480dcb" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InvestmentIncomeInterest"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_ac814c9e-54a3-4d65-ac82-656fdc710005" xlink:to="loc_us-gaap_InvestmentIncomeInterest_ba090ad4-c2bc-4d6f-8145-7b8c05480dcb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_68f4e9ea-4fb3-4180-a660-429f6a597c5a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_ac814c9e-54a3-4d65-ac82-656fdc710005" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_68f4e9ea-4fb3-4180-a660-429f6a597c5a" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofComprehensiveIncome" xlink:type="simple" xlink:href="mtrx-20220331.xsd#CondensedConsolidatedStatementsofComprehensiveIncome"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofComprehensiveIncome" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest_911712ff-1da3-434a-bb0c-e3631be0febc" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfitLoss_df44c6ee-60fc-4639-bc30-f7d911861c76" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProfitLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest_911712ff-1da3-434a-bb0c-e3631be0febc" xlink:to="loc_us-gaap_ProfitLoss_df44c6ee-60fc-4639-bc30-f7d911861c76" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_5966334e-08dc-40a0-ac2d-6df6c6d5d00e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest_911712ff-1da3-434a-bb0c-e3631be0febc" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_5966334e-08dc-40a0-ac2d-6df6c6d5d00e" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets" xlink:type="simple" xlink:href="mtrx-20220331.xsd#CondensedConsolidatedBalanceSheets"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_daae6abb-3d31-4927-a66a-3ca5c7a2872c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AssetsCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_2ccbe48f-6a77-4cdd-b2cd-9e8027059fa0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_daae6abb-3d31-4927-a66a-3ca5c7a2872c" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_2ccbe48f-6a77-4cdd-b2cd-9e8027059fa0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsReceivableNetCurrent_80dd5cf4-78dc-47a1-98f8-230df9024a5b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AccountsReceivableNetCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_daae6abb-3d31-4927-a66a-3ca5c7a2872c" xlink:to="loc_us-gaap_AccountsReceivableNetCurrent_80dd5cf4-78dc-47a1-98f8-230df9024a5b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerAssetNetCurrent_d128dce0-244c-49dd-996b-ed0a7cbccbe4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ContractWithCustomerAssetNetCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_daae6abb-3d31-4927-a66a-3ca5c7a2872c" xlink:to="loc_us-gaap_ContractWithCustomerAssetNetCurrent_d128dce0-244c-49dd-996b-ed0a7cbccbe4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryNet_80a77bfc-84c3-44c5-8be5-974cd74ebb56" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InventoryNet"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_daae6abb-3d31-4927-a66a-3ca5c7a2872c" xlink:to="loc_us-gaap_InventoryNet_80a77bfc-84c3-44c5-8be5-974cd74ebb56" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxesReceivable_6cf2c5c7-84d9-4c34-984c-3da600f4ba60" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncomeTaxesReceivable"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_daae6abb-3d31-4927-a66a-3ca5c7a2872c" xlink:to="loc_us-gaap_IncomeTaxesReceivable_6cf2c5c7-84d9-4c34-984c-3da600f4ba60" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsCurrent_88dfe0cb-365a-49e3-bc41-ac58c512dd85" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherAssetsCurrent"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_daae6abb-3d31-4927-a66a-3ca5c7a2872c" xlink:to="loc_us-gaap_OtherAssetsCurrent_88dfe0cb-365a-49e3-bc41-ac58c512dd85" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_83c7c870-b528-46fe-b26b-782ff59376e2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_7b334b9b-6a1b-4edf-9b1c-c20b5d68e6f4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PropertyPlantAndEquipmentGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentNet_83c7c870-b528-46fe-b26b-782ff59376e2" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentGross_7b334b9b-6a1b-4edf-9b1c-c20b5d68e6f4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_e610287b-5edc-45bb-b212-d73981198b0c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentNet_83c7c870-b528-46fe-b26b-782ff59376e2" xlink:to="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_e610287b-5edc-45bb-b212-d73981198b0c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_402a03bc-2248-42d3-8390-f6336a18d57b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PropertyPlantAndEquipmentGross"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BuildingsAndImprovementsGross_88a7e143-388e-4520-9e19-7e3b80cdad78" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BuildingsAndImprovementsGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentGross_402a03bc-2248-42d3-8390-f6336a18d57b" xlink:to="loc_us-gaap_BuildingsAndImprovementsGross_88a7e143-388e-4520-9e19-7e3b80cdad78" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MachineryAndEquipmentGross_ec37fee0-0dca-478e-9ba4-4a6c37589158" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_MachineryAndEquipmentGross"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentGross_402a03bc-2248-42d3-8390-f6336a18d57b" xlink:to="loc_us-gaap_MachineryAndEquipmentGross_ec37fee0-0dca-478e-9ba4-4a6c37589158" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_TransportationEquipmentGross_b530d83f-4ad7-4fb0-98cf-8ccbe16ff179" xlink:href="mtrx-20220331.xsd#mtrx_TransportationEquipmentGross"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentGross_402a03bc-2248-42d3-8390-f6336a18d57b" xlink:to="loc_mtrx_TransportationEquipmentGross_b530d83f-4ad7-4fb0-98cf-8ccbe16ff179" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_OfficeEquipmentAndSoftware_c061b77f-ec1e-4bab-b24e-a75041bc08cf" xlink:href="mtrx-20220331.xsd#mtrx_OfficeEquipmentAndSoftware"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentGross_402a03bc-2248-42d3-8390-f6336a18d57b" xlink:to="loc_mtrx_OfficeEquipmentAndSoftware_c061b77f-ec1e-4bab-b24e-a75041bc08cf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConstructionInProgressGross_333dbbb5-946d-471b-801a-d32c868a9e3c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ConstructionInProgressGross"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentGross_402a03bc-2248-42d3-8390-f6336a18d57b" xlink:to="loc_us-gaap_ConstructionInProgressGross_333dbbb5-946d-471b-801a-d32c868a9e3c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_fbf6da1c-6020-4dfe-b150-edceab016981" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_Assets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_7418d25c-badc-4645-afd1-cb27c017af97" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AssetsCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_fbf6da1c-6020-4dfe-b150-edceab016981" xlink:to="loc_us-gaap_AssetsCurrent_7418d25c-badc-4645-afd1-cb27c017af97" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_e10a7b3b-ae78-4439-9758-fc78211a84b6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_fbf6da1c-6020-4dfe-b150-edceab016981" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_e10a7b3b-ae78-4439-9758-fc78211a84b6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedCashNoncurrent_38671f67-aaf9-44c7-b7a1-97a5fdd7786a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RestrictedCashNoncurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_fbf6da1c-6020-4dfe-b150-edceab016981" xlink:to="loc_us-gaap_RestrictedCashNoncurrent_38671f67-aaf9-44c7-b7a1-97a5fdd7786a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_c8e28f1b-d01a-4a09-8805-101e8892d1c1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OperatingLeaseRightOfUseAsset"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_fbf6da1c-6020-4dfe-b150-edceab016981" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_c8e28f1b-d01a-4a09-8805-101e8892d1c1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_6c659188-db74-4892-917b-350195dbf5d0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_Goodwill"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_fbf6da1c-6020-4dfe-b150-edceab016981" xlink:to="loc_us-gaap_Goodwill_6c659188-db74-4892-917b-350195dbf5d0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_4af16af9-4c15-4fc4-b82c-ca0da52d1908" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IntangibleAssetsNetExcludingGoodwill"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_fbf6da1c-6020-4dfe-b150-edceab016981" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_4af16af9-4c15-4fc4-b82c-ca0da52d1908" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_0d7c74d2-e8de-4e4d-9ccc-297530dc0445" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredIncomeTaxAssetsNet"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_fbf6da1c-6020-4dfe-b150-edceab016981" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_0d7c74d2-e8de-4e4d-9ccc-297530dc0445" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_7ea12c58-e290-4916-90f9-5b1609ae6d78" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherAssetsNoncurrent"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_fbf6da1c-6020-4dfe-b150-edceab016981" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_7ea12c58-e290-4916-90f9-5b1609ae6d78" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_b2cf706a-e072-401a-9ebc-07e1077d6744" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_Liabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_0bb8ab9d-5ba5-4021-9ea7-af5636eb6fd7" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LiabilitiesCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_b2cf706a-e072-401a-9ebc-07e1077d6744" xlink:to="loc_us-gaap_LiabilitiesCurrent_0bb8ab9d-5ba5-4021-9ea7-af5636eb6fd7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_897ccf68-65c2-4f9a-8690-27bad6f3e44d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredIncomeTaxLiabilitiesNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_b2cf706a-e072-401a-9ebc-07e1077d6744" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_897ccf68-65c2-4f9a-8690-27bad6f3e44d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_cf66b7f7-8b3b-42ba-a358-5e5ca13d0b65" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OperatingLeaseLiabilityNoncurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_b2cf706a-e072-401a-9ebc-07e1077d6744" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_cf66b7f7-8b3b-42ba-a358-5e5ca13d0b65" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesOtherThanLongtermDebtNoncurrent_1170ede0-4939-4bae-a6e6-73ea29eb80b5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LiabilitiesOtherThanLongtermDebtNoncurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_b2cf706a-e072-401a-9ebc-07e1077d6744" xlink:to="loc_us-gaap_LiabilitiesOtherThanLongtermDebtNoncurrent_1170ede0-4939-4bae-a6e6-73ea29eb80b5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_0afcc3a1-ab72-4226-a941-62e2ea5ef082" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LiabilitiesCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableCurrent_147df657-b46b-4b98-9b29-8620fc4fc24c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AccountsPayableCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_0afcc3a1-ab72-4226-a941-62e2ea5ef082" xlink:to="loc_us-gaap_AccountsPayableCurrent_147df657-b46b-4b98-9b29-8620fc4fc24c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerLiabilityCurrent_60147ff1-7d32-41eb-86ad-26a2855c95a0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ContractWithCustomerLiabilityCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_0afcc3a1-ab72-4226-a941-62e2ea5ef082" xlink:to="loc_us-gaap_ContractWithCustomerLiabilityCurrent_60147ff1-7d32-41eb-86ad-26a2855c95a0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_40e05439-3d12-4d5b-82ea-d03205fd2c26" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EmployeeRelatedLiabilitiesCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_0afcc3a1-ab72-4226-a941-62e2ea5ef082" xlink:to="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_40e05439-3d12-4d5b-82ea-d03205fd2c26" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedInsuranceCurrent_4609d62f-9eba-416a-9189-b3507e82a38f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AccruedInsuranceCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_0afcc3a1-ab72-4226-a941-62e2ea5ef082" xlink:to="loc_us-gaap_AccruedInsuranceCurrent_4609d62f-9eba-416a-9189-b3507e82a38f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_2703dfcb-acf1-4c8c-9db8-e51b8665bb84" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OperatingLeaseLiabilityCurrent"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_0afcc3a1-ab72-4226-a941-62e2ea5ef082" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_2703dfcb-acf1-4c8c-9db8-e51b8665bb84" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesCurrent_e3479130-c153-4cb2-bb38-10d9236ad563" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherLiabilitiesCurrent"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_0afcc3a1-ab72-4226-a941-62e2ea5ef082" xlink:to="loc_us-gaap_OtherLiabilitiesCurrent_e3479130-c153-4cb2-bb38-10d9236ad563" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_52d41c43-857e-41d5-8bca-bee7d3756f42" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityBeforeTreasuryStock_988c52b8-d2e1-4904-a7b3-c4510f1d90cf" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StockholdersEquityBeforeTreasuryStock"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_52d41c43-857e-41d5-8bca-bee7d3756f42" xlink:to="loc_us-gaap_StockholdersEquityBeforeTreasuryStock_988c52b8-d2e1-4904-a7b3-c4510f1d90cf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockValue_e6a4654f-f608-4b58-8ea3-d2b8a28af9b1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_TreasuryStockValue"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_52d41c43-857e-41d5-8bca-bee7d3756f42" xlink:to="loc_us-gaap_TreasuryStockValue_e6a4654f-f608-4b58-8ea3-d2b8a28af9b1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityBeforeTreasuryStock_fbb3564c-5c23-4215-97e9-dacedc19717b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StockholdersEquityBeforeTreasuryStock"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValue_faa536ec-5051-45e1-9a3b-498890412c52" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommonStockValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityBeforeTreasuryStock_fbb3564c-5c23-4215-97e9-dacedc19717b" xlink:to="loc_us-gaap_CommonStockValue_faa536ec-5051-45e1-9a3b-498890412c52" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapital_c3a8841f-fcb4-4bed-b96c-fcc900e668ac" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AdditionalPaidInCapital"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityBeforeTreasuryStock_fbb3564c-5c23-4215-97e9-dacedc19717b" xlink:to="loc_us-gaap_AdditionalPaidInCapital_c3a8841f-fcb4-4bed-b96c-fcc900e668ac" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_0adffce8-5522-4a24-84f2-08b53e0267ab" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityBeforeTreasuryStock_fbb3564c-5c23-4215-97e9-dacedc19717b" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_0adffce8-5522-4a24-84f2-08b53e0267ab" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax_b036e50c-1b34-413c-853a-dde64a001031" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityBeforeTreasuryStock_fbb3564c-5c23-4215-97e9-dacedc19717b" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax_b036e50c-1b34-413c-853a-dde64a001031" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_027ce84b-bb7d-41de-9671-9267d6029e12" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_7268431a-a219-4a88-ba7a-32cd1cd369b3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_Liabilities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_027ce84b-bb7d-41de-9671-9267d6029e12" xlink:to="loc_us-gaap_Liabilities_7268431a-a219-4a88-ba7a-32cd1cd369b3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_2d5ba860-f476-4aef-90a0-9b1913e4d804" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_027ce84b-bb7d-41de-9671-9267d6029e12" xlink:to="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_2d5ba860-f476-4aef-90a0-9b1913e4d804" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows" xlink:type="simple" xlink:href="mtrx-20220331.xsd#CondensedConsolidatedStatementsofCashFlows"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_87ffca08-dc88-4d41-b1d9-896e823621a4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_f9491015-c5eb-46a5-ad82-8da2daa21605" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_87ffca08-dc88-4d41-b1d9-896e823621a4" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_f9491015-c5eb-46a5-ad82-8da2daa21605" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_0546e3d6-ce57-4698-8f1c-ef6479ec93df" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_87ffca08-dc88-4d41-b1d9-896e823621a4" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_0546e3d6-ce57-4698-8f1c-ef6479ec93df" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_5a85bd74-e064-4259-89da-cbd419971001" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_87ffca08-dc88-4d41-b1d9-896e823621a4" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_5a85bd74-e064-4259-89da-cbd419971001" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectOfExchangeRateOnCashAndCashEquivalents_4eda2c1c-cf5c-42ad-8bea-5c164d619c77" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EffectOfExchangeRateOnCashAndCashEquivalents"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_87ffca08-dc88-4d41-b1d9-896e823621a4" xlink:to="loc_us-gaap_EffectOfExchangeRateOnCashAndCashEquivalents_4eda2c1c-cf5c-42ad-8bea-5c164d619c77" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_200dce09-0cad-4e58-94a5-faf62fd63d27" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfitLoss_cbea8d7d-8548-47ea-aa9b-f564957f5adf" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProfitLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_200dce09-0cad-4e58-94a5-faf62fd63d27" xlink:to="loc_us-gaap_ProfitLoss_cbea8d7d-8548-47ea-aa9b-f564957f5adf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_bcffff4d-05ea-4805-af73-724cdd2f3514" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DepreciationDepletionAndAmortization"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_200dce09-0cad-4e58-94a5-faf62fd63d27" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_bcffff4d-05ea-4805-af73-724cdd2f3514" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillAndIntangibleAssetImpairment_f56a8248-3999-4284-8835-427ae43a2d6f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_GoodwillAndIntangibleAssetImpairment"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_200dce09-0cad-4e58-94a5-faf62fd63d27" xlink:to="loc_us-gaap_GoodwillAndIntangibleAssetImpairment_f56a8248-3999-4284-8835-427ae43a2d6f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensation_2c78b33c-f3aa-4fc0-bf11-f443545347da" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensation"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_200dce09-0cad-4e58-94a5-faf62fd63d27" xlink:to="loc_us-gaap_ShareBasedCompensation_2c78b33c-f3aa-4fc0-bf11-f443545347da" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_OperatingLeaseImpairmentsDueToRestructuring_20843ac7-e554-46bf-b90b-287db59cd681" xlink:href="mtrx-20220331.xsd#mtrx_OperatingLeaseImpairmentsDueToRestructuring"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_200dce09-0cad-4e58-94a5-faf62fd63d27" xlink:to="loc_mtrx_OperatingLeaseImpairmentsDueToRestructuring_20843ac7-e554-46bf-b90b-287db59cd681" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_DeferredIncomeTaxExpense_7873547f-4ba1-4003-a9f5-a12df0b50bf2" xlink:href="mtrx-20220331.xsd#mtrx_DeferredIncomeTaxExpense"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_200dce09-0cad-4e58-94a5-faf62fd63d27" xlink:to="loc_mtrx_DeferredIncomeTaxExpense_7873547f-4ba1-4003-a9f5-a12df0b50bf2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnSaleOfPropertyPlantEquipment_ce6d0f14-26c6-41bb-b0a1-40114c61c306" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_GainLossOnSaleOfPropertyPlantEquipment"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_200dce09-0cad-4e58-94a5-faf62fd63d27" xlink:to="loc_us-gaap_GainLossOnSaleOfPropertyPlantEquipment_ce6d0f14-26c6-41bb-b0a1-40114c61c306" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProvisionForDoubtfulAccounts_df9da31d-de41-44b0-a447-538f666a9172" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProvisionForDoubtfulAccounts"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_200dce09-0cad-4e58-94a5-faf62fd63d27" xlink:to="loc_us-gaap_ProvisionForDoubtfulAccounts_df9da31d-de41-44b0-a447-538f666a9172" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNoncashExpense_eca7b7ee-3762-4106-b178-88f5cd803558" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherNoncashExpense"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_200dce09-0cad-4e58-94a5-faf62fd63d27" xlink:to="loc_us-gaap_OtherNoncashExpense_eca7b7ee-3762-4106-b178-88f5cd803558" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNoncashIncomeExpense_2e3ed579-7960-4de0-aba1-f5945d34596e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherNoncashIncomeExpense"/>
    <link:calculationArc order="10" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_200dce09-0cad-4e58-94a5-faf62fd63d27" xlink:to="loc_us-gaap_OtherNoncashIncomeExpense_2e3ed579-7960-4de0-aba1-f5945d34596e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_97a22cf7-f25d-4351-8f52-93d68730ee90" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncreaseDecreaseInAccountsReceivable"/>
    <link:calculationArc order="11" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_200dce09-0cad-4e58-94a5-faf62fd63d27" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_97a22cf7-f25d-4351-8f52-93d68730ee90" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInContractWithCustomerAsset_840f8424-7199-457b-9b2b-54f3ed681603" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncreaseDecreaseInContractWithCustomerAsset"/>
    <link:calculationArc order="12" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_200dce09-0cad-4e58-94a5-faf62fd63d27" xlink:to="loc_us-gaap_IncreaseDecreaseInContractWithCustomerAsset_840f8424-7199-457b-9b2b-54f3ed681603" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInInventories_6beb6976-20c8-4218-b96f-66cd967a2e52" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncreaseDecreaseInInventories"/>
    <link:calculationArc order="13" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_200dce09-0cad-4e58-94a5-faf62fd63d27" xlink:to="loc_us-gaap_IncreaseDecreaseInInventories_6beb6976-20c8-4218-b96f-66cd967a2e52" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherOperatingAssets_7eb36f72-72d9-4a83-b891-0bf9851c2a90" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncreaseDecreaseInOtherOperatingAssets"/>
    <link:calculationArc order="14" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_200dce09-0cad-4e58-94a5-faf62fd63d27" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherOperatingAssets_7eb36f72-72d9-4a83-b891-0bf9851c2a90" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayable_1594a52f-7307-4710-a5d9-c417218dad7d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncreaseDecreaseInAccountsPayable"/>
    <link:calculationArc order="15" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_200dce09-0cad-4e58-94a5-faf62fd63d27" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayable_1594a52f-7307-4710-a5d9-c417218dad7d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInContractWithCustomerLiability_f291974c-e45e-4af8-a347-1894db781ea7" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncreaseDecreaseInContractWithCustomerLiability"/>
    <link:calculationArc order="16" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_200dce09-0cad-4e58-94a5-faf62fd63d27" xlink:to="loc_us-gaap_IncreaseDecreaseInContractWithCustomerLiability_f291974c-e45e-4af8-a347-1894db781ea7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_710f8574-3ac1-4723-88f4-2947500b0fae" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncreaseDecreaseInAccruedLiabilities"/>
    <link:calculationArc order="17" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_200dce09-0cad-4e58-94a5-faf62fd63d27" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_710f8574-3ac1-4723-88f4-2947500b0fae" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_ece7d0cc-d97a-460f-9e04-ac56c10016c7" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_9e11f11a-59da-4c6c-85a8-eacf33327187" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PaymentsToAcquirePropertyPlantAndEquipment"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_ece7d0cc-d97a-460f-9e04-ac56c10016c7" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_9e11f11a-59da-4c6c-85a8-eacf33327187" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleOfProductiveAssets_e8a7a7bf-b702-4f53-9649-b6c36f76c68a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProceedsFromSaleOfProductiveAssets"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_ece7d0cc-d97a-460f-9e04-ac56c10016c7" xlink:to="loc_us-gaap_ProceedsFromSaleOfProductiveAssets_e8a7a7bf-b702-4f53-9649-b6c36f76c68a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_57a93ea7-5039-435f-b991-0cb2a76226c6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsOfDebtIssuanceCosts_084be758-abb4-40d9-a531-42a87b5a641f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PaymentsOfDebtIssuanceCosts"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_57a93ea7-5039-435f-b991-0cb2a76226c6" xlink:to="loc_us-gaap_PaymentsOfDebtIssuanceCosts_084be758-abb4-40d9-a531-42a87b5a641f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromStockPlans_0aa7709e-98a3-4815-b227-ba4ef11b1107" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProceedsFromStockPlans"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_57a93ea7-5039-435f-b991-0cb2a76226c6" xlink:to="loc_us-gaap_ProceedsFromStockPlans_0aa7709e-98a3-4815-b227-ba4ef11b1107" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForRepurchaseOfOtherEquity_e5395940-4f79-47ea-ad36-29dd10f2e4c1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PaymentsForRepurchaseOfOtherEquity"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_57a93ea7-5039-435f-b991-0cb2a76226c6" xlink:to="loc_us-gaap_PaymentsForRepurchaseOfOtherEquity_e5395940-4f79-47ea-ad36-29dd10f2e4c1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfOtherDebt_c4353097-8b6e-45b3-8a46-8f6337d03e41" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RepaymentsOfOtherDebt"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_57a93ea7-5039-435f-b991-0cb2a76226c6" xlink:to="loc_us-gaap_RepaymentsOfOtherDebt_c4353097-8b6e-45b3-8a46-8f6337d03e41" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromStockOptionsExercised_9e6d726a-4bdc-4ddc-b66d-910f028eec34" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProceedsFromStockOptionsExercised"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_57a93ea7-5039-435f-b991-0cb2a76226c6" xlink:to="loc_us-gaap_ProceedsFromStockOptionsExercised_9e6d726a-4bdc-4ddc-b66d-910f028eec34" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromLongTermLinesOfCredit_8ab2b906-5033-4178-bdab-dba38739d706" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProceedsFromLongTermLinesOfCredit"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_57a93ea7-5039-435f-b991-0cb2a76226c6" xlink:to="loc_us-gaap_ProceedsFromLongTermLinesOfCredit_8ab2b906-5033-4178-bdab-dba38739d706" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfLongTermLinesOfCredit_7f9fcbc8-2081-4be2-8043-e7b1dbef42dc" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RepaymentsOfLongTermLinesOfCredit"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_57a93ea7-5039-435f-b991-0cb2a76226c6" xlink:to="loc_us-gaap_RepaymentsOfLongTermLinesOfCredit_7f9fcbc8-2081-4be2-8043-e7b1dbef42dc" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/LeasesComponentsofLeaseCostsDetails" xlink:type="simple" xlink:href="mtrx-20220331.xsd#LeasesComponentsofLeaseCostsDetails"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/LeasesComponentsofLeaseCostsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LeaseCost_f100334c-cf19-4080-a758-8a0a19cbd927" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LeaseCost"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseCost_18bc8467-8a21-4a90-88de-26c0b1932342" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OperatingLeaseCost"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LeaseCost_f100334c-cf19-4080-a758-8a0a19cbd927" xlink:to="loc_us-gaap_OperatingLeaseCost_18bc8467-8a21-4a90-88de-26c0b1932342" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermLeaseCost_9376b2e3-05ea-4f26-9175-dae2686f6243" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShortTermLeaseCost"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LeaseCost_f100334c-cf19-4080-a758-8a0a19cbd927" xlink:to="loc_us-gaap_ShortTermLeaseCost_9376b2e3-05ea-4f26-9175-dae2686f6243" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails" xlink:type="simple" xlink:href="mtrx-20220331.xsd#LeasesMaturityAnalysisDetails"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_53f2e0ee-0a42-4a7f-9931-92270f3a8a93" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear_e2b28678-1ca2-4833-9424-073c648abf6a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_53f2e0ee-0a42-4a7f-9931-92270f3a8a93" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear_e2b28678-1ca2-4833-9424-073c648abf6a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_205d81ca-65a3-4a3e-8d66-6558cba9464f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_53f2e0ee-0a42-4a7f-9931-92270f3a8a93" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_205d81ca-65a3-4a3e-8d66-6558cba9464f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_c282b216-8c82-40fa-9291-0cbe729383a6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_53f2e0ee-0a42-4a7f-9931-92270f3a8a93" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_c282b216-8c82-40fa-9291-0cbe729383a6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_488b4f2a-1d50-4d63-88ee-fb5b1b7c526d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_53f2e0ee-0a42-4a7f-9931-92270f3a8a93" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_488b4f2a-1d50-4d63-88ee-fb5b1b7c526d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_bbfc575e-73c7-4397-9887-6ce92ef9842f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_53f2e0ee-0a42-4a7f-9931-92270f3a8a93" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_bbfc575e-73c7-4397-9887-6ce92ef9842f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_LesseeOperatingLeaseLiabilityToBePaidAfterYearFour_b5d84245-06ed-45a4-9e39-445c565b4c13" xlink:href="mtrx-20220331.xsd#mtrx_LesseeOperatingLeaseLiabilityToBePaidAfterYearFour"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_53f2e0ee-0a42-4a7f-9931-92270f3a8a93" xlink:to="loc_mtrx_LesseeOperatingLeaseLiabilityToBePaidAfterYearFour_b5d84245-06ed-45a4-9e39-445c565b4c13" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails" xlink:type="simple" xlink:href="mtrx-20220331.xsd#IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_0b19ac19-3a76-4c5f-a4aa-4849395b9e5f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_Goodwill"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillGross_fa49df35-e15a-4fae-b2f4-2e44aa1b3a85" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_GoodwillGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Goodwill_0b19ac19-3a76-4c5f-a4aa-4849395b9e5f" xlink:to="loc_us-gaap_GoodwillGross_fa49df35-e15a-4fae-b2f4-2e44aa1b3a85" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillImpairedAccumulatedImpairmentLoss_c58fa7a4-a915-4ae0-9638-892c482ebd47" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_GoodwillImpairedAccumulatedImpairmentLoss"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Goodwill_0b19ac19-3a76-4c5f-a4aa-4849395b9e5f" xlink:to="loc_us-gaap_GoodwillImpairedAccumulatedImpairmentLoss_c58fa7a4-a915-4ae0-9638-892c482ebd47" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails" xlink:type="simple" xlink:href="mtrx-20220331.xsd#IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsGross_12f65286-e396-42ff-b847-79bc095a0758" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsGross"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndefiniteLivedTradeNames_32e01a03-c343-47d2-826a-b71a1640bf21" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IndefiniteLivedTradeNames"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsGross_12f65286-e396-42ff-b847-79bc095a0758" xlink:to="loc_us-gaap_IndefiniteLivedTradeNames_32e01a03-c343-47d2-826a-b71a1640bf21" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_8dcb5bdb-d0f7-41db-8f98-4c94730e30c2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IntangibleAssetsNetExcludingGoodwill"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsNet_02a41c1e-18e1-4e58-a5ed-1f0241045c59" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsNet"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_8dcb5bdb-d0f7-41db-8f98-4c94730e30c2" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsNet_02a41c1e-18e1-4e58-a5ed-1f0241045c59" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsNet_99d0d779-d5fe-4872-b622-fe822656c1fa" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsGross_dc27b6a2-ce79-435b-b43a-c2ac1bb6b51d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_99d0d779-d5fe-4872-b622-fe822656c1fa" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsGross_dc27b6a2-ce79-435b-b43a-c2ac1bb6b51d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_b9353da1-26fa-4d82-acbf-82e75d0e08f0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_99d0d779-d5fe-4872-b622-fe822656c1fa" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_b9353da1-26fa-4d82-acbf-82e75d0e08f0" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails" xlink:type="simple" xlink:href="mtrx-20220331.xsd#EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_fdda45af-ad37-4316-88b6-822081832a3d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_44a1824c-7d87-4185-b79b-59031f9f8e94" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingBasic"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_fdda45af-ad37-4316-88b6-822081832a3d" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_44a1824c-7d87-4185-b79b-59031f9f8e94" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_da7e63c4-4a9c-406c-9334-77cc7d0bfd0a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_fdda45af-ad37-4316-88b6-822081832a3d" xlink:to="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_da7e63c4-4a9c-406c-9334-77cc7d0bfd0a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncrementalCommonSharesAttributableToNonvestedSharesWithForfeitableDividends_651302a3-77da-41dc-a827-4bbdef636496" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncrementalCommonSharesAttributableToNonvestedSharesWithForfeitableDividends"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_fdda45af-ad37-4316-88b6-822081832a3d" xlink:to="loc_us-gaap_IncrementalCommonSharesAttributableToNonvestedSharesWithForfeitableDividends_651302a3-77da-41dc-a827-4bbdef636496" xlink:type="arc"/>
  </link:calculationLink>
</link:linkbase>
