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

<!--XBRL Document Created with Wdesk from Workiva-->
<!--Copyright 2023 Workiva-->
<!--r:272fc378-07fd-4664-989d-1b8b5525dab9,g:814c2616-ca64-42b1-8678-117f1825529c-->
<link:linkbase xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd">
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome" xlink:type="simple" xlink:href="mtrx-20230331.xsd#CondensedConsolidatedStatementsofIncome"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_95a1f9f5-6cf9-41a4-bb17-f31c5effea33" 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_67b118f0-c461-419b-a76c-cb9e4a57d49e" 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_95a1f9f5-6cf9-41a4-bb17-f31c5effea33" xlink:to="loc_us-gaap_GrossProfit_67b118f0-c461-419b-a76c-cb9e4a57d49e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_055acdbd-f157-4da8-a52c-d8d77080dbcc" 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_95a1f9f5-6cf9-41a4-bb17-f31c5effea33" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_055acdbd-f157-4da8-a52c-d8d77080dbcc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillAndIntangibleAssetImpairment_34c1cec5-8140-4e87-8439-8eea0281a559" 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_95a1f9f5-6cf9-41a4-bb17-f31c5effea33" xlink:to="loc_us-gaap_GoodwillAndIntangibleAssetImpairment_34c1cec5-8140-4e87-8439-8eea0281a559" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCharges_da449d43-9751-4d3f-9a2c-e73297570ab3" 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_95a1f9f5-6cf9-41a4-bb17-f31c5effea33" xlink:to="loc_us-gaap_RestructuringCharges_da449d43-9751-4d3f-9a2c-e73297570ab3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossProfit_1c277889-131a-4dfb-a58f-38d1810aa3b2" 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_fd9007cc-efca-4d68-9207-94ae61a7dc50" 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_1c277889-131a-4dfb-a58f-38d1810aa3b2" xlink:to="loc_us-gaap_Revenues_fd9007cc-efca-4d68-9207-94ae61a7dc50" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfGoodsAndServicesSold_22b2adc9-3cfe-43bc-a5c9-310e3547e5ca" 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_1c277889-131a-4dfb-a58f-38d1810aa3b2" xlink:to="loc_us-gaap_CostOfGoodsAndServicesSold_22b2adc9-3cfe-43bc-a5c9-310e3547e5ca" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfitLoss_bee6e19b-52ba-428a-8914-99bc13821938" 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_d97c6b07-672a-46b6-9dd9-c4a9f06618e4" 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_bee6e19b-52ba-428a-8914-99bc13821938" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_d97c6b07-672a-46b6-9dd9-c4a9f06618e4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_8d5acc79-b440-4df2-a639-d65f0528ae65" 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_bee6e19b-52ba-428a-8914-99bc13821938" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_8d5acc79-b440-4df2-a639-d65f0528ae65" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_56cc80ab-6385-4a7b-ab50-3f645cff245d" 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_2e8e99cb-d8db-453d-b63c-7877c6c2428b" 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_56cc80ab-6385-4a7b-ab50-3f645cff245d" xlink:to="loc_us-gaap_OperatingIncomeLoss_2e8e99cb-d8db-453d-b63c-7877c6c2428b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpense_17f9c10d-6e4d-4bad-b299-5db66e9ef9c0" 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_56cc80ab-6385-4a7b-ab50-3f645cff245d" xlink:to="loc_us-gaap_InterestExpense_17f9c10d-6e4d-4bad-b299-5db66e9ef9c0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeInterest_7f843cdc-fb59-4025-ace4-ef4d2669a50d" 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_56cc80ab-6385-4a7b-ab50-3f645cff245d" xlink:to="loc_us-gaap_InvestmentIncomeInterest_7f843cdc-fb59-4025-ace4-ef4d2669a50d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_26f1a729-c2d6-499a-bb36-1a6bcbc8f4e6" 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_56cc80ab-6385-4a7b-ab50-3f645cff245d" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_26f1a729-c2d6-499a-bb36-1a6bcbc8f4e6" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofComprehensiveIncome" xlink:type="simple" xlink:href="mtrx-20230331.xsd#CondensedConsolidatedStatementsofComprehensiveIncome"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofComprehensiveIncome" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest_a44693b4-960a-4f9f-bc18-dbae88cea72e" 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_a8ebd0e4-1d10-4e70-bcfc-1f08699c61a2" 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_a44693b4-960a-4f9f-bc18-dbae88cea72e" xlink:to="loc_us-gaap_ProfitLoss_a8ebd0e4-1d10-4e70-bcfc-1f08699c61a2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_1774ce05-ed24-4d2a-856e-1dc82e6ba19e" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest_a44693b4-960a-4f9f-bc18-dbae88cea72e" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_1774ce05-ed24-4d2a-856e-1dc82e6ba19e" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets" xlink:type="simple" xlink:href="mtrx-20230331.xsd#CondensedConsolidatedBalanceSheets"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_d9cf5bdc-3fbf-43bc-a92b-ee87517d9c1b" 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_Liabilities_5b80dd5f-b73c-4cac-9346-d75c5e20f1bf" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_Liabilities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_d9cf5bdc-3fbf-43bc-a92b-ee87517d9c1b" xlink:to="loc_us-gaap_Liabilities_5b80dd5f-b73c-4cac-9346-d75c5e20f1bf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_df0eeff9-4c45-4af6-b8a5-52c2dde6aac7" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_d9cf5bdc-3fbf-43bc-a92b-ee87517d9c1b" xlink:to="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_df0eeff9-4c45-4af6-b8a5-52c2dde6aac7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_2139f63a-f591-4aed-b013-e488cc3dbe19" 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_a52f7c59-8b22-49fa-9c26-7384b775a690" 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_2139f63a-f591-4aed-b013-e488cc3dbe19" xlink:to="loc_us-gaap_AccountsPayableCurrent_a52f7c59-8b22-49fa-9c26-7384b775a690" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerLiabilityCurrent_be813b8d-f265-4b92-9450-2b9b38c3d6d5" 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_2139f63a-f591-4aed-b013-e488cc3dbe19" xlink:to="loc_us-gaap_ContractWithCustomerLiabilityCurrent_be813b8d-f265-4b92-9450-2b9b38c3d6d5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_b6ba9598-fc60-405e-ae22-85908bb881ff" 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_2139f63a-f591-4aed-b013-e488cc3dbe19" xlink:to="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_b6ba9598-fc60-405e-ae22-85908bb881ff" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedInsuranceCurrent_a1593d92-fde1-4a8d-9efd-3a871256cc54" 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_2139f63a-f591-4aed-b013-e488cc3dbe19" xlink:to="loc_us-gaap_AccruedInsuranceCurrent_a1593d92-fde1-4a8d-9efd-3a871256cc54" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_006009d4-6fb0-46ee-8cb4-8d036c1dd8fd" 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_2139f63a-f591-4aed-b013-e488cc3dbe19" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_006009d4-6fb0-46ee-8cb4-8d036c1dd8fd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesCurrent_678b546d-3637-4c12-8568-98182b887e20" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherLiabilitiesCurrent"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_2139f63a-f591-4aed-b013-e488cc3dbe19" xlink:to="loc_us-gaap_OtherLiabilitiesCurrent_678b546d-3637-4c12-8568-98182b887e20" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_73fa44fc-3330-4597-9edb-e433af9bf84f" 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_c29248ab-036c-4434-aa62-de92e3c82e3b" 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_73fa44fc-3330-4597-9edb-e433af9bf84f" xlink:to="loc_us-gaap_AssetsCurrent_c29248ab-036c-4434-aa62-de92e3c82e3b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_b567d256-7c04-4d61-b5c0-85b1fd7ebe3c" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_73fa44fc-3330-4597-9edb-e433af9bf84f" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_b567d256-7c04-4d61-b5c0-85b1fd7ebe3c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedCashNoncurrent_94c9a597-9be5-4c58-a660-728628a24476" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_RestrictedCashNoncurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_73fa44fc-3330-4597-9edb-e433af9bf84f" xlink:to="loc_us-gaap_RestrictedCashNoncurrent_94c9a597-9be5-4c58-a660-728628a24476" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_139acb0a-a6dc-4be8-88f0-372f55cdbf70" 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_73fa44fc-3330-4597-9edb-e433af9bf84f" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_139acb0a-a6dc-4be8-88f0-372f55cdbf70" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_1c7a71c9-1469-498d-b3c5-675cd2c4258b" 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_73fa44fc-3330-4597-9edb-e433af9bf84f" xlink:to="loc_us-gaap_Goodwill_1c7a71c9-1469-498d-b3c5-675cd2c4258b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_eb09c996-a8b4-4f75-bf92-38d50f002713" 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_73fa44fc-3330-4597-9edb-e433af9bf84f" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_eb09c996-a8b4-4f75-bf92-38d50f002713" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_48fe7355-01d3-4f20-88bf-ea818848c145" 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_73fa44fc-3330-4597-9edb-e433af9bf84f" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_48fe7355-01d3-4f20-88bf-ea818848c145" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_9584d138-09ad-41c0-950b-837a6f601cad" 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_73fa44fc-3330-4597-9edb-e433af9bf84f" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_9584d138-09ad-41c0-950b-837a6f601cad" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_33679e90-29dc-407d-bfaf-b75b5ad64d74" 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_1f6ccce9-074c-4d97-a145-848c59c44c28" 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_33679e90-29dc-407d-bfaf-b75b5ad64d74" xlink:to="loc_us-gaap_StockholdersEquityBeforeTreasuryStock_1f6ccce9-074c-4d97-a145-848c59c44c28" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockValue_de3c7080-3909-47d6-b7ff-5e0278aedca9" 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_33679e90-29dc-407d-bfaf-b75b5ad64d74" xlink:to="loc_us-gaap_TreasuryStockValue_de3c7080-3909-47d6-b7ff-5e0278aedca9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_80a04da9-fc6a-420b-a6e4-72396aab9a73" 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_9952f51e-bf81-44f0-bce8-b10c4c3360ca" 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_80a04da9-fc6a-420b-a6e4-72396aab9a73" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_9952f51e-bf81-44f0-bce8-b10c4c3360ca" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsReceivableNetCurrent_7c88bb17-1645-4531-8813-575030700093" 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_80a04da9-fc6a-420b-a6e4-72396aab9a73" xlink:to="loc_us-gaap_AccountsReceivableNetCurrent_7c88bb17-1645-4531-8813-575030700093" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerAssetNetCurrent_881cfe76-b5b3-4f80-951d-b74714a0f89e" 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_80a04da9-fc6a-420b-a6e4-72396aab9a73" xlink:to="loc_us-gaap_ContractWithCustomerAssetNetCurrent_881cfe76-b5b3-4f80-951d-b74714a0f89e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryNet_f5c22502-f1ca-43a2-be30-1415ccb3251e" 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_80a04da9-fc6a-420b-a6e4-72396aab9a73" xlink:to="loc_us-gaap_InventoryNet_f5c22502-f1ca-43a2-be30-1415ccb3251e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxesReceivable_e0d19f80-2863-4530-82e0-3caa9afbd615" 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_80a04da9-fc6a-420b-a6e4-72396aab9a73" xlink:to="loc_us-gaap_IncomeTaxesReceivable_e0d19f80-2863-4530-82e0-3caa9afbd615" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseCurrent_d3b98ff3-09b7-4ef7-b7a3-33de918aac2e" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PrepaidExpenseCurrent"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_80a04da9-fc6a-420b-a6e4-72396aab9a73" xlink:to="loc_us-gaap_PrepaidExpenseCurrent_d3b98ff3-09b7-4ef7-b7a3-33de918aac2e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsCurrent_cc021899-4570-43c6-94d7-9c914e9aaabe" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherAssetsCurrent"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_80a04da9-fc6a-420b-a6e4-72396aab9a73" xlink:to="loc_us-gaap_OtherAssetsCurrent_cc021899-4570-43c6-94d7-9c914e9aaabe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_e3000121-89d0-4d0f-8a4b-c4e48444f6b9" 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_80829829-8027-40ee-8855-85c3b66d5b9b" 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_e3000121-89d0-4d0f-8a4b-c4e48444f6b9" xlink:to="loc_us-gaap_LiabilitiesCurrent_80829829-8027-40ee-8855-85c3b66d5b9b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_42d66619-0c73-41ed-8320-d1cdeee3e2c7" 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_e3000121-89d0-4d0f-8a4b-c4e48444f6b9" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_42d66619-0c73-41ed-8320-d1cdeee3e2c7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_d3fd098f-8394-44f0-8fec-d9fd9dd047f9" 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_e3000121-89d0-4d0f-8a4b-c4e48444f6b9" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_d3fd098f-8394-44f0-8fec-d9fd9dd047f9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCredit_61a2bfb6-e7e5-46fa-9db0-a03c812ddc73" 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_e3000121-89d0-4d0f-8a4b-c4e48444f6b9" xlink:to="loc_us-gaap_LineOfCredit_61a2bfb6-e7e5-46fa-9db0-a03c812ddc73" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesNoncurrent_6dda5c27-2d41-45b6-bacf-9900f056b0f1" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherLiabilitiesNoncurrent"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_e3000121-89d0-4d0f-8a4b-c4e48444f6b9" xlink:to="loc_us-gaap_OtherLiabilitiesNoncurrent_6dda5c27-2d41-45b6-bacf-9900f056b0f1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityBeforeTreasuryStock_16de732b-35cc-4d9e-9ac7-e41bf31e8af4" 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_1c89681b-d48e-40d5-9501-d938b25b01b3" 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_16de732b-35cc-4d9e-9ac7-e41bf31e8af4" xlink:to="loc_us-gaap_CommonStockValue_1c89681b-d48e-40d5-9501-d938b25b01b3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapital_277e665c-5d98-4b2b-9fcc-90ba0653b74b" 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_16de732b-35cc-4d9e-9ac7-e41bf31e8af4" xlink:to="loc_us-gaap_AdditionalPaidInCapital_277e665c-5d98-4b2b-9fcc-90ba0653b74b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_52223ccc-a35a-4c7f-ae22-3af0a965551e" 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_16de732b-35cc-4d9e-9ac7-e41bf31e8af4" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_52223ccc-a35a-4c7f-ae22-3af0a965551e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax_69b138a3-0c5c-4ce7-a452-355dd6fa5651" 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_16de732b-35cc-4d9e-9ac7-e41bf31e8af4" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax_69b138a3-0c5c-4ce7-a452-355dd6fa5651" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows" xlink:type="simple" xlink:href="mtrx-20230331.xsd#CondensedConsolidatedStatementsofCashFlows"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_fdfb8ccc-89a7-4704-b0dd-33327630583a" 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_c59f8dcf-4374-4db4-a71f-9d598fedde08" 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_fdfb8ccc-89a7-4704-b0dd-33327630583a" xlink:to="loc_us-gaap_ProfitLoss_c59f8dcf-4374-4db4-a71f-9d598fedde08" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_914b02a8-eb25-4032-8e6d-35ee42985753" 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_fdfb8ccc-89a7-4704-b0dd-33327630583a" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_914b02a8-eb25-4032-8e6d-35ee42985753" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillAndIntangibleAssetImpairment_983b96d3-fa7b-4289-8892-3638da94db9c" 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_fdfb8ccc-89a7-4704-b0dd-33327630583a" xlink:to="loc_us-gaap_GoodwillAndIntangibleAssetImpairment_983b96d3-fa7b-4289-8892-3638da94db9c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensation_261c61c2-14e9-409a-98e2-b4ed67c2612b" 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_fdfb8ccc-89a7-4704-b0dd-33327630583a" xlink:to="loc_us-gaap_ShareBasedCompensation_261c61c2-14e9-409a-98e2-b4ed67c2612b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_OperatingLeaseImpairmentsDueToRestructuring_91f0faaf-9eea-4143-a367-1016f7c4152a" xlink:href="mtrx-20230331.xsd#mtrx_OperatingLeaseImpairmentsDueToRestructuring"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_fdfb8ccc-89a7-4704-b0dd-33327630583a" xlink:to="loc_mtrx_OperatingLeaseImpairmentsDueToRestructuring_91f0faaf-9eea-4143-a367-1016f7c4152a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_DeferredIncomeTaxExpense_84b47451-bb36-4e43-8154-92e3587fdfed" xlink:href="mtrx-20230331.xsd#mtrx_DeferredIncomeTaxExpense"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_fdfb8ccc-89a7-4704-b0dd-33327630583a" xlink:to="loc_mtrx_DeferredIncomeTaxExpense_84b47451-bb36-4e43-8154-92e3587fdfed" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnSaleOfPropertyPlantEquipment_d2b9fafe-8f43-43a5-a516-ce1621c13534" 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_fdfb8ccc-89a7-4704-b0dd-33327630583a" xlink:to="loc_us-gaap_GainLossOnSaleOfPropertyPlantEquipment_d2b9fafe-8f43-43a5-a516-ce1621c13534" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProvisionForDoubtfulAccounts_2cd5e657-b537-40bf-b386-6ece518ee0fa" 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_fdfb8ccc-89a7-4704-b0dd-33327630583a" xlink:to="loc_us-gaap_ProvisionForDoubtfulAccounts_2cd5e657-b537-40bf-b386-6ece518ee0fa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AmortizationOfFinancingCosts_a998f0f5-32d7-460e-b968-11b4036a7ae0" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AmortizationOfFinancingCosts"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_fdfb8ccc-89a7-4704-b0dd-33327630583a" xlink:to="loc_us-gaap_AmortizationOfFinancingCosts_a998f0f5-32d7-460e-b968-11b4036a7ae0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNoncashIncomeExpense_1d4bc45b-8e71-4c01-9bb6-b2c987b3ae51" 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_fdfb8ccc-89a7-4704-b0dd-33327630583a" xlink:to="loc_us-gaap_OtherNoncashIncomeExpense_1d4bc45b-8e71-4c01-9bb6-b2c987b3ae51" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_a66c6ebf-232a-4b19-8ce8-30dbc606515a" 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_fdfb8ccc-89a7-4704-b0dd-33327630583a" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_a66c6ebf-232a-4b19-8ce8-30dbc606515a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInContractWithCustomerAsset_3b7563d1-9749-492e-ab95-04aba7d1c911" 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_fdfb8ccc-89a7-4704-b0dd-33327630583a" xlink:to="loc_us-gaap_IncreaseDecreaseInContractWithCustomerAsset_3b7563d1-9749-492e-ab95-04aba7d1c911" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInInventories_0b2f8c5c-1096-4373-a2ef-408d7d36ed6d" 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_fdfb8ccc-89a7-4704-b0dd-33327630583a" xlink:to="loc_us-gaap_IncreaseDecreaseInInventories_0b2f8c5c-1096-4373-a2ef-408d7d36ed6d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherOperatingAssets_827100fb-6cce-49bc-a508-1009efa0ac7d" 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_fdfb8ccc-89a7-4704-b0dd-33327630583a" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherOperatingAssets_827100fb-6cce-49bc-a508-1009efa0ac7d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayable_07f67d87-30f4-4149-91e9-f908bb96fb46" 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_fdfb8ccc-89a7-4704-b0dd-33327630583a" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayable_07f67d87-30f4-4149-91e9-f908bb96fb46" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInContractWithCustomerLiability_3feb6dcd-f0f4-41de-8c98-0ff0d9107dea" 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_fdfb8ccc-89a7-4704-b0dd-33327630583a" xlink:to="loc_us-gaap_IncreaseDecreaseInContractWithCustomerLiability_3feb6dcd-f0f4-41de-8c98-0ff0d9107dea" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_e86377e0-c7bf-4a17-94c5-d9ffd2497e2c" 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_fdfb8ccc-89a7-4704-b0dd-33327630583a" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_e86377e0-c7bf-4a17-94c5-d9ffd2497e2c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_31819bfe-5ce7-440e-8ed7-fae8a003f7f3" 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_NetCashProvidedByUsedInFinancingActivities_6fa41e37-2fce-4593-a664-0dbb4ebeacbc" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_31819bfe-5ce7-440e-8ed7-fae8a003f7f3" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_6fa41e37-2fce-4593-a664-0dbb4ebeacbc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_4cb7d706-25e0-4534-b3ff-d833ebd6c88f" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_31819bfe-5ce7-440e-8ed7-fae8a003f7f3" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_4cb7d706-25e0-4534-b3ff-d833ebd6c88f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_65f7ba1b-e470-48c0-b2dd-39ffb23e1834" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_31819bfe-5ce7-440e-8ed7-fae8a003f7f3" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_65f7ba1b-e470-48c0-b2dd-39ffb23e1834" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsIncludingDisposalGroupAndDiscontinuedOperations_9ba38639-16cd-44cd-b9f6-ab2eacf72f11" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsIncludingDisposalGroupAndDiscontinuedOperations"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_31819bfe-5ce7-440e-8ed7-fae8a003f7f3" xlink:to="loc_us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsIncludingDisposalGroupAndDiscontinuedOperations_9ba38639-16cd-44cd-b9f6-ab2eacf72f11" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_fbcab513-8f4a-4ed2-8fc7-7746e713c472" 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_2789e955-a576-443e-a721-6eb906259cb1" 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_fbcab513-8f4a-4ed2-8fc7-7746e713c472" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_2789e955-a576-443e-a721-6eb906259cb1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleOfProductiveAssets_3a25cf1c-00e3-493e-ab2c-aab08731499c" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ProceedsFromSaleOfProductiveAssets"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_fbcab513-8f4a-4ed2-8fc7-7746e713c472" xlink:to="loc_us-gaap_ProceedsFromSaleOfProductiveAssets_3a25cf1c-00e3-493e-ab2c-aab08731499c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_9a2cbe36-85bd-49a2-8461-51bfbb6988f7" 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_us-gaap_PaymentsOfDebtIssuanceCosts_bdc9ee10-d12f-4f83-963d-d30a0e87e606" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PaymentsOfDebtIssuanceCosts"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_9a2cbe36-85bd-49a2-8461-51bfbb6988f7" xlink:to="loc_us-gaap_PaymentsOfDebtIssuanceCosts_bdc9ee10-d12f-4f83-963d-d30a0e87e606" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromStockPlans_fb575566-77fe-4f82-80bc-d9a625783439" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ProceedsFromStockPlans"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_9a2cbe36-85bd-49a2-8461-51bfbb6988f7" xlink:to="loc_us-gaap_ProceedsFromStockPlans_fb575566-77fe-4f82-80bc-d9a625783439" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForRepurchaseOfOtherEquity_627cf8c3-c2ac-4a8c-b30c-639b48326b15" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PaymentsForRepurchaseOfOtherEquity"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_9a2cbe36-85bd-49a2-8461-51bfbb6988f7" xlink:to="loc_us-gaap_PaymentsForRepurchaseOfOtherEquity_627cf8c3-c2ac-4a8c-b30c-639b48326b15" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfOtherDebt_948127be-aa38-4747-86f7-e99c84aade2b" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_RepaymentsOfOtherDebt"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_9a2cbe36-85bd-49a2-8461-51bfbb6988f7" xlink:to="loc_us-gaap_RepaymentsOfOtherDebt_948127be-aa38-4747-86f7-e99c84aade2b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromStockOptionsExercised_77b620a1-1cd1-44b8-8db4-59ff3e48092e" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ProceedsFromStockOptionsExercised"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_9a2cbe36-85bd-49a2-8461-51bfbb6988f7" xlink:to="loc_us-gaap_ProceedsFromStockOptionsExercised_77b620a1-1cd1-44b8-8db4-59ff3e48092e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromLongTermLinesOfCredit_61c33921-083a-4e57-8bcd-e675a99b6448" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ProceedsFromLongTermLinesOfCredit"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_9a2cbe36-85bd-49a2-8461-51bfbb6988f7" xlink:to="loc_us-gaap_ProceedsFromLongTermLinesOfCredit_61c33921-083a-4e57-8bcd-e675a99b6448" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfLongTermLinesOfCredit_47e7c18c-46f5-4dd9-8a1f-e1719b316042" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_RepaymentsOfLongTermLinesOfCredit"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_9a2cbe36-85bd-49a2-8461-51bfbb6988f7" xlink:to="loc_us-gaap_RepaymentsOfLongTermLinesOfCredit_47e7c18c-46f5-4dd9-8a1f-e1719b316042" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/PropertyPlantandEquipmentDetails" xlink:type="simple" xlink:href="mtrx-20230331.xsd#PropertyPlantandEquipmentDetails"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/PropertyPlantandEquipmentDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_a1cfd59b-4558-4940-bd5e-8aaf11f65291" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_8e4ab2f2-cce7-42b4-9958-1b61af005052" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PropertyPlantAndEquipmentGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentNet_a1cfd59b-4558-4940-bd5e-8aaf11f65291" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentGross_8e4ab2f2-cce7-42b4-9958-1b61af005052" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_c87e6463-85af-4289-8ea5-493e2b9c8d2d" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentNet_a1cfd59b-4558-4940-bd5e-8aaf11f65291" xlink:to="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_c87e6463-85af-4289-8ea5-493e2b9c8d2d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_040e1c7c-6bde-4fbb-bac2-f9639b6e406a" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PropertyPlantAndEquipmentGross"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BuildingsAndImprovementsGross_59f9af8e-2ac7-4f8f-a6f2-7c098bc2ac9d" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_BuildingsAndImprovementsGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentGross_040e1c7c-6bde-4fbb-bac2-f9639b6e406a" xlink:to="loc_us-gaap_BuildingsAndImprovementsGross_59f9af8e-2ac7-4f8f-a6f2-7c098bc2ac9d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MachineryAndEquipmentGross_59a08231-62ae-445f-b139-d49a79a2df08" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_MachineryAndEquipmentGross"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentGross_040e1c7c-6bde-4fbb-bac2-f9639b6e406a" xlink:to="loc_us-gaap_MachineryAndEquipmentGross_59a08231-62ae-445f-b139-d49a79a2df08" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_TransportationEquipmentGross_c0cfa9b1-f484-41b9-8cfd-42e4cd5bbdd2" xlink:href="mtrx-20230331.xsd#mtrx_TransportationEquipmentGross"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentGross_040e1c7c-6bde-4fbb-bac2-f9639b6e406a" xlink:to="loc_mtrx_TransportationEquipmentGross_c0cfa9b1-f484-41b9-8cfd-42e4cd5bbdd2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_OfficeEquipmentAndSoftware_6d8c1e43-2f93-4021-9421-125c1dbeae83" xlink:href="mtrx-20230331.xsd#mtrx_OfficeEquipmentAndSoftware"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentGross_040e1c7c-6bde-4fbb-bac2-f9639b6e406a" xlink:to="loc_mtrx_OfficeEquipmentAndSoftware_6d8c1e43-2f93-4021-9421-125c1dbeae83" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConstructionInProgressGross_e4bc6cf5-19af-4c30-b592-e781af3346ee" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ConstructionInProgressGross"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentGross_040e1c7c-6bde-4fbb-bac2-f9639b6e406a" xlink:to="loc_us-gaap_ConstructionInProgressGross_e4bc6cf5-19af-4c30-b592-e781af3346ee" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails" xlink:type="simple" xlink:href="mtrx-20230331.xsd#IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_8257c08a-2dbb-434e-bd91-6f017499966e" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_Goodwill"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillGross_654c88a5-faa6-4f51-806e-0794f54f7009" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_GoodwillGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Goodwill_8257c08a-2dbb-434e-bd91-6f017499966e" xlink:to="loc_us-gaap_GoodwillGross_654c88a5-faa6-4f51-806e-0794f54f7009" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillImpairedAccumulatedImpairmentLoss_54b79bd4-4aa0-490c-a09d-ea5db41e18cc" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_GoodwillImpairedAccumulatedImpairmentLoss"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Goodwill_8257c08a-2dbb-434e-bd91-6f017499966e" xlink:to="loc_us-gaap_GoodwillImpairedAccumulatedImpairmentLoss_54b79bd4-4aa0-490c-a09d-ea5db41e18cc" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails" xlink:type="simple" xlink:href="mtrx-20230331.xsd#IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsNet_47dbe268-d32a-441a-8037-0887d9e1c63f" 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_FiniteLivedIntangibleAssetsGross_adff5904-04cc-4b93-9f9b-dc8918b21cef" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FiniteLivedIntangibleAssetsGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_47dbe268-d32a-441a-8037-0887d9e1c63f" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsGross_adff5904-04cc-4b93-9f9b-dc8918b21cef" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_f1901e75-fbf2-4e03-a6eb-eff077f3c229" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_47dbe268-d32a-441a-8037-0887d9e1c63f" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_f1901e75-fbf2-4e03-a6eb-eff077f3c229" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsGross_f52d25bb-093a-43ce-8b7b-d4f4277d9239" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FiniteLivedIntangibleAssetsGross"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndefiniteLivedTradeNames_fac577fb-27f5-4d07-ae8d-efa7311b75cd" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IndefiniteLivedTradeNames"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsGross_f52d25bb-093a-43ce-8b7b-d4f4277d9239" xlink:to="loc_us-gaap_IndefiniteLivedTradeNames_fac577fb-27f5-4d07-ae8d-efa7311b75cd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_de7c10ef-bf6a-43ba-9072-5186d1c4eeb3" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IntangibleAssetsNetExcludingGoodwill"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsNet_1009573f-452d-452e-a2d5-802c8e57c0fc" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FiniteLivedIntangibleAssetsNet"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_de7c10ef-bf6a-43ba-9072-5186d1c4eeb3" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsNet_1009573f-452d-452e-a2d5-802c8e57c0fc" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails" xlink:type="simple" xlink:href="mtrx-20230331.xsd#EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails"/>
  <link:calculationLink xlink:role="http://www.matrixservicecompany.com/role/EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_e8f78d42-9b8f-4fcf-8d65-649416d6090b" 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_9ff2d749-7f9c-4c44-b5b6-7db047e0e2ce" 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_e8f78d42-9b8f-4fcf-8d65-649416d6090b" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_9ff2d749-7f9c-4c44-b5b6-7db047e0e2ce" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_79e0a603-44c3-42a7-97d2-951bf6837781" 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_e8f78d42-9b8f-4fcf-8d65-649416d6090b" xlink:to="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_79e0a603-44c3-42a7-97d2-951bf6837781" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncrementalCommonSharesAttributableToNonvestedSharesWithForfeitableDividends_3f9e6547-7dc1-4b0e-aa5d-403e5dfadee4" 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_e8f78d42-9b8f-4fcf-8d65-649416d6090b" xlink:to="loc_us-gaap_IncrementalCommonSharesAttributableToNonvestedSharesWithForfeitableDividends_3f9e6547-7dc1-4b0e-aa5d-403e5dfadee4" xlink:type="arc"/>
  </link:calculationLink>
</link:linkbase>
