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

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2024 Workiva-->
<!--r:fc765c7a-b7a1-4745-be32-63f87a07c8a9,g:c7c40fe5-d696-4d1c-b9f5-2b54d59c5312-->
<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-20240630.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_IncomeLossAttributableToParent_9dd8b001-6be0-427d-a2a6-258247fabc2e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncomeLossAttributableToParent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeInterest_c797aa65-1a48-4dc2-a4e0-b6adb99d2c49" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_InvestmentIncomeInterest"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossAttributableToParent_9dd8b001-6be0-427d-a2a6-258247fabc2e" xlink:to="loc_us-gaap_InvestmentIncomeInterest_c797aa65-1a48-4dc2-a4e0-b6adb99d2c49" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_4a6596ac-7b9d-4475-9f06-13ff65ce41a1" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossAttributableToParent_9dd8b001-6be0-427d-a2a6-258247fabc2e" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_4a6596ac-7b9d-4475-9f06-13ff65ce41a1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_2d0353f4-5262-437c-8442-c8b452260c39" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossAttributableToParent_9dd8b001-6be0-427d-a2a6-258247fabc2e" xlink:to="loc_us-gaap_OperatingIncomeLoss_2d0353f4-5262-437c-8442-c8b452260c39" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpense_9ecf9b18-3dee-478d-8ade-94fb2c269b7f" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_InterestExpense"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossAttributableToParent_9dd8b001-6be0-427d-a2a6-258247fabc2e" xlink:to="loc_us-gaap_InterestExpense_9ecf9b18-3dee-478d-8ade-94fb2c269b7f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossProfit_fd28a955-6145-4775-a6a0-563138e28e1b" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_GrossProfit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Revenues_78d8ea83-f090-44a6-ad07-f37c8d21dac7" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_fd28a955-6145-4775-a6a0-563138e28e1b" xlink:to="loc_us-gaap_Revenues_78d8ea83-f090-44a6-ad07-f37c8d21dac7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfGoodsAndServicesSold_e5e7f3a1-6d15-413d-80cc-7fd3f3e7117b" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_fd28a955-6145-4775-a6a0-563138e28e1b" xlink:to="loc_us-gaap_CostOfGoodsAndServicesSold_e5e7f3a1-6d15-413d-80cc-7fd3f3e7117b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_6e6448b9-eac3-4a38-a53b-32c97370d1d4" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NetIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_27346405-4edc-4c1b-8b4f-a89b67068116" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_6e6448b9-eac3-4a38-a53b-32c97370d1d4" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_27346405-4edc-4c1b-8b4f-a89b67068116" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossAttributableToParent_c565ae44-876d-4e5f-ac17-8527e72aaa0f" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncomeLossAttributableToParent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_6e6448b9-eac3-4a38-a53b-32c97370d1d4" xlink:to="loc_us-gaap_IncomeLossAttributableToParent_c565ae44-876d-4e5f-ac17-8527e72aaa0f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_3046f355-5cdd-4137-9b96-b94a2c0cfbb8" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillAndIntangibleAssetImpairment_6236c2bc-e643-470d-a92f-f0bd0d170265" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_GoodwillAndIntangibleAssetImpairment"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_3046f355-5cdd-4137-9b96-b94a2c0cfbb8" xlink:to="loc_us-gaap_GoodwillAndIntangibleAssetImpairment_6236c2bc-e643-470d-a92f-f0bd0d170265" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCosts_c2cb055c-182d-4317-8907-62034b07b66d" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_RestructuringCosts"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_3046f355-5cdd-4137-9b96-b94a2c0cfbb8" xlink:to="loc_us-gaap_RestructuringCosts_c2cb055c-182d-4317-8907-62034b07b66d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossProfit_98921776-a2b0-4474-a7ba-9b7bd9159572" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_GrossProfit"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_3046f355-5cdd-4137-9b96-b94a2c0cfbb8" xlink:to="loc_us-gaap_GrossProfit_98921776-a2b0-4474-a7ba-9b7bd9159572" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_3368a483-06b9-4c8e-84e1-c973655467af" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_SellingGeneralAndAdministrativeExpense"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_3046f355-5cdd-4137-9b96-b94a2c0cfbb8" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_3368a483-06b9-4c8e-84e1-c973655467af" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ConsolidatedStatementsofComprehensiveIncome" xlink:type="simple" xlink:href="mtrx-20240630.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_a97e91e7-43a9-4dc2-9bea-d6d686ea2e76" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_173e2578-9061-4c79-8c0d-0d4c5eadaccb" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest_a97e91e7-43a9-4dc2-9bea-d6d686ea2e76" xlink:to="loc_us-gaap_NetIncomeLoss_173e2578-9061-4c79-8c0d-0d4c5eadaccb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_ba37309b-33fc-4cc4-b36f-bf679df7f2e4" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_a97e91e7-43a9-4dc2-9bea-d6d686ea2e76" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_ba37309b-33fc-4cc4-b36f-bf679df7f2e4" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ConsolidatedBalanceSheets" xlink:type="simple" xlink:href="mtrx-20240630.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_3f66946b-516a-41bb-b051-5c592ab09cdb" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AssetsCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_4faeb4d4-879a-4daf-b9ab-0d78124eaf19" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_3f66946b-516a-41bb-b051-5c592ab09cdb" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_4faeb4d4-879a-4daf-b9ab-0d78124eaf19" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsReceivableNetCurrent_3eca5d70-a28e-4462-8e90-cb622b3f7061" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_3f66946b-516a-41bb-b051-5c592ab09cdb" xlink:to="loc_us-gaap_AccountsReceivableNetCurrent_3eca5d70-a28e-4462-8e90-cb622b3f7061" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerAssetNetCurrent_20857e06-916b-4971-a011-70179f66085c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_3f66946b-516a-41bb-b051-5c592ab09cdb" xlink:to="loc_us-gaap_ContractWithCustomerAssetNetCurrent_20857e06-916b-4971-a011-70179f66085c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryNet_16900c8a-8d15-496f-b459-15df201b5995" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_3f66946b-516a-41bb-b051-5c592ab09cdb" xlink:to="loc_us-gaap_InventoryNet_16900c8a-8d15-496f-b459-15df201b5995" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxesReceivable_8640e141-abc5-4f11-9185-73e15e5be509" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_3f66946b-516a-41bb-b051-5c592ab09cdb" xlink:to="loc_us-gaap_IncomeTaxesReceivable_8640e141-abc5-4f11-9185-73e15e5be509" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsCurrent_9b5a9fd5-8c55-48b2-9bc6-713a0e6bda82" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_3f66946b-516a-41bb-b051-5c592ab09cdb" xlink:to="loc_us-gaap_OtherAssetsCurrent_9b5a9fd5-8c55-48b2-9bc6-713a0e6bda82" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseCurrent_d28a05f1-fc52-40b0-b842-070b3edfd60f" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PrepaidExpenseCurrent"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_3f66946b-516a-41bb-b051-5c592ab09cdb" xlink:to="loc_us-gaap_PrepaidExpenseCurrent_d28a05f1-fc52-40b0-b842-070b3edfd60f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_447eeb63-0eb5-4b58-92d1-042c49a77b25" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_Assets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_a7a49b03-b9f1-4241-a7a4-f62f585db616" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_447eeb63-0eb5-4b58-92d1-042c49a77b25" xlink:to="loc_us-gaap_AssetsCurrent_a7a49b03-b9f1-4241-a7a4-f62f585db616" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedCashNoncurrent_8c7e0caa-72c3-44cc-8f46-049d02803c80" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_447eeb63-0eb5-4b58-92d1-042c49a77b25" xlink:to="loc_us-gaap_RestrictedCashNoncurrent_8c7e0caa-72c3-44cc-8f46-049d02803c80" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_5182dab0-ba0a-4e7f-bb2b-d180f3beb50c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_447eeb63-0eb5-4b58-92d1-042c49a77b25" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_5182dab0-ba0a-4e7f-bb2b-d180f3beb50c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_d9495dc7-dfd6-419b-98f3-8ffb8d71fac3" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_447eeb63-0eb5-4b58-92d1-042c49a77b25" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_d9495dc7-dfd6-419b-98f3-8ffb8d71fac3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_90fc93ee-1389-4627-abff-40569ba4808a" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_447eeb63-0eb5-4b58-92d1-042c49a77b25" xlink:to="loc_us-gaap_Goodwill_90fc93ee-1389-4627-abff-40569ba4808a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_c29807e2-753d-4caa-ae9e-574dc0e27c20" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_447eeb63-0eb5-4b58-92d1-042c49a77b25" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_c29807e2-753d-4caa-ae9e-574dc0e27c20" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_086293db-e1a6-4920-bf12-551e4820b6c9" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherAssetsNoncurrent"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_447eeb63-0eb5-4b58-92d1-042c49a77b25" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_086293db-e1a6-4920-bf12-551e4820b6c9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_bd14c8e9-0095-49d6-a99c-8e0221eadca3" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_0f80c13d-e217-4c3c-a7fc-40c4e79ee7bc" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_bd14c8e9-0095-49d6-a99c-8e0221eadca3" xlink:to="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_0f80c13d-e217-4c3c-a7fc-40c4e79ee7bc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_9c754fec-dadf-4ca3-a448-e9812d8ed9af" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_bd14c8e9-0095-49d6-a99c-8e0221eadca3" xlink:to="loc_us-gaap_Liabilities_9c754fec-dadf-4ca3-a448-e9812d8ed9af" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_c4a468c2-c378-4f44-94b2-3189063c9244" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LiabilitiesCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableCurrent_107642f0-8c8a-4323-b2a5-555475f81cd7" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_c4a468c2-c378-4f44-94b2-3189063c9244" xlink:to="loc_us-gaap_AccountsPayableCurrent_107642f0-8c8a-4323-b2a5-555475f81cd7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerLiabilityCurrent_1f4b05e9-8a7f-4a7e-b393-7cf69bdeccfb" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_c4a468c2-c378-4f44-94b2-3189063c9244" xlink:to="loc_us-gaap_ContractWithCustomerLiabilityCurrent_1f4b05e9-8a7f-4a7e-b393-7cf69bdeccfb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_5205eba7-fe23-4e57-ad63-db279a8ec95e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_c4a468c2-c378-4f44-94b2-3189063c9244" xlink:to="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_5205eba7-fe23-4e57-ad63-db279a8ec95e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedInsuranceCurrent_40215c95-77c7-4e51-8fd0-c70bbf7204d0" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_c4a468c2-c378-4f44-94b2-3189063c9244" xlink:to="loc_us-gaap_AccruedInsuranceCurrent_40215c95-77c7-4e51-8fd0-c70bbf7204d0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_a262f17e-e5c6-4d26-97af-8722f2c1e957" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_c4a468c2-c378-4f44-94b2-3189063c9244" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_a262f17e-e5c6-4d26-97af-8722f2c1e957" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesCurrent_dd5abe1f-d8db-4ee5-8a00-2eda9282a8d8" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_c4a468c2-c378-4f44-94b2-3189063c9244" xlink:to="loc_us-gaap_OtherLiabilitiesCurrent_dd5abe1f-d8db-4ee5-8a00-2eda9282a8d8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_afbd6a0f-31fa-4df2-8a46-98c6cba79b57" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax_d81377b3-8b70-49e0-9558-afb1865a5a03" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_afbd6a0f-31fa-4df2-8a46-98c6cba79b57" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax_d81377b3-8b70-49e0-9558-afb1865a5a03" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValue_a7fa9717-0257-4f1d-be24-f1fe793a7d21" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_CommonStockValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_afbd6a0f-31fa-4df2-8a46-98c6cba79b57" xlink:to="loc_us-gaap_CommonStockValue_a7fa9717-0257-4f1d-be24-f1fe793a7d21" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockValue_f394f7a1-560f-48c4-af79-64ab0494d862" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_TreasuryStockValue"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_afbd6a0f-31fa-4df2-8a46-98c6cba79b57" xlink:to="loc_us-gaap_TreasuryStockValue_f394f7a1-560f-48c4-af79-64ab0494d862" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapital_25dbd980-2a41-4b2f-a070-313e9693b38d" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AdditionalPaidInCapital"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_afbd6a0f-31fa-4df2-8a46-98c6cba79b57" xlink:to="loc_us-gaap_AdditionalPaidInCapital_25dbd980-2a41-4b2f-a070-313e9693b38d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_5b234645-4dd0-4368-8003-f0fed5d509e5" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_afbd6a0f-31fa-4df2-8a46-98c6cba79b57" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_5b234645-4dd0-4368-8003-f0fed5d509e5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_850d11a6-9f52-4248-ab96-672691108d87" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_Liabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_1e249fe1-a9e4-4e6f-b99d-38c46456f4d0" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_850d11a6-9f52-4248-ab96-672691108d87" xlink:to="loc_us-gaap_LiabilitiesCurrent_1e249fe1-a9e4-4e6f-b99d-38c46456f4d0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_7e2ab676-a573-4961-bd1d-6947c8465079" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_850d11a6-9f52-4248-ab96-672691108d87" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_7e2ab676-a573-4961-bd1d-6947c8465079" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_6acee68f-fa5f-41ec-b85a-5ebccfcd96f1" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_850d11a6-9f52-4248-ab96-672691108d87" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_6acee68f-fa5f-41ec-b85a-5ebccfcd96f1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCredit_17e5a72f-cef4-46c6-a082-541ad928d977" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_850d11a6-9f52-4248-ab96-672691108d87" xlink:to="loc_us-gaap_LineOfCredit_17e5a72f-cef4-46c6-a082-541ad928d977" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesNoncurrent_935a3be4-6cb9-4ba8-8530-e06699bc947f" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_850d11a6-9f52-4248-ab96-672691108d87" xlink:to="loc_us-gaap_OtherLiabilitiesNoncurrent_935a3be4-6cb9-4ba8-8530-e06699bc947f" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ConsolidatedStatementsofCashFlows" xlink:type="simple" xlink:href="mtrx-20240630.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_NetCashProvidedByUsedInFinancingActivities_446180f5-dae9-4593-8413-4b0d39096e69" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromLongTermLinesOfCredit_61300a58-5b47-42b7-9744-df6889b5a1e5" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_ProceedsFromLongTermLinesOfCredit"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_446180f5-dae9-4593-8413-4b0d39096e69" xlink:to="loc_us-gaap_ProceedsFromLongTermLinesOfCredit_61300a58-5b47-42b7-9744-df6889b5a1e5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfLongTermLinesOfCredit_6e2e0533-1438-4361-bd49-ed68338105d6" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_RepaymentsOfLongTermLinesOfCredit"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_446180f5-dae9-4593-8413-4b0d39096e69" xlink:to="loc_us-gaap_RepaymentsOfLongTermLinesOfCredit_6e2e0533-1438-4361-bd49-ed68338105d6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsOfDebtIssuanceCosts_2dc22e4d-d59a-4aa7-9fae-ccddd4c47bdc" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PaymentsOfDebtIssuanceCosts"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_446180f5-dae9-4593-8413-4b0d39096e69" xlink:to="loc_us-gaap_PaymentsOfDebtIssuanceCosts_2dc22e4d-d59a-4aa7-9fae-ccddd4c47bdc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromStockOptionsExercised_9cd4b4d6-1580-4372-b0ba-3b106616d0b3" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_ProceedsFromStockOptionsExercised"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_446180f5-dae9-4593-8413-4b0d39096e69" xlink:to="loc_us-gaap_ProceedsFromStockOptionsExercised_9cd4b4d6-1580-4372-b0ba-3b106616d0b3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromStockPlans_b2129639-32d3-480f-8619-ef4c0f5a6a83" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_ProceedsFromStockPlans"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_446180f5-dae9-4593-8413-4b0d39096e69" xlink:to="loc_us-gaap_ProceedsFromStockPlans_b2129639-32d3-480f-8619-ef4c0f5a6a83" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForRepurchaseOfOtherEquity_2022fca1-7d44-42e5-89ee-5a836b35e67d" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PaymentsForRepurchaseOfOtherEquity"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_446180f5-dae9-4593-8413-4b0d39096e69" xlink:to="loc_us-gaap_PaymentsForRepurchaseOfOtherEquity_2022fca1-7d44-42e5-89ee-5a836b35e67d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfOtherDebt_fb254334-8e8c-4223-b262-dd2b1d8d1936" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_RepaymentsOfOtherDebt"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_446180f5-dae9-4593-8413-4b0d39096e69" xlink:to="loc_us-gaap_RepaymentsOfOtherDebt_fb254334-8e8c-4223-b262-dd2b1d8d1936" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_5d7af7a9-db74-4e29-bad5-9f9b218aa17b" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_34293463-d3b5-443f-9361-726ad960c084" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_5d7af7a9-db74-4e29-bad5-9f9b218aa17b" xlink:to="loc_us-gaap_NetIncomeLoss_34293463-d3b5-443f-9361-726ad960c084" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_2ac6483f-64b7-4543-899b-3745d963ec1c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_5d7af7a9-db74-4e29-bad5-9f9b218aa17b" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_2ac6483f-64b7-4543-899b-3745d963ec1c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillAndIntangibleAssetImpairment_ce356f88-6564-449d-8eb8-b2902fecc7b3" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_5d7af7a9-db74-4e29-bad5-9f9b218aa17b" xlink:to="loc_us-gaap_GoodwillAndIntangibleAssetImpairment_ce356f88-6564-449d-8eb8-b2902fecc7b3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensation_f1e91e48-2274-4557-a367-fd4fc70d2243" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_5d7af7a9-db74-4e29-bad5-9f9b218aa17b" xlink:to="loc_us-gaap_ShareBasedCompensation_f1e91e48-2274-4557-a367-fd4fc70d2243" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_DeferredIncomeTaxExpenseBenefitSocf_27499ff4-af83-48ea-9bd2-035cad351d0a" xlink:href="mtrx-20240630.xsd#mtrx_DeferredIncomeTaxExpenseBenefitSocf"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_5d7af7a9-db74-4e29-bad5-9f9b218aa17b" xlink:to="loc_mtrx_DeferredIncomeTaxExpenseBenefitSocf_27499ff4-af83-48ea-9bd2-035cad351d0a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnSaleOfPropertyPlantEquipment_810bfca4-76df-439c-a6a3-d3e0251c7c66" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_GainLossOnSaleOfPropertyPlantEquipment"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_5d7af7a9-db74-4e29-bad5-9f9b218aa17b" xlink:to="loc_us-gaap_GainLossOnSaleOfPropertyPlantEquipment_810bfca4-76df-439c-a6a3-d3e0251c7c66" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNoncashExpense_8ea9cda2-f978-4a1c-a774-8f163a888426" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherNoncashExpense"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_5d7af7a9-db74-4e29-bad5-9f9b218aa17b" xlink:to="loc_us-gaap_OtherNoncashExpense_8ea9cda2-f978-4a1c-a774-8f163a888426" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherOperatingActivitiesCashFlowStatement_eefe720c-33ed-4287-a09b-c07a63b8289b" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherOperatingActivitiesCashFlowStatement"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_5d7af7a9-db74-4e29-bad5-9f9b218aa17b" xlink:to="loc_us-gaap_OtherOperatingActivitiesCashFlowStatement_eefe720c-33ed-4287-a09b-c07a63b8289b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_fc1c42e1-441f-4005-9dcf-e19b890e24b9" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncreaseDecreaseInAccountsReceivable"/>
    <link:calculationArc order="9" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_5d7af7a9-db74-4e29-bad5-9f9b218aa17b" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_fc1c42e1-441f-4005-9dcf-e19b890e24b9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInContractWithCustomerAsset_7807c009-38a0-46ad-b9b1-c7a0a54bbf08" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncreaseDecreaseInContractWithCustomerAsset"/>
    <link:calculationArc order="10" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_5d7af7a9-db74-4e29-bad5-9f9b218aa17b" xlink:to="loc_us-gaap_IncreaseDecreaseInContractWithCustomerAsset_7807c009-38a0-46ad-b9b1-c7a0a54bbf08" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInInventories_9edec693-9f0b-4f28-987b-71eb9b18815c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncreaseDecreaseInInventories"/>
    <link:calculationArc order="11" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_5d7af7a9-db74-4e29-bad5-9f9b218aa17b" xlink:to="loc_us-gaap_IncreaseDecreaseInInventories_9edec693-9f0b-4f28-987b-71eb9b18815c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherOperatingAssets_6344d4d4-2707-4071-8df7-004bc15218ab" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncreaseDecreaseInOtherOperatingAssets"/>
    <link:calculationArc order="12" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_5d7af7a9-db74-4e29-bad5-9f9b218aa17b" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherOperatingAssets_6344d4d4-2707-4071-8df7-004bc15218ab" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayable_fd28b57e-0248-48fd-b2ae-aac5730da6a4" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncreaseDecreaseInAccountsPayable"/>
    <link:calculationArc order="13" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_5d7af7a9-db74-4e29-bad5-9f9b218aa17b" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayable_fd28b57e-0248-48fd-b2ae-aac5730da6a4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInContractWithCustomerLiability_c8b1d4eb-3ec7-46f7-81a3-264408934620" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncreaseDecreaseInContractWithCustomerLiability"/>
    <link:calculationArc order="14" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_5d7af7a9-db74-4e29-bad5-9f9b218aa17b" xlink:to="loc_us-gaap_IncreaseDecreaseInContractWithCustomerLiability_c8b1d4eb-3ec7-46f7-81a3-264408934620" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_2185f86f-037b-4c76-a937-437199207557" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncreaseDecreaseInAccruedLiabilities"/>
    <link:calculationArc order="15" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_5d7af7a9-db74-4e29-bad5-9f9b218aa17b" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_2185f86f-037b-4c76-a937-437199207557" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_2df94c06-1dac-4b34-ba5d-aad3c3c20743" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsIncludingDisposalGroupAndDiscontinuedOperations_cb18ac85-d97c-48e8-9148-ceebaca56632" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_2df94c06-1dac-4b34-ba5d-aad3c3c20743" xlink:to="loc_us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsIncludingDisposalGroupAndDiscontinuedOperations_cb18ac85-d97c-48e8-9148-ceebaca56632" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_03feb6d2-a230-4797-9850-1f214babe62c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_2df94c06-1dac-4b34-ba5d-aad3c3c20743" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_03feb6d2-a230-4797-9850-1f214babe62c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_c7d909d1-483f-4182-ae5a-d57912bd5288" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_2df94c06-1dac-4b34-ba5d-aad3c3c20743" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_c7d909d1-483f-4182-ae5a-d57912bd5288" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_30dae79f-8f7e-4b20-b4e4-e5614ed7e13d" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_2df94c06-1dac-4b34-ba5d-aad3c3c20743" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_30dae79f-8f7e-4b20-b4e4-e5614ed7e13d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_8eb6a3b3-e315-4f48-910b-d7dee9cdcce3" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_390dc092-d7ce-407c-9345-492bbd4ba642" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_8eb6a3b3-e315-4f48-910b-d7dee9cdcce3" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_390dc092-d7ce-407c-9345-492bbd4ba642" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleOfProductiveAssets_6698fb8e-6bf6-470b-9726-df74ecef967b" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_8eb6a3b3-e315-4f48-910b-d7dee9cdcce3" xlink:to="loc_us-gaap_ProceedsFromSaleOfProductiveAssets_6698fb8e-6bf6-470b-9726-df74ecef967b" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/GoodwillandOtherIntangibleAssetsDetails1" xlink:type="simple" xlink:href="mtrx-20240630.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_e6c45bb8-897e-40d3-8b72-12fa925d4795" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FiniteLivedIntangibleAssetsNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_aa268a55-2fb1-4863-a05f-3f2d50449d82" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_e6c45bb8-897e-40d3-8b72-12fa925d4795" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_aa268a55-2fb1-4863-a05f-3f2d50449d82" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsGross_10c84035-95da-48fd-84d7-27f1d3244b7d" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_e6c45bb8-897e-40d3-8b72-12fa925d4795" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsGross_10c84035-95da-48fd-84d7-27f1d3244b7d" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IncomeTaxSourcesDetails" xlink:type="simple" xlink:href="mtrx-20240630.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_9791d00f-210e-4c54-afed-54e8c4180c74" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesDomestic_3a4d1cc0-9ec6-47df-aff7-8e5d6117e2cd" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_9791d00f-210e-4c54-afed-54e8c4180c74" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesDomestic_3a4d1cc0-9ec6-47df-aff7-8e5d6117e2cd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesForeign_57bdbaf0-e7e9-4f13-9b12-87564b12a612" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_9791d00f-210e-4c54-afed-54e8c4180c74" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesForeign_57bdbaf0-e7e9-4f13-9b12-87564b12a612" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CurrentandDeferredIncomeTaxesDetails" xlink:type="simple" xlink:href="mtrx-20240630.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_CurrentIncomeTaxExpenseBenefit_564139c5-a824-4134-8bc5-b2d00cd0144b" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_CurrentIncomeTaxExpenseBenefit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentFederalTaxExpenseBenefit_2e727d25-2c9f-4c9d-b922-b0a10f119a57" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_564139c5-a824-4134-8bc5-b2d00cd0144b" xlink:to="loc_us-gaap_CurrentFederalTaxExpenseBenefit_2e727d25-2c9f-4c9d-b922-b0a10f119a57" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentStateAndLocalTaxExpenseBenefit_1a0055fe-7d03-4d74-8d29-2581a9b77668" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_564139c5-a824-4134-8bc5-b2d00cd0144b" xlink:to="loc_us-gaap_CurrentStateAndLocalTaxExpenseBenefit_1a0055fe-7d03-4d74-8d29-2581a9b77668" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentForeignTaxExpenseBenefit_c2496029-9400-4d77-8e0e-659bb8a6e5c5" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_564139c5-a824-4134-8bc5-b2d00cd0144b" xlink:to="loc_us-gaap_CurrentForeignTaxExpenseBenefit_c2496029-9400-4d77-8e0e-659bb8a6e5c5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_e33ed63b-2302-47a5-87ba-7a40b521bb07" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_82146898-99f8-42ce-8557-012682a2aa00" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_e33ed63b-2302-47a5-87ba-7a40b521bb07" xlink:to="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_82146898-99f8-42ce-8557-012682a2aa00" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_8540a339-918b-4c91-8863-28824d81a811" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_e33ed63b-2302-47a5-87ba-7a40b521bb07" xlink:to="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_8540a339-918b-4c91-8863-28824d81a811" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_e37ecfcf-48c3-491a-b225-598647c4b44c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredFederalIncomeTaxExpenseBenefit_bcb9a7b1-40c4-4047-b89d-3406a6b719a0" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_e37ecfcf-48c3-491a-b225-598647c4b44c" xlink:to="loc_us-gaap_DeferredFederalIncomeTaxExpenseBenefit_bcb9a7b1-40c4-4047-b89d-3406a6b719a0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredStateAndLocalIncomeTaxExpenseBenefit_641b3f8d-c9df-450e-b821-a6208b714a5c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_e37ecfcf-48c3-491a-b225-598647c4b44c" xlink:to="loc_us-gaap_DeferredStateAndLocalIncomeTaxExpenseBenefit_641b3f8d-c9df-450e-b821-a6208b714a5c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredForeignIncomeTaxExpenseBenefit_a58c7ffc-866f-4d1f-8f88-62d349da814e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_e37ecfcf-48c3-491a-b225-598647c4b44c" xlink:to="loc_us-gaap_DeferredForeignIncomeTaxExpenseBenefit_a58c7ffc-866f-4d1f-8f88-62d349da814e" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IncomeTaxRateReconciliationDetails" xlink:type="simple" xlink:href="mtrx-20240630.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_6fcedb10-349a-4e5a-a272-31db601563a1" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationIncomeTaxExpenseBenefitAtFederalStatutoryIncomeTaxRate_6bebf3a8-b635-4798-a7fe-1bbb02d8d31b" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_6fcedb10-349a-4e5a-a272-31db601563a1" xlink:to="loc_us-gaap_IncomeTaxReconciliationIncomeTaxExpenseBenefitAtFederalStatutoryIncomeTaxRate_6bebf3a8-b635-4798-a7fe-1bbb02d8d31b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationStateAndLocalIncomeTaxes_1614c2a3-7a82-4e25-b4f7-7e6cf42cc009" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_6fcedb10-349a-4e5a-a272-31db601563a1" xlink:to="loc_us-gaap_IncomeTaxReconciliationStateAndLocalIncomeTaxes_1614c2a3-7a82-4e25-b4f7-7e6cf42cc009" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationNondeductibleExpenseImpairmentLosses_dfe8cbaa-6d9c-4df0-972e-bd248af2dfc0" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_6fcedb10-349a-4e5a-a272-31db601563a1" xlink:to="loc_us-gaap_IncomeTaxReconciliationNondeductibleExpenseImpairmentLosses_dfe8cbaa-6d9c-4df0-972e-bd248af2dfc0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_IncomeTaxReconciliationChargesWithoutTaxBenefit_c65a13fe-a170-4e5d-9742-8380e6ffdf17" xlink:href="mtrx-20240630.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_6fcedb10-349a-4e5a-a272-31db601563a1" xlink:to="loc_mtrx_IncomeTaxReconciliationChargesWithoutTaxBenefit_c65a13fe-a170-4e5d-9742-8380e6ffdf17" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationChangeInDeferredTaxAssetsValuationAllowance_2df9a40f-fedb-4db5-bdb2-bb7e3c1b1d04" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_6fcedb10-349a-4e5a-a272-31db601563a1" xlink:to="loc_us-gaap_IncomeTaxReconciliationChangeInDeferredTaxAssetsValuationAllowance_2df9a40f-fedb-4db5-bdb2-bb7e3c1b1d04" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_Effectofnewaccountingstandardcomparedtooldstandard_dbf41e41-9e4a-479c-a3c7-d00cdb461acd" xlink:href="mtrx-20240630.xsd#mtrx_Effectofnewaccountingstandardcomparedtooldstandard"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_6fcedb10-349a-4e5a-a272-31db601563a1" xlink:to="loc_mtrx_Effectofnewaccountingstandardcomparedtooldstandard_dbf41e41-9e4a-479c-a3c7-d00cdb461acd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationTaxCreditsResearch_334047d2-3743-4044-a8c4-c4dcd7548ac5" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncomeTaxReconciliationTaxCreditsResearch"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_6fcedb10-349a-4e5a-a272-31db601563a1" xlink:to="loc_us-gaap_IncomeTaxReconciliationTaxCreditsResearch_334047d2-3743-4044-a8c4-c4dcd7548ac5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationForeignIncomeTaxRateDifferential_ed6fc55c-53a8-446f-a92c-07e30990c2ab" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncomeTaxReconciliationForeignIncomeTaxRateDifferential"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_6fcedb10-349a-4e5a-a272-31db601563a1" xlink:to="loc_us-gaap_IncomeTaxReconciliationForeignIncomeTaxRateDifferential_ed6fc55c-53a8-446f-a92c-07e30990c2ab" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationPriorYearIncomeTaxes_537785ec-0132-419d-be5b-a4cb75037cb4" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncomeTaxReconciliationPriorYearIncomeTaxes"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_6fcedb10-349a-4e5a-a272-31db601563a1" xlink:to="loc_us-gaap_IncomeTaxReconciliationPriorYearIncomeTaxes_537785ec-0132-419d-be5b-a4cb75037cb4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationTaxContingenciesOther_4aa9229c-881a-4aa5-95e3-ba586240373e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncomeTaxReconciliationTaxContingenciesOther"/>
    <link:calculationArc order="10" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_6fcedb10-349a-4e5a-a272-31db601563a1" xlink:to="loc_us-gaap_IncomeTaxReconciliationTaxContingenciesOther_4aa9229c-881a-4aa5-95e3-ba586240373e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationOtherAdjustments_e8d9df7d-9585-4926-b55c-db52b8e08b84" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncomeTaxReconciliationOtherAdjustments"/>
    <link:calculationArc order="11" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_6fcedb10-349a-4e5a-a272-31db601563a1" xlink:to="loc_us-gaap_IncomeTaxReconciliationOtherAdjustments_e8d9df7d-9585-4926-b55c-db52b8e08b84" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/DeferredIncomeTaxAssetsandLiabilitiesDetailsDetails" xlink:type="simple" xlink:href="mtrx-20240630.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_DeferredIncomeTaxLiabilities_c548d53a-ed08-46bd-b244-e55c5d570b6d" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredIncomeTaxLiabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesPropertyPlantAndEquipment_f1b12387-7ecf-41f1-873b-709e35edab20" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_c548d53a-ed08-46bd-b244-e55c5d570b6d" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesPropertyPlantAndEquipment_f1b12387-7ecf-41f1-873b-709e35edab20" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesOther_22572c7f-c59c-4be4-aa8e-ba51b5cb7ce5" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxLiabilitiesOther"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_c548d53a-ed08-46bd-b244-e55c5d570b6d" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesOther_22572c7f-c59c-4be4-aa8e-ba51b5cb7ce5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsNet_a537bb09-493f-43df-a4f2-dc82b6796fe5" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsWarrantyReserves_43a66c28-8f2e-4def-ada2-46add085ba6f" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_a537bb09-493f-43df-a4f2-dc82b6796fe5" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsWarrantyReserves_43a66c28-8f2e-4def-ada2-46add085ba6f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsAllowanceForDoubtfulAccounts_e68b7c31-fe04-4015-9304-f084bb986e1a" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_a537bb09-493f-43df-a4f2-dc82b6796fe5" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsAllowanceForDoubtfulAccounts_e68b7c31-fe04-4015-9304-f084bb986e1a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_DeferredTaxAssetsInsuranceReserve_d9ef317f-c73f-4df0-a876-0e91d673f927" xlink:href="mtrx-20240630.xsd#mtrx_DeferredTaxAssetsInsuranceReserve"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_a537bb09-493f-43df-a4f2-dc82b6796fe5" xlink:to="loc_mtrx_DeferredTaxAssetsInsuranceReserve_d9ef317f-c73f-4df0-a876-0e91d673f927" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxCreditCarryforwards_0ee18a83-f55e-4ca6-8ccd-8cbc2578ab06" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsTaxCreditCarryforwards"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_a537bb09-493f-43df-a4f2-dc82b6796fe5" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxCreditCarryforwards_0ee18a83-f55e-4ca6-8ccd-8cbc2578ab06" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsValuationAllowance_71a5ee4a-a8e1-4a35-91a0-b7d98525b582" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsValuationAllowance"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_a537bb09-493f-43df-a4f2-dc82b6796fe5" xlink:to="loc_us-gaap_DeferredTaxAssetsValuationAllowance_71a5ee4a-a8e1-4a35-91a0-b7d98525b582" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsPensions_e8e94ee0-c858-4c74-b108-4521c9929c8c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsPensions"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_a537bb09-493f-43df-a4f2-dc82b6796fe5" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsPensions_e8e94ee0-c858-4c74-b108-4521c9929c8c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost_b5897102-fdc6-4923-8456-968904890a80" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_a537bb09-493f-43df-a4f2-dc82b6796fe5" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost_b5897102-fdc6-4923-8456-968904890a80" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsGoodwillAndIntangibleAssets_8c516f64-ea4c-455c-9bf9-7c809e6ced35" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsGoodwillAndIntangibleAssets"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_a537bb09-493f-43df-a4f2-dc82b6796fe5" xlink:to="loc_us-gaap_DeferredTaxAssetsGoodwillAndIntangibleAssets_8c516f64-ea4c-455c-9bf9-7c809e6ced35" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsOther_8933d075-0355-41fd-9b28-f7d8e5d45f7a" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsOther"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_a537bb09-493f-43df-a4f2-dc82b6796fe5" xlink:to="loc_us-gaap_DeferredTaxAssetsOther_8933d075-0355-41fd-9b28-f7d8e5d45f7a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilities_c4350bd9-d12b-421f-be9b-908b3ad06c79" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxLiabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsNet_7692d337-fa0f-4160-b1b8-efe1f11ae6cd" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_DeferredTaxLiabilities_c4350bd9-d12b-421f-be9b-908b3ad06c79" xlink:to="loc_us-gaap_DeferredTaxAssetsNet_7692d337-fa0f-4160-b1b8-efe1f11ae6cd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilities_d169dafc-901c-4c48-8026-15091c365f3e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_DeferredTaxLiabilities_c4350bd9-d12b-421f-be9b-908b3ad06c79" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilities_d169dafc-901c-4c48-8026-15091c365f3e" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/DeferredIncomeTaxAssetsandLiabilitiesSummaryDetails" xlink:type="simple" xlink:href="mtrx-20240630.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_DeferredTaxLiabilities_83e0b8c2-738f-488b-a2ed-c8f5e91c4e83" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxLiabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_c15f4db6-62ea-453b-bf59-a9861b774e1c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_DeferredTaxLiabilities_83e0b8c2-738f-488b-a2ed-c8f5e91c4e83" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_c15f4db6-62ea-453b-bf59-a9861b774e1c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_f16244ef-9db6-4318-b198-078d075b2c46" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_DeferredTaxLiabilities_83e0b8c2-738f-488b-a2ed-c8f5e91c4e83" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_f16244ef-9db6-4318-b198-078d075b2c46" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/LeasesComponentsofLeaseCostsDetails" xlink:type="simple" xlink:href="mtrx-20240630.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_d9a1a6ff-2d35-4612-a28c-250be4dafa5d" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LeaseCost"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseCost_e72a0e80-96c2-46eb-8d30-245f4385a2a7" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_d9a1a6ff-2d35-4612-a28c-250be4dafa5d" xlink:to="loc_us-gaap_OperatingLeaseCost_e72a0e80-96c2-46eb-8d30-245f4385a2a7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermLeaseCost_861e7e6b-b7df-4783-9a3b-660f2389a38b" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_d9a1a6ff-2d35-4612-a28c-250be4dafa5d" xlink:to="loc_us-gaap_ShortTermLeaseCost_861e7e6b-b7df-4783-9a3b-660f2389a38b" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails" xlink:type="simple" xlink:href="mtrx-20240630.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_e096f8db-02a8-4f6c-a5a3-d08e70b5de09" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_b26df723-7c91-490d-98b4-07686f3d0bdf" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_e096f8db-02a8-4f6c-a5a3-d08e70b5de09" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_b26df723-7c91-490d-98b4-07686f3d0bdf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_db0f0b61-9733-4705-ad0a-af81a2bc9a8e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_e096f8db-02a8-4f6c-a5a3-d08e70b5de09" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_db0f0b61-9733-4705-ad0a-af81a2bc9a8e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_31051bd9-58fb-4825-9176-c1b62ea948c3" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_e096f8db-02a8-4f6c-a5a3-d08e70b5de09" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_31051bd9-58fb-4825-9176-c1b62ea948c3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_0ee81842-53b9-44e1-b1c2-4605ca0c95e8" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_e096f8db-02a8-4f6c-a5a3-d08e70b5de09" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_0ee81842-53b9-44e1-b1c2-4605ca0c95e8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive_17c2fa29-d355-46e1-8b85-3a7c7779416c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_e096f8db-02a8-4f6c-a5a3-d08e70b5de09" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive_17c2fa29-d355-46e1-8b85-3a7c7779416c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive_fbbfbd98-63f7-4cdc-aa1d-2a0b3be6b64a" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_e096f8db-02a8-4f6c-a5a3-d08e70b5de09" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive_fbbfbd98-63f7-4cdc-aa1d-2a0b3be6b64a" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/EarningsperCommonShareDetails" xlink:type="simple" xlink:href="mtrx-20240630.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_22d65bb2-c24d-4741-8ffc-18f81f8cf9b4" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_517a4665-8206-439d-86c9-b6279744862f" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.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_22d65bb2-c24d-4741-8ffc-18f81f8cf9b4" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_517a4665-8206-439d-86c9-b6279744862f" xlink:type="arc"/>
  </link:calculationLink>
</link:linkbase>
