EXHIBIT 23.1 Consent of Independent Accountants We hereby consent to the incorporation by reference in the Registration Statements on Form S-8 (No. 33-15784, No. 2-71584, No. 2-75314, No. 33-26002, No. 33-42973, No. 33-42982, No. 33-42975, No. 33-55362, No. 33-88662, No. 333-03003, No. 333-22939, No. 333-22941, No. 333-26681, No. 333-32537, No. 333-45271, No. 333-60887, No. 333-60883, No. 333-68423, No. 333-68415, No. 333-85121, No. 333-85123, No. 333-46598, No. 333-49766, No. 333-49828, No. 333-60864, and No. 333-60866) and in the Prospectus constituting part of the Registration Statement on Form S-3 (No. 333-52393) of KLA-Tencor Corporation of our report dated July 31, 2001 relating to the financial statements and the financial statement schedule, which appear in this Annual Report on Form 10-K. /s/ PricewaterhouseCoopers LLP San Jose, California September 21, 2001