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 22, 2003 relating to the financial statements and financial statement schedule of KLA-Tencor Corporation, which appears in KLA-Tencor Corporation's Annual Report on Form 10-K for the year ended June 30, 2003. /s/ PricewaterhouseCoopers San Jose, California March 5, 2004