v3.25.1
Cover Page - shares
9 Months Ended
Mar. 31, 2025
May 07, 2025
Cover [Abstract]    
Document Type 10-Q  
Document Quarterly Report true  
Document Period End Date Mar. 31, 2025  
Document Transition Report false  
Entity File Number 1-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 East 5th Street, 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 Current Reporting Status Yes  
Entity Interactive Data Current Yes  
Entity Emerging Growth Company false  
Entity Filer Category Accelerated Filer  
Entity Small Business false  
Entity Shell Company false  
Entity Common Stock, Shares Outstanding   27,610,499
Document Fiscal Year Focus 2025  
Document Fiscal Period Focus Q3  
Entity Central Index Key 0000866273  
Current Fiscal Year End Date --06-30  
Amendment Flag false