<Page> Exhibit 23 CONSENT OF INDEPENDENT ACCOUNTANTS We hereby consent to the incorporation by reference in the Registration Statement on Form S-3 (Nos. 33-84660, 333-74528 and 333-88176) and in the Registration Statements on Form S-8 (Nos. 2-66247, 2-77690, 33-18771, 33-26748, 33-38810, 33-45169, 33-70662, 33-87446, 33-87448, 33-97332 and 333-57463) of TRC Companies, Inc. of our report dated August 26, 2002 relating to the financial statements and financial statement schedule which appear in this Annual Report on Form 10-K. /s/PricewaterhouseCoopers LLP Hartford, Connecticut September 30, 2002 58