EXHIBIT 23.1 [MOHLER, NIXON & WILLIAMS LETTERHEAD] CONSENT OF INDEPENDENT ACCOUNTANTS We hereby consent to the incorporation by reference in the Registration Statement on Form S-8 (Nos. 333-60866, 333-49766 and 333-46598) of KLA-Tencor Corporation of our report dated November 7, 2001, relating to the financial statements of the KLA-Tencor 401(k) Plan which appears in this Form 11-K. /s/ MOHLER, NIXON & WILLIAMS MOHLER, NIXON & WILLIAMS Accountancy Corporation Campbell, California December 20, 2001