v3.25.2
Cover Page - USD ($)
$ in Thousands
12 Months Ended
Jun. 30, 2025
Sep. 09, 2025
Dec. 31, 2024
Cover [Abstract]      
Document Type 10-K    
Document Annual Report true    
Document Transition Report false    
Entity File Number 001-15461    
Entity Registrant Name MATRIX SERVICE CO    
Entity Incorporation, State or Country Code DE    
Entity Tax Identification Number 73-1352174    
Entity Address, Address Line One 15 E. 5th Street    
Entity Address, Address Line Two Suite 1100    
Entity Address, City or Town Tulsa,    
Entity Address, State or Province OK    
Entity Address, Postal Zip Code 74103    
City Area Code 918    
Local Phone Number 838-8822    
Title of 12(b) Security Common Stock, par value $0.01 per share    
Trading Symbol MTRX    
Security Exchange Name NASDAQ    
Entity Well-known Seasoned Issuer No    
Entity Voluntary Filers No    
Entity Current Reporting Status Yes    
Entity Interactive Data Current Yes    
Entity Filer Category Accelerated Filer    
Entity Emerging Growth Company false    
ICFR Auditor Attestation Flag true    
Entity Shell Company false    
Entity Public Float     $ 316,400
Entity Common Stock, Shares Outstanding   28,068,535  
Documents Incorporated by Reference
Documents Incorporated by Reference
Certain sections of the registrant's definitive proxy statement relating to the registrant's 2025 annual meeting of stockholders, which definitive proxy statement will be filed within 120 days of the end of the registrant's fiscal year, are incorporated by reference into Part III of this Form 10-K.
   
Document Financial Statement Error Correction [Flag] false    
Entity Central Index Key 0000866273    
Document Period End Date Jun. 30, 2025    
Current Fiscal Year End Date --06-30    
Document Fiscal Year Focus 2025    
Document Fiscal Period Focus FY    
Auditor Firm ID 34    
Auditor Name DELOITTE & TOUCHE LLP    
Auditor Location Tulsa, Oklahoma    
Amendment Flag false    
Entity Small Business false