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

<!--XBRL Document Created with Wdesk from Workiva-->
<!--Copyright 2022 Workiva-->
<!--r:3e69a77d-9563-4bb1-a234-0a9468d31867,g:9af99fad-e4ab-4675-99de-23b6e4a5c6f1-->
<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/ConsolidatedStatementsofIncome" xlink:type="simple" xlink:href="mtrx-20220630.xsd#ConsolidatedStatementsofIncome"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/ConsolidatedStatementsofIncome" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_750b139f-446d-40cf-96c3-afb2fe5f7de0" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_cca3d5ce-1132-4d26-a05e-6b1bb9f8a6c4" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_750b139f-446d-40cf-96c3-afb2fe5f7de0" xlink:to="loc_us-gaap_OperatingIncomeLoss_cca3d5ce-1132-4d26-a05e-6b1bb9f8a6c4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpense_6b5af1fd-c550-4074-8b4b-c145f568b9b5" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_750b139f-446d-40cf-96c3-afb2fe5f7de0" xlink:to="loc_us-gaap_InterestExpense_6b5af1fd-c550-4074-8b4b-c145f568b9b5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeInterest_960ca519-4c43-4db4-a3ff-37c216b13fbd" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_750b139f-446d-40cf-96c3-afb2fe5f7de0" xlink:to="loc_us-gaap_InvestmentIncomeInterest_960ca519-4c43-4db4-a3ff-37c216b13fbd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_59dea102-6715-4fdb-aea8-7ceccb8754fa" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_750b139f-446d-40cf-96c3-afb2fe5f7de0" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_59dea102-6715-4fdb-aea8-7ceccb8754fa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_e5e28005-3f8a-4132-af44-27acb8f53ff0" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossProfit_8da6555c-553b-4391-93ff-d2e1b74d48cb" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_e5e28005-3f8a-4132-af44-27acb8f53ff0" xlink:to="loc_us-gaap_GrossProfit_8da6555c-553b-4391-93ff-d2e1b74d48cb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_716421bc-079a-440b-8ba5-abc94f8f96a0" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_e5e28005-3f8a-4132-af44-27acb8f53ff0" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_716421bc-079a-440b-8ba5-abc94f8f96a0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillAndIntangibleAssetImpairment_2b9b9e94-988f-4c8f-89a4-146772ac7a70" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_e5e28005-3f8a-4132-af44-27acb8f53ff0" xlink:to="loc_us-gaap_GoodwillAndIntangibleAssetImpairment_2b9b9e94-988f-4c8f-89a4-146772ac7a70" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCharges_be020bec-4c25-4684-9499-82216c870965" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_e5e28005-3f8a-4132-af44-27acb8f53ff0" xlink:to="loc_us-gaap_RestructuringCharges_be020bec-4c25-4684-9499-82216c870965" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfitLoss_abbb86ef-377b-4233-a76a-9fd42381bfb5" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ProfitLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_385aef48-7ad1-456e-a8c7-c56d438b7312" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ProfitLoss_abbb86ef-377b-4233-a76a-9fd42381bfb5" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_385aef48-7ad1-456e-a8c7-c56d438b7312" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_38f59efc-583b-48fa-bd39-0b7951047978" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ProfitLoss_abbb86ef-377b-4233-a76a-9fd42381bfb5" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_38f59efc-583b-48fa-bd39-0b7951047978" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossProfit_e0a87524-2248-4aaa-b6ab-1f5694987905" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_GrossProfit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Revenues_ff251ffb-30ce-4cbc-85f6-7605f1ff43b5" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_e0a87524-2248-4aaa-b6ab-1f5694987905" xlink:to="loc_us-gaap_Revenues_ff251ffb-30ce-4cbc-85f6-7605f1ff43b5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfGoodsAndServicesSold_4fec374f-ff52-4fc0-a93f-9570dc637be8" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_CostOfGoodsAndServicesSold"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GrossProfit_e0a87524-2248-4aaa-b6ab-1f5694987905" xlink:to="loc_us-gaap_CostOfGoodsAndServicesSold_4fec374f-ff52-4fc0-a93f-9570dc637be8" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ConsolidatedStatementsofComprehensiveIncome" xlink:type="simple" xlink:href="mtrx-20220630.xsd#ConsolidatedStatementsofComprehensiveIncome"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/ConsolidatedStatementsofComprehensiveIncome" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest_585b40f1-808b-4b83-9936-99ebf768717f" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfitLoss_d0bac1ee-ccf9-455b-a4be-657c46639182" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_585b40f1-808b-4b83-9936-99ebf768717f" xlink:to="loc_us-gaap_ProfitLoss_d0bac1ee-ccf9-455b-a4be-657c46639182" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_0f79a48e-f749-4e9f-a036-03d5e58dcc8a" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest_585b40f1-808b-4b83-9936-99ebf768717f" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_0f79a48e-f749-4e9f-a036-03d5e58dcc8a" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ConsolidatedBalanceSheets" xlink:type="simple" xlink:href="mtrx-20220630.xsd#ConsolidatedBalanceSheets"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/ConsolidatedBalanceSheets" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_5d25f6a6-9c7e-4a09-99bf-1872be88959a" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AssetsCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_226769cf-a055-46ca-b1ef-72f1ee808d0d" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_5d25f6a6-9c7e-4a09-99bf-1872be88959a" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_226769cf-a055-46ca-b1ef-72f1ee808d0d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsReceivableNetCurrent_1d36527e-00b6-4e74-9632-18be6ec8566e" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_5d25f6a6-9c7e-4a09-99bf-1872be88959a" xlink:to="loc_us-gaap_AccountsReceivableNetCurrent_1d36527e-00b6-4e74-9632-18be6ec8566e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerAssetNetCurrent_f0a94fae-a0dc-476f-af75-0cfff06d29b1" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_5d25f6a6-9c7e-4a09-99bf-1872be88959a" xlink:to="loc_us-gaap_ContractWithCustomerAssetNetCurrent_f0a94fae-a0dc-476f-af75-0cfff06d29b1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryNet_7016e590-d2ab-417d-9f41-85604baaccdd" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_5d25f6a6-9c7e-4a09-99bf-1872be88959a" xlink:to="loc_us-gaap_InventoryNet_7016e590-d2ab-417d-9f41-85604baaccdd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxesReceivable_91f477e8-56d7-4c77-b2e7-5b1e29d4d3c5" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_5d25f6a6-9c7e-4a09-99bf-1872be88959a" xlink:to="loc_us-gaap_IncomeTaxesReceivable_91f477e8-56d7-4c77-b2e7-5b1e29d4d3c5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsCurrent_f86cf0ef-efde-4162-8b49-d587966bced4" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_5d25f6a6-9c7e-4a09-99bf-1872be88959a" xlink:to="loc_us-gaap_OtherAssetsCurrent_f86cf0ef-efde-4162-8b49-d587966bced4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityBeforeTreasuryStock_438b3bf6-b22b-4e8c-a8b9-522cb35ef8f1" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_StockholdersEquityBeforeTreasuryStock"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValue_a5241127-c77a-4e36-b031-e2efe7f4603d" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_438b3bf6-b22b-4e8c-a8b9-522cb35ef8f1" xlink:to="loc_us-gaap_CommonStockValue_a5241127-c77a-4e36-b031-e2efe7f4603d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapital_f48c0935-f187-47e2-9b1e-7ac712545223" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_438b3bf6-b22b-4e8c-a8b9-522cb35ef8f1" xlink:to="loc_us-gaap_AdditionalPaidInCapital_f48c0935-f187-47e2-9b1e-7ac712545223" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_c48f1777-afae-4fcc-b401-ecaafa2eb082" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_438b3bf6-b22b-4e8c-a8b9-522cb35ef8f1" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_c48f1777-afae-4fcc-b401-ecaafa2eb082" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax_398f4a51-8600-4dc5-9a70-404b78b5d89a" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_438b3bf6-b22b-4e8c-a8b9-522cb35ef8f1" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax_398f4a51-8600-4dc5-9a70-404b78b5d89a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_724df577-9bc3-41db-89d3-0e1e36fad767" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityBeforeTreasuryStock_3aad8e3b-ee6b-474d-85a7-f7d54bdec06d" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_724df577-9bc3-41db-89d3-0e1e36fad767" xlink:to="loc_us-gaap_StockholdersEquityBeforeTreasuryStock_3aad8e3b-ee6b-474d-85a7-f7d54bdec06d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockValue_647dea2c-6efe-4a61-b8d1-e662a762b449" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_724df577-9bc3-41db-89d3-0e1e36fad767" xlink:to="loc_us-gaap_TreasuryStockValue_647dea2c-6efe-4a61-b8d1-e662a762b449" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_5acaf6db-b17d-4641-82e9-58759bf987f0" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_b6123493-8508-42dd-a9af-e120ca0b69f3" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_5acaf6db-b17d-4641-82e9-58759bf987f0" xlink:to="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_b6123493-8508-42dd-a9af-e120ca0b69f3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_e36270fd-4839-4a02-a372-a8766f533cbc" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_Liabilities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_5acaf6db-b17d-4641-82e9-58759bf987f0" xlink:to="loc_us-gaap_Liabilities_e36270fd-4839-4a02-a372-a8766f533cbc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_d814439f-7e4f-406f-b485-d57a3d9a0d52" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_Assets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_0f358147-8691-4740-8d6b-c194b2e9bc83" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AssetsCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_d814439f-7e4f-406f-b485-d57a3d9a0d52" xlink:to="loc_us-gaap_AssetsCurrent_0f358147-8691-4740-8d6b-c194b2e9bc83" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedCashNoncurrent_f370201c-c0df-4eb5-a5d8-4fdac94a4efb" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_RestrictedCashNoncurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_d814439f-7e4f-406f-b485-d57a3d9a0d52" xlink:to="loc_us-gaap_RestrictedCashNoncurrent_f370201c-c0df-4eb5-a5d8-4fdac94a4efb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_1c159c63-c021-4198-a39f-148ded108bcd" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_d814439f-7e4f-406f-b485-d57a3d9a0d52" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_1c159c63-c021-4198-a39f-148ded108bcd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_79a5339e-849c-4905-b781-c55b5282eb32" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OperatingLeaseRightOfUseAsset"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_d814439f-7e4f-406f-b485-d57a3d9a0d52" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_79a5339e-849c-4905-b781-c55b5282eb32" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_4c8c8f80-e0e8-42d4-808b-f6e9d36d9224" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_Goodwill"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_d814439f-7e4f-406f-b485-d57a3d9a0d52" xlink:to="loc_us-gaap_Goodwill_4c8c8f80-e0e8-42d4-808b-f6e9d36d9224" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_81c7a358-9615-45ff-88f7-385aee4992fe" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_d814439f-7e4f-406f-b485-d57a3d9a0d52" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_81c7a358-9615-45ff-88f7-385aee4992fe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_b854e0e5-99af-41d5-8d45-4ac5c7501ab4" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredIncomeTaxAssetsNet"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_d814439f-7e4f-406f-b485-d57a3d9a0d52" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_b854e0e5-99af-41d5-8d45-4ac5c7501ab4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_e2b1f634-936a-4b1e-aced-cfce6fded036" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherAssetsNoncurrent"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_d814439f-7e4f-406f-b485-d57a3d9a0d52" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_e2b1f634-936a-4b1e-aced-cfce6fded036" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_8ba20c9b-ffae-4152-80fa-804805ed7446" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_Liabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_c46f33e0-97ac-4552-89b1-257a54c3a026" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LiabilitiesCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_8ba20c9b-ffae-4152-80fa-804805ed7446" xlink:to="loc_us-gaap_LiabilitiesCurrent_c46f33e0-97ac-4552-89b1-257a54c3a026" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_71b19d08-725b-401c-a8ac-3927821d5df0" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_8ba20c9b-ffae-4152-80fa-804805ed7446" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_71b19d08-725b-401c-a8ac-3927821d5df0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_efa40efe-461c-47de-9d9d-3248a03f1c8f" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_8ba20c9b-ffae-4152-80fa-804805ed7446" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_efa40efe-461c-47de-9d9d-3248a03f1c8f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCredit_1f9b55a5-d718-4537-9801-e9dd7a0f1032" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LineOfCredit"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_8ba20c9b-ffae-4152-80fa-804805ed7446" xlink:to="loc_us-gaap_LineOfCredit_1f9b55a5-d718-4537-9801-e9dd7a0f1032" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesOtherThanLongtermDebtNoncurrent_f086297b-a7cc-46f6-aaa6-96bd6ed92d15" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LiabilitiesOtherThanLongtermDebtNoncurrent"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_8ba20c9b-ffae-4152-80fa-804805ed7446" xlink:to="loc_us-gaap_LiabilitiesOtherThanLongtermDebtNoncurrent_f086297b-a7cc-46f6-aaa6-96bd6ed92d15" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_ee388190-b0ab-4563-81e9-82c874be9d83" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LiabilitiesCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableCurrent_5cea62da-118a-42d5-8c6d-147fd8baff32" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AccountsPayableCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_ee388190-b0ab-4563-81e9-82c874be9d83" xlink:to="loc_us-gaap_AccountsPayableCurrent_5cea62da-118a-42d5-8c6d-147fd8baff32" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerLiabilityCurrent_1b43f038-20b9-4ddf-8751-92a554e11dbd" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_ee388190-b0ab-4563-81e9-82c874be9d83" xlink:to="loc_us-gaap_ContractWithCustomerLiabilityCurrent_1b43f038-20b9-4ddf-8751-92a554e11dbd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_e77101c1-7a8f-4572-9579-05cc43317523" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_ee388190-b0ab-4563-81e9-82c874be9d83" xlink:to="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_e77101c1-7a8f-4572-9579-05cc43317523" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedInsuranceCurrent_9c709658-8a07-49e0-89f7-dfe719ea13bd" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_ee388190-b0ab-4563-81e9-82c874be9d83" xlink:to="loc_us-gaap_AccruedInsuranceCurrent_9c709658-8a07-49e0-89f7-dfe719ea13bd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_53736a13-b7f7-4b5b-8f9c-df14884c16b9" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OperatingLeaseLiabilityCurrent"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_ee388190-b0ab-4563-81e9-82c874be9d83" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_53736a13-b7f7-4b5b-8f9c-df14884c16b9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedIncomeTaxesCurrent_adeb7a96-68d5-4133-81ca-eac0cafb0706" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AccruedIncomeTaxesCurrent"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_ee388190-b0ab-4563-81e9-82c874be9d83" xlink:to="loc_us-gaap_AccruedIncomeTaxesCurrent_adeb7a96-68d5-4133-81ca-eac0cafb0706" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesCurrent_74b8e2ac-fed9-4a79-9e67-1dbdd11ac2da" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherLiabilitiesCurrent"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_ee388190-b0ab-4563-81e9-82c874be9d83" xlink:to="loc_us-gaap_OtherLiabilitiesCurrent_74b8e2ac-fed9-4a79-9e67-1dbdd11ac2da" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ConsolidatedStatementsofCashFlows" xlink:type="simple" xlink:href="mtrx-20220630.xsd#ConsolidatedStatementsofCashFlows"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/ConsolidatedStatementsofCashFlows" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_c6632f3e-afd9-4be7-bbc2-466e62f2e667" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfitLoss_6720a828-b877-433e-baae-54ce918e13b1" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_c6632f3e-afd9-4be7-bbc2-466e62f2e667" xlink:to="loc_us-gaap_ProfitLoss_6720a828-b877-433e-baae-54ce918e13b1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_99b6637a-b864-4918-a2ef-41d23a475452" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_c6632f3e-afd9-4be7-bbc2-466e62f2e667" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_99b6637a-b864-4918-a2ef-41d23a475452" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillAndIntangibleAssetImpairment_4bc7241d-eba1-4b93-ac19-b54a68d1ed31" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_c6632f3e-afd9-4be7-bbc2-466e62f2e667" xlink:to="loc_us-gaap_GoodwillAndIntangibleAssetImpairment_4bc7241d-eba1-4b93-ac19-b54a68d1ed31" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensation_bdda7a9b-3095-4b72-bcd0-1c4546e820e9" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_c6632f3e-afd9-4be7-bbc2-466e62f2e667" xlink:to="loc_us-gaap_ShareBasedCompensation_bdda7a9b-3095-4b72-bcd0-1c4546e820e9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetImpairmentCharges_1f047903-3fb7-4987-a669-910b0761f3b4" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherAssetImpairmentCharges"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_c6632f3e-afd9-4be7-bbc2-466e62f2e667" xlink:to="loc_us-gaap_OtherAssetImpairmentCharges_1f047903-3fb7-4987-a669-910b0761f3b4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_DeferredIncomeTaxExpenseBenefitSocf_9faa10ac-953e-4f11-b92b-0a7b6ca50139" xlink:href="mtrx-20220630.xsd#mtrx_DeferredIncomeTaxExpenseBenefitSocf"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_c6632f3e-afd9-4be7-bbc2-466e62f2e667" xlink:to="loc_mtrx_DeferredIncomeTaxExpenseBenefitSocf_9faa10ac-953e-4f11-b92b-0a7b6ca50139" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnSaleOfPropertyPlantEquipment_83720369-2525-42c6-ba46-7daa21109664" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_c6632f3e-afd9-4be7-bbc2-466e62f2e667" xlink:to="loc_us-gaap_GainLossOnSaleOfPropertyPlantEquipment_83720369-2525-42c6-ba46-7daa21109664" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProvisionForDoubtfulAccounts_e4346725-8159-419a-b6b7-fc8f8acc6c8d" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_c6632f3e-afd9-4be7-bbc2-466e62f2e667" xlink:to="loc_us-gaap_ProvisionForDoubtfulAccounts_e4346725-8159-419a-b6b7-fc8f8acc6c8d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNoncashExpense_eae916c3-ff64-4e72-9721-d7c8f5950b9b" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_c6632f3e-afd9-4be7-bbc2-466e62f2e667" xlink:to="loc_us-gaap_OtherNoncashExpense_eae916c3-ff64-4e72-9721-d7c8f5950b9b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNoncashIncomeExpense_a731f636-e422-4d22-997a-20ac5d3f6ffb" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_c6632f3e-afd9-4be7-bbc2-466e62f2e667" xlink:to="loc_us-gaap_OtherNoncashIncomeExpense_a731f636-e422-4d22-997a-20ac5d3f6ffb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_9b517d57-9ee2-459e-a2cc-442be3887fc1" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_c6632f3e-afd9-4be7-bbc2-466e62f2e667" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_9b517d57-9ee2-459e-a2cc-442be3887fc1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInContractWithCustomerAsset_f9a085d5-3ec7-4845-b345-c733a216a358" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_c6632f3e-afd9-4be7-bbc2-466e62f2e667" xlink:to="loc_us-gaap_IncreaseDecreaseInContractWithCustomerAsset_f9a085d5-3ec7-4845-b345-c733a216a358" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInInventories_c2c8502c-993c-4136-b31c-7d32267bf9ad" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_c6632f3e-afd9-4be7-bbc2-466e62f2e667" xlink:to="loc_us-gaap_IncreaseDecreaseInInventories_c2c8502c-993c-4136-b31c-7d32267bf9ad" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherOperatingAssets_76954e11-ea9b-40f8-aa25-724d773efd70" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_c6632f3e-afd9-4be7-bbc2-466e62f2e667" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherOperatingAssets_76954e11-ea9b-40f8-aa25-724d773efd70" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayable_6abb23ed-0cce-4fbe-85bd-447a7956c479" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_c6632f3e-afd9-4be7-bbc2-466e62f2e667" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayable_6abb23ed-0cce-4fbe-85bd-447a7956c479" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInContractWithCustomerLiability_96569ec3-0709-4893-a7a0-b896b8397f64" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_c6632f3e-afd9-4be7-bbc2-466e62f2e667" xlink:to="loc_us-gaap_IncreaseDecreaseInContractWithCustomerLiability_96569ec3-0709-4893-a7a0-b896b8397f64" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_5a456f6a-4a50-4b6e-a856-1b32916fbb0e" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_c6632f3e-afd9-4be7-bbc2-466e62f2e667" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_5a456f6a-4a50-4b6e-a856-1b32916fbb0e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c5d28579-dfbf-4f14-abf4-8a1c6c3dc9de" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_AdvancesUnderSeniorSecuredRevolvingCreditFacility_c57e3f7a-2712-4786-869c-62f9d2603039" xlink:href="mtrx-20220630.xsd#mtrx_AdvancesUnderSeniorSecuredRevolvingCreditFacility"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c5d28579-dfbf-4f14-abf4-8a1c6c3dc9de" xlink:to="loc_mtrx_AdvancesUnderSeniorSecuredRevolvingCreditFacility_c57e3f7a-2712-4786-869c-62f9d2603039" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_RepaymentsOfAdvancesUnderSeniorSecuredRevolvingCreditFacility_a254c864-af4e-4ed1-889f-4549eb102259" xlink:href="mtrx-20220630.xsd#mtrx_RepaymentsOfAdvancesUnderSeniorSecuredRevolvingCreditFacility"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c5d28579-dfbf-4f14-abf4-8a1c6c3dc9de" xlink:to="loc_mtrx_RepaymentsOfAdvancesUnderSeniorSecuredRevolvingCreditFacility_a254c864-af4e-4ed1-889f-4549eb102259" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromLongTermLinesOfCredit_9c7858f3-34ee-423b-ade1-5ef3bf2c6603" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ProceedsFromLongTermLinesOfCredit"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c5d28579-dfbf-4f14-abf4-8a1c6c3dc9de" xlink:to="loc_us-gaap_ProceedsFromLongTermLinesOfCredit_9c7858f3-34ee-423b-ade1-5ef3bf2c6603" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfLongTermLinesOfCredit_dae31a24-b86e-4d9c-aaeb-97aef42a4e94" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_RepaymentsOfLongTermLinesOfCredit"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c5d28579-dfbf-4f14-abf4-8a1c6c3dc9de" xlink:to="loc_us-gaap_RepaymentsOfLongTermLinesOfCredit_dae31a24-b86e-4d9c-aaeb-97aef42a4e94" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsOfDebtIssuanceCosts_4e986428-2287-4090-ab61-3274447f7a86" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PaymentsOfDebtIssuanceCosts"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c5d28579-dfbf-4f14-abf4-8a1c6c3dc9de" xlink:to="loc_us-gaap_PaymentsOfDebtIssuanceCosts_4e986428-2287-4090-ab61-3274447f7a86" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_e3f8f5ce-a209-4aaf-a9e7-67ef85cf13cf" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PaymentsForRepurchaseOfCommonStock"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c5d28579-dfbf-4f14-abf4-8a1c6c3dc9de" xlink:to="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_e3f8f5ce-a209-4aaf-a9e7-67ef85cf13cf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromStockOptionsExercised_ac1c0161-6d0b-4a5b-a65d-7455ed4baf66" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ProceedsFromStockOptionsExercised"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c5d28579-dfbf-4f14-abf4-8a1c6c3dc9de" xlink:to="loc_us-gaap_ProceedsFromStockOptionsExercised_ac1c0161-6d0b-4a5b-a65d-7455ed4baf66" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromStockPlans_5ecbb82a-ba87-49ed-abdf-450ed1dae782" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ProceedsFromStockPlans"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c5d28579-dfbf-4f14-abf4-8a1c6c3dc9de" xlink:to="loc_us-gaap_ProceedsFromStockPlans_5ecbb82a-ba87-49ed-abdf-450ed1dae782" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForRepurchaseOfOtherEquity_a78375b8-3116-4154-8af0-9bb4cbaa8814" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PaymentsForRepurchaseOfOtherEquity"/>
    <link:calculationArc order="9" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c5d28579-dfbf-4f14-abf4-8a1c6c3dc9de" xlink:to="loc_us-gaap_PaymentsForRepurchaseOfOtherEquity_a78375b8-3116-4154-8af0-9bb4cbaa8814" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfOtherDebt_ff56bb32-f48d-4eda-a349-08e9b1376ef2" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_RepaymentsOfOtherDebt"/>
    <link:calculationArc order="10" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c5d28579-dfbf-4f14-abf4-8a1c6c3dc9de" xlink:to="loc_us-gaap_RepaymentsOfOtherDebt_ff56bb32-f48d-4eda-a349-08e9b1376ef2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_9b915100-565c-4700-a5db-38f1eb859a31" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_f92717ca-f212-4ff0-9cdf-cd851a0f18b8" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_9b915100-565c-4700-a5db-38f1eb859a31" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_f92717ca-f212-4ff0-9cdf-cd851a0f18b8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromDivestitureOfBusinesses_6f2dc20c-3312-45c5-94a0-d52cfc02f33d" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ProceedsFromDivestitureOfBusinesses"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_9b915100-565c-4700-a5db-38f1eb859a31" xlink:to="loc_us-gaap_ProceedsFromDivestitureOfBusinesses_6f2dc20c-3312-45c5-94a0-d52cfc02f33d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleOfProductiveAssets_a0d6a8b6-de15-49d0-85bd-b5457eb428f0" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ProceedsFromSaleOfProductiveAssets"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_9b915100-565c-4700-a5db-38f1eb859a31" xlink:to="loc_us-gaap_ProceedsFromSaleOfProductiveAssets_a0d6a8b6-de15-49d0-85bd-b5457eb428f0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired_797a8abf-1587-4ba7-9e1e-0f1799bc5951" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_9b915100-565c-4700-a5db-38f1eb859a31" xlink:to="loc_us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired_797a8abf-1587-4ba7-9e1e-0f1799bc5951" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_95840789-3296-4ce5-9bf5-80886d1762bf" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsIncludingDisposalGroupAndDiscontinuedOperations_47c4504c-78dd-480d-97d9-c2a5b498c945" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsIncludingDisposalGroupAndDiscontinuedOperations"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_95840789-3296-4ce5-9bf5-80886d1762bf" xlink:to="loc_us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsIncludingDisposalGroupAndDiscontinuedOperations_47c4504c-78dd-480d-97d9-c2a5b498c945" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_88e9dbed-912c-43b1-8775-e40d131bc5f1" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_95840789-3296-4ce5-9bf5-80886d1762bf" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_88e9dbed-912c-43b1-8775-e40d131bc5f1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_356976a0-f1f1-4435-8ea9-4cf2d4e4afc2" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_95840789-3296-4ce5-9bf5-80886d1762bf" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_356976a0-f1f1-4435-8ea9-4cf2d4e4afc2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_af04d6a5-c1d7-4038-aab5-6da7a15ad79f" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_95840789-3296-4ce5-9bf5-80886d1762bf" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_af04d6a5-c1d7-4038-aab5-6da7a15ad79f" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/GoodwillandOtherIntangibleAssetsDetailsTextual" xlink:type="simple" xlink:href="mtrx-20220630.xsd#GoodwillandOtherIntangibleAssetsDetailsTextual"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/GoodwillandOtherIntangibleAssetsDetailsTextual" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsNet_fe0bfd1c-351b-40f2-8d0e-bc5ac345439c" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FiniteLivedIntangibleAssetsNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths_8bfa3bef-3b6e-47d7-a45d-74f212a5acc4" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_fe0bfd1c-351b-40f2-8d0e-bc5ac345439c" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths_8bfa3bef-3b6e-47d7-a45d-74f212a5acc4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo_e9f5396a-6370-4aaf-98ed-d1b4503359d6" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_fe0bfd1c-351b-40f2-8d0e-bc5ac345439c" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo_e9f5396a-6370-4aaf-98ed-d1b4503359d6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree_8103bca8-f138-450c-9893-881d198f3d0e" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_fe0bfd1c-351b-40f2-8d0e-bc5ac345439c" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree_8103bca8-f138-450c-9893-881d198f3d0e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour_5b6089fe-adbb-4077-b7f9-09fe62227421" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_fe0bfd1c-351b-40f2-8d0e-bc5ac345439c" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour_5b6089fe-adbb-4077-b7f9-09fe62227421" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFive_bec37cd1-68c4-4602-a736-7c007f7d244e" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFive"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_fe0bfd1c-351b-40f2-8d0e-bc5ac345439c" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFive_bec37cd1-68c4-4602-a736-7c007f7d244e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseAfterYearFive_5449b821-69bd-4512-8903-3a37094719ba" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseAfterYearFive"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_fe0bfd1c-351b-40f2-8d0e-bc5ac345439c" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseAfterYearFive_5449b821-69bd-4512-8903-3a37094719ba" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/GoodwillandOtherIntangibleAssetsDetails1" xlink:type="simple" xlink:href="mtrx-20220630.xsd#GoodwillandOtherIntangibleAssetsDetails1"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/GoodwillandOtherIntangibleAssetsDetails1" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsNet_62bd16aa-bd7e-4fd4-9e9f-3aab6b1ee8c4" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FiniteLivedIntangibleAssetsNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_e0820345-5dde-47c7-8e67-1cd844879cc5" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_62bd16aa-bd7e-4fd4-9e9f-3aab6b1ee8c4" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_e0820345-5dde-47c7-8e67-1cd844879cc5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsGross_03ab5614-275a-4629-a20e-ffcef3c1f67e" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FiniteLivedIntangibleAssetsGross"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_62bd16aa-bd7e-4fd4-9e9f-3aab6b1ee8c4" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsGross_03ab5614-275a-4629-a20e-ffcef3c1f67e" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IncomeTaxSourcesDetails" xlink:type="simple" xlink:href="mtrx-20220630.xsd#IncomeTaxSourcesDetails"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/IncomeTaxSourcesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_c34dd357-48a6-42a9-bbca-8afe248b3f14" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesDomestic_24d0290b-3131-4f31-92f3-8aaa50935b3c" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesDomestic"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_c34dd357-48a6-42a9-bbca-8afe248b3f14" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesDomestic_24d0290b-3131-4f31-92f3-8aaa50935b3c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesForeign_74c3df89-4d0c-483a-ad37-84a144c22fe8" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesForeign"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_c34dd357-48a6-42a9-bbca-8afe248b3f14" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesForeign_74c3df89-4d0c-483a-ad37-84a144c22fe8" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CurrentandDeferredIncomeTaxesDetails" xlink:type="simple" xlink:href="mtrx-20220630.xsd#CurrentandDeferredIncomeTaxesDetails"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/CurrentandDeferredIncomeTaxesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_1c7fb9de-70bd-46fb-b1da-62f059a1c364" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_79ee5c3f-4d7b-4ac9-8fdd-a0b8b5f3185a" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_CurrentIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_1c7fb9de-70bd-46fb-b1da-62f059a1c364" xlink:to="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_79ee5c3f-4d7b-4ac9-8fdd-a0b8b5f3185a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_996be6a3-44f7-4dad-9562-b6878c093a92" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_1c7fb9de-70bd-46fb-b1da-62f059a1c364" xlink:to="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_996be6a3-44f7-4dad-9562-b6878c093a92" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_ee772009-2003-40eb-a803-af9cd8d0fbf9" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredFederalIncomeTaxExpenseBenefit_87cb0616-8bb7-4fed-84e9-9c19c02a08b1" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredFederalIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_ee772009-2003-40eb-a803-af9cd8d0fbf9" xlink:to="loc_us-gaap_DeferredFederalIncomeTaxExpenseBenefit_87cb0616-8bb7-4fed-84e9-9c19c02a08b1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredStateAndLocalIncomeTaxExpenseBenefit_bb325def-21fd-4a74-9c57-56c22702d8ba" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredStateAndLocalIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_ee772009-2003-40eb-a803-af9cd8d0fbf9" xlink:to="loc_us-gaap_DeferredStateAndLocalIncomeTaxExpenseBenefit_bb325def-21fd-4a74-9c57-56c22702d8ba" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredForeignIncomeTaxExpenseBenefit_0c048fb0-4886-455b-8f71-14dd968bf6ea" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredForeignIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_ee772009-2003-40eb-a803-af9cd8d0fbf9" xlink:to="loc_us-gaap_DeferredForeignIncomeTaxExpenseBenefit_0c048fb0-4886-455b-8f71-14dd968bf6ea" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_3a7b1818-79e5-4011-a18a-a377176444b7" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_CurrentIncomeTaxExpenseBenefit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentFederalTaxExpenseBenefit_a1e2ba3c-2950-4a99-8d72-a6c37e9fd76c" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_CurrentFederalTaxExpenseBenefit"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_3a7b1818-79e5-4011-a18a-a377176444b7" xlink:to="loc_us-gaap_CurrentFederalTaxExpenseBenefit_a1e2ba3c-2950-4a99-8d72-a6c37e9fd76c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentStateAndLocalTaxExpenseBenefit_51397a10-f8ee-4b14-b840-72dbfb9852c0" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_CurrentStateAndLocalTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_3a7b1818-79e5-4011-a18a-a377176444b7" xlink:to="loc_us-gaap_CurrentStateAndLocalTaxExpenseBenefit_51397a10-f8ee-4b14-b840-72dbfb9852c0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentForeignTaxExpenseBenefit_0974559b-e3ea-4ed1-9f03-7091d744f29c" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_CurrentForeignTaxExpenseBenefit"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_3a7b1818-79e5-4011-a18a-a377176444b7" xlink:to="loc_us-gaap_CurrentForeignTaxExpenseBenefit_0974559b-e3ea-4ed1-9f03-7091d744f29c" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IncomeTaxRateReconciliationDetails" xlink:type="simple" xlink:href="mtrx-20220630.xsd#IncomeTaxRateReconciliationDetails"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/IncomeTaxRateReconciliationDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_72dbea94-7a39-4374-8cf5-46a71bff225f" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationIncomeTaxExpenseBenefitAtFederalStatutoryIncomeTaxRate_77faaea9-9813-41bf-b51a-5412d16fb45a" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncomeTaxReconciliationIncomeTaxExpenseBenefitAtFederalStatutoryIncomeTaxRate"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_72dbea94-7a39-4374-8cf5-46a71bff225f" xlink:to="loc_us-gaap_IncomeTaxReconciliationIncomeTaxExpenseBenefitAtFederalStatutoryIncomeTaxRate_77faaea9-9813-41bf-b51a-5412d16fb45a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationStateAndLocalIncomeTaxes_b545bc14-d7a9-46dc-856f-206096936011" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncomeTaxReconciliationStateAndLocalIncomeTaxes"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_72dbea94-7a39-4374-8cf5-46a71bff225f" xlink:to="loc_us-gaap_IncomeTaxReconciliationStateAndLocalIncomeTaxes_b545bc14-d7a9-46dc-856f-206096936011" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationNondeductibleExpenseImpairmentLosses_d1d192c1-a6e4-4ba3-8d70-d3061837e3a5" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncomeTaxReconciliationNondeductibleExpenseImpairmentLosses"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_72dbea94-7a39-4374-8cf5-46a71bff225f" xlink:to="loc_us-gaap_IncomeTaxReconciliationNondeductibleExpenseImpairmentLosses_d1d192c1-a6e4-4ba3-8d70-d3061837e3a5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_IncomeTaxReconciliationChargesWithoutTaxBenefit_278231b3-5335-4935-8890-79b4be8abfdb" xlink:href="mtrx-20220630.xsd#mtrx_IncomeTaxReconciliationChargesWithoutTaxBenefit"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_72dbea94-7a39-4374-8cf5-46a71bff225f" xlink:to="loc_mtrx_IncomeTaxReconciliationChargesWithoutTaxBenefit_278231b3-5335-4935-8890-79b4be8abfdb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationChangeInDeferredTaxAssetsValuationAllowance_b47a05ce-a4e9-41cf-ad2c-39aad3c755a9" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncomeTaxReconciliationChangeInDeferredTaxAssetsValuationAllowance"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_72dbea94-7a39-4374-8cf5-46a71bff225f" xlink:to="loc_us-gaap_IncomeTaxReconciliationChangeInDeferredTaxAssetsValuationAllowance_b47a05ce-a4e9-41cf-ad2c-39aad3c755a9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_Reversalofbranchliability_321e5e7f-293d-4f15-9adc-a94821b52fb5" xlink:href="mtrx-20220630.xsd#mtrx_Reversalofbranchliability"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_72dbea94-7a39-4374-8cf5-46a71bff225f" xlink:to="loc_mtrx_Reversalofbranchliability_321e5e7f-293d-4f15-9adc-a94821b52fb5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_Effectofnewaccountingstandardcomparedtooldstandard_56f5aaeb-e50f-480e-a73d-93a8e7c92000" xlink:href="mtrx-20220630.xsd#mtrx_Effectofnewaccountingstandardcomparedtooldstandard"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_72dbea94-7a39-4374-8cf5-46a71bff225f" xlink:to="loc_mtrx_Effectofnewaccountingstandardcomparedtooldstandard_56f5aaeb-e50f-480e-a73d-93a8e7c92000" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationOtherReconcilingItems_b35ecd3d-7d36-4bcb-b729-5aeec94eee6a" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncomeTaxReconciliationOtherReconcilingItems"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_72dbea94-7a39-4374-8cf5-46a71bff225f" xlink:to="loc_us-gaap_IncomeTaxReconciliationOtherReconcilingItems_b35ecd3d-7d36-4bcb-b729-5aeec94eee6a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationTaxCreditsResearch_ab530cf2-fe72-4779-9ec4-4b1e139a82e5" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncomeTaxReconciliationTaxCreditsResearch"/>
    <link:calculationArc order="9" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_72dbea94-7a39-4374-8cf5-46a71bff225f" xlink:to="loc_us-gaap_IncomeTaxReconciliationTaxCreditsResearch_ab530cf2-fe72-4779-9ec4-4b1e139a82e5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationForeignIncomeTaxRateDifferential_494c16a8-5242-45e7-89a8-ab78491df37a" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncomeTaxReconciliationForeignIncomeTaxRateDifferential"/>
    <link:calculationArc order="10" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_72dbea94-7a39-4374-8cf5-46a71bff225f" xlink:to="loc_us-gaap_IncomeTaxReconciliationForeignIncomeTaxRateDifferential_494c16a8-5242-45e7-89a8-ab78491df37a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationPriorYearIncomeTaxes_042511d2-a9f5-4d7b-a68d-726418ab6d29" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncomeTaxReconciliationPriorYearIncomeTaxes"/>
    <link:calculationArc order="11" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_72dbea94-7a39-4374-8cf5-46a71bff225f" xlink:to="loc_us-gaap_IncomeTaxReconciliationPriorYearIncomeTaxes_042511d2-a9f5-4d7b-a68d-726418ab6d29" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationTaxContingenciesOther_cf577f4f-6f85-4699-828f-0251bf0e7dd4" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncomeTaxReconciliationTaxContingenciesOther"/>
    <link:calculationArc order="12" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_72dbea94-7a39-4374-8cf5-46a71bff225f" xlink:to="loc_us-gaap_IncomeTaxReconciliationTaxContingenciesOther_cf577f4f-6f85-4699-828f-0251bf0e7dd4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationOtherAdjustments_337d789c-e73e-4290-9c07-3470e5c46a85" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncomeTaxReconciliationOtherAdjustments"/>
    <link:calculationArc order="13" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_72dbea94-7a39-4374-8cf5-46a71bff225f" xlink:to="loc_us-gaap_IncomeTaxReconciliationOtherAdjustments_337d789c-e73e-4290-9c07-3470e5c46a85" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/DeferredIncomeTaxAssetsandLiabilitiesDetailsDetails" xlink:type="simple" xlink:href="mtrx-20220630.xsd#DeferredIncomeTaxAssetsandLiabilitiesDetailsDetails"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/DeferredIncomeTaxAssetsandLiabilitiesDetailsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsNet_31e9671e-bd32-462f-8b5d-9e7af1572466" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredTaxAssetsNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsWarrantyReserves_258bc966-afbd-40a3-922f-f862a02d189b" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsWarrantyReserves"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_31e9671e-bd32-462f-8b5d-9e7af1572466" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsWarrantyReserves_258bc966-afbd-40a3-922f-f862a02d189b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsAllowanceForDoubtfulAccounts_8aa02816-f406-4720-a245-9c9685519503" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsAllowanceForDoubtfulAccounts"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_31e9671e-bd32-462f-8b5d-9e7af1572466" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsAllowanceForDoubtfulAccounts_8aa02816-f406-4720-a245-9c9685519503" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsCompensatedAbsences_2e1e380e-71d2-440c-baea-5e2a12ff3c93" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsCompensatedAbsences"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_31e9671e-bd32-462f-8b5d-9e7af1572466" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsCompensatedAbsences_2e1e380e-71d2-440c-baea-5e2a12ff3c93" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_DeferredTaxAssetsInsuranceReserve_99486e75-1f46-449e-9a0f-9af7629338bb" xlink:href="mtrx-20220630.xsd#mtrx_DeferredTaxAssetsInsuranceReserve"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_31e9671e-bd32-462f-8b5d-9e7af1572466" xlink:to="loc_mtrx_DeferredTaxAssetsInsuranceReserve_99486e75-1f46-449e-9a0f-9af7629338bb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsLegalSettlements_90786836-d2ba-4716-bf66-d3e29d6ed571" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsLegalSettlements"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_31e9671e-bd32-462f-8b5d-9e7af1572466" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsLegalSettlements_90786836-d2ba-4716-bf66-d3e29d6ed571" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxCreditCarryforwards_d19b0a6b-25d1-40af-b052-0501de01230c" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredTaxAssetsTaxCreditCarryforwards"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_31e9671e-bd32-462f-8b5d-9e7af1572466" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxCreditCarryforwards_d19b0a6b-25d1-40af-b052-0501de01230c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsValuationAllowance_c6b210ec-b1c7-4101-8e5c-1fa279a56d3e" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredTaxAssetsValuationAllowance"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_31e9671e-bd32-462f-8b5d-9e7af1572466" xlink:to="loc_us-gaap_DeferredTaxAssetsValuationAllowance_c6b210ec-b1c7-4101-8e5c-1fa279a56d3e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsPensions_1b60c88b-c7dd-4b91-a5a5-498d4fb4fa40" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsPensions"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_31e9671e-bd32-462f-8b5d-9e7af1572466" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsPensions_1b60c88b-c7dd-4b91-a5a5-498d4fb4fa40" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpense_22e6b199-a103-4c02-8161-b46923119164" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpense"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_31e9671e-bd32-462f-8b5d-9e7af1572466" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpense_22e6b199-a103-4c02-8161-b46923119164" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost_2bec8021-ea04-4b34-8d95-da9b83957d54" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost"/>
    <link:calculationArc order="10" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_31e9671e-bd32-462f-8b5d-9e7af1572466" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost_2bec8021-ea04-4b34-8d95-da9b83957d54" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_DeferredTaxAssetsAccruedLosses_13eb3ead-e015-4286-a7de-6af1896cd54f" xlink:href="mtrx-20220630.xsd#mtrx_DeferredTaxAssetsAccruedLosses"/>
    <link:calculationArc order="11" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_31e9671e-bd32-462f-8b5d-9e7af1572466" xlink:to="loc_mtrx_DeferredTaxAssetsAccruedLosses_13eb3ead-e015-4286-a7de-6af1896cd54f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsRestructuringCharges_2ab6e174-3949-40fd-92ec-11b455fcad4c" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsRestructuringCharges"/>
    <link:calculationArc order="12" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_31e9671e-bd32-462f-8b5d-9e7af1572466" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsRestructuringCharges_2ab6e174-3949-40fd-92ec-11b455fcad4c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsGoodwillAndIntangibleAssets_38cc3769-76e0-42b8-aefe-7c6096445ead" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredTaxAssetsGoodwillAndIntangibleAssets"/>
    <link:calculationArc order="13" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_31e9671e-bd32-462f-8b5d-9e7af1572466" xlink:to="loc_us-gaap_DeferredTaxAssetsGoodwillAndIntangibleAssets_38cc3769-76e0-42b8-aefe-7c6096445ead" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsEmployeeCompensation_065894bc-695e-4a4f-b3f8-7e9a485f4348" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsEmployeeCompensation"/>
    <link:calculationArc order="14" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_31e9671e-bd32-462f-8b5d-9e7af1572466" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsEmployeeCompensation_065894bc-695e-4a4f-b3f8-7e9a485f4348" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsOther_ed5c9ebd-d4e8-4678-8c16-916b78ecf527" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredTaxAssetsOther"/>
    <link:calculationArc order="15" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_31e9671e-bd32-462f-8b5d-9e7af1572466" xlink:to="loc_us-gaap_DeferredTaxAssetsOther_ed5c9ebd-d4e8-4678-8c16-916b78ecf527" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilities_003852ec-7af2-440d-9235-f72a5bbde73a" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredIncomeTaxLiabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesPropertyPlantAndEquipment_1b2a7a70-4168-4782-a7aa-1bb20b296055" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredTaxLiabilitiesPropertyPlantAndEquipment"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_003852ec-7af2-440d-9235-f72a5bbde73a" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesPropertyPlantAndEquipment_1b2a7a70-4168-4782-a7aa-1bb20b296055" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesGoodwillAndIntangibleAssetsGoodwill_87a63159-d80e-42b7-ba9b-37a871876fb8" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredTaxLiabilitiesGoodwillAndIntangibleAssetsGoodwill"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_003852ec-7af2-440d-9235-f72a5bbde73a" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesGoodwillAndIntangibleAssetsGoodwill_87a63159-d80e-42b7-ba9b-37a871876fb8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_FutureBranchLiability_b0fce0ff-88a9-48d4-b54b-4316a1f81230" xlink:href="mtrx-20220630.xsd#mtrx_FutureBranchLiability"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_003852ec-7af2-440d-9235-f72a5bbde73a" xlink:to="loc_mtrx_FutureBranchLiability_b0fce0ff-88a9-48d4-b54b-4316a1f81230" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesOther_a1536dd7-25a7-40c0-9301-1baf586e4c1f" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredTaxLiabilitiesOther"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_003852ec-7af2-440d-9235-f72a5bbde73a" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesOther_a1536dd7-25a7-40c0-9301-1baf586e4c1f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsLiabilitiesNet_a3ad37b2-df56-4e2b-ba5c-4878f0830c01" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredTaxAssetsLiabilitiesNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsNet_4c8f3ecb-0152-40ad-9275-0e34bf49a662" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredTaxAssetsNet"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsLiabilitiesNet_a3ad37b2-df56-4e2b-ba5c-4878f0830c01" xlink:to="loc_us-gaap_DeferredTaxAssetsNet_4c8f3ecb-0152-40ad-9275-0e34bf49a662" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilities_f7c5e7be-0e83-4f56-9617-eab349df2d15" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredIncomeTaxLiabilities"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsLiabilitiesNet_a3ad37b2-df56-4e2b-ba5c-4878f0830c01" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilities_f7c5e7be-0e83-4f56-9617-eab349df2d15" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/DeferredIncomeTaxAssetsandLiabilitiesSummaryDetails" xlink:type="simple" xlink:href="mtrx-20220630.xsd#DeferredIncomeTaxAssetsandLiabilitiesSummaryDetails"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/DeferredIncomeTaxAssetsandLiabilitiesSummaryDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsLiabilitiesNet_549a7b74-b400-433e-becc-27f3de85fd49" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredTaxAssetsLiabilitiesNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_72d7a808-1cd9-4b7c-a698-38bcd67973f3" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredIncomeTaxAssetsNet"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsLiabilitiesNet_549a7b74-b400-433e-becc-27f3de85fd49" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_72d7a808-1cd9-4b7c-a698-38bcd67973f3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_8631c2ec-5e97-43b0-a037-8862439e81fd" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_DeferredTaxAssetsLiabilitiesNet_549a7b74-b400-433e-becc-27f3de85fd49" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_8631c2ec-5e97-43b0-a037-8862439e81fd" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/LeasesComponentsofLeaseCostsDetails" xlink:type="simple" xlink:href="mtrx-20220630.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_e9f323be-6979-4776-851e-f1e82dd64cf3" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LeaseCost"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseCost_0eab5410-ae96-4756-8d48-3a4425db5853" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_e9f323be-6979-4776-851e-f1e82dd64cf3" xlink:to="loc_us-gaap_OperatingLeaseCost_0eab5410-ae96-4756-8d48-3a4425db5853" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermLeaseCost_e5a6335c-a15c-4db6-8cab-f1fdd7b7ae23" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_e9f323be-6979-4776-851e-f1e82dd64cf3" xlink:to="loc_us-gaap_ShortTermLeaseCost_e5a6335c-a15c-4db6-8cab-f1fdd7b7ae23" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails" xlink:type="simple" xlink:href="mtrx-20220630.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_1431bc8e-0cb9-4ee9-aa6d-2ee9ff93f8e3" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_7c663b31-d97d-411a-972d-c873c113705f" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_1431bc8e-0cb9-4ee9-aa6d-2ee9ff93f8e3" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_7c663b31-d97d-411a-972d-c873c113705f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_09146431-fe87-49d4-a666-4ebfb3736462" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_1431bc8e-0cb9-4ee9-aa6d-2ee9ff93f8e3" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_09146431-fe87-49d4-a666-4ebfb3736462" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_824d2250-5ada-4019-ad62-b923579f6d76" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_1431bc8e-0cb9-4ee9-aa6d-2ee9ff93f8e3" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_824d2250-5ada-4019-ad62-b923579f6d76" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_1a8bd280-ad1f-402c-b4b6-a837434c6f9c" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_1431bc8e-0cb9-4ee9-aa6d-2ee9ff93f8e3" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_1a8bd280-ad1f-402c-b4b6-a837434c6f9c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive_56560024-7f94-4d20-98d1-49f7e5873aac" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_1431bc8e-0cb9-4ee9-aa6d-2ee9ff93f8e3" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive_56560024-7f94-4d20-98d1-49f7e5873aac" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive_f1b694dd-28dc-4ba6-864c-a7bf3ef3522d" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_1431bc8e-0cb9-4ee9-aa6d-2ee9ff93f8e3" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive_f1b694dd-28dc-4ba6-864c-a7bf3ef3522d" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/EarningsperCommonShareDetails" xlink:type="simple" xlink:href="mtrx-20220630.xsd#EarningsperCommonShareDetails"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/EarningsperCommonShareDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_512f0a92-9381-49cd-8b71-92410bc153ed" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_49e2c52e-b26a-4e7d-8646-8d49aefe92a1" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingBasic"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_512f0a92-9381-49cd-8b71-92410bc153ed" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_49e2c52e-b26a-4e7d-8646-8d49aefe92a1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_f3a0bd30-8ea6-42c9-822b-d89b64d6f41a" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_512f0a92-9381-49cd-8b71-92410bc153ed" xlink:to="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_f3a0bd30-8ea6-42c9-822b-d89b64d6f41a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncrementalCommonSharesAttributableToNonvestedSharesWithForfeitableDividends_85f457ee-c899-4dc7-bbad-b73d4156b1b0" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.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_512f0a92-9381-49cd-8b71-92410bc153ed" xlink:to="loc_us-gaap_IncrementalCommonSharesAttributableToNonvestedSharesWithForfeitableDividends_85f457ee-c899-4dc7-bbad-b73d4156b1b0" xlink:type="arc"/>
  </link:calculationLink>
</link:linkbase>
