EXHIBIT 23.1 CONSENT OF INDEPENDENT ACCOUNTANTS We hereby consent to the incorporation by reference in this Registration Statement on Form S-8 of our report dated July 31, 2002 relating to the financial statements of KLA-Tencor Corporation, which appears in KLA-Tencor Corporation's Annual Report on Form 10-K for the year ended June 30, 2002. We also consent to the incorporation by reference of our report dated July 31, 2002 relating to the financial statement schedule, which appears in such Annual Report on Form 10-K. /s/ PricewaterhouseCoopers San Jose, California September 27, 2002