v3.7.0.1
Document and Entity Information - USD ($)
$ in Millions
12 Months Ended
Jun. 30, 2017
Sep. 05, 2017
Dec. 31, 2016
Entity Information [Line Items]      
Entity Registrant Name MATRIX SERVICE CO    
Entity Central Index Key 0000866273    
Document Type 10-K    
Document Period End Date Jun. 30, 2017    
Amendment Flag false    
Document Fiscal Year Focus 2017    
Document Fiscal Period Focus FY    
Current Fiscal Year End Date --06-30    
Entity Well-known Seasoned Issuer No    
Entity Voluntary Filers No    
Entity Current Reporting Status Yes    
Entity Filer Category Accelerated Filer    
Entity Public Float     $ 590
Entity Common Stock, Shares Outstanding   26,722,392