| Condensed Consolidated Statements of Stockholders' Equity (Unaudited) - USD ($)shares in Thousands, $ in Thousands
 | Total | Common Stock and Capital in Excess of Par Value, Shares | Common Stock and Capital in Excess of Par Value, Amount | Retained Earnings | Accumulated Other Comprehensive Income (Loss) | Total KLA Stockholders’ Equity | Non-Controlling Interest | 
| Increase (Decrease) in Stockholders' Equity |  |  |  |  |  |  |  | 
| Balance as of July 1, 2018 |  |  | $ 617,999 |  |  |  |  | 
| Balance (in shares) at Jun. 30, 2018 |  | 156,048 |  |  |  |  |  | 
| Balance at Jun. 30, 2018 | $ 1,620,511 |  | 617,999 | $ 1,056,445 | $ (53,933) | $ 1,620,511 | $ 0 | 
| Increase (Decrease) in Stockholders' Equity |  |  |  |  |  |  |  | 
| Reclassification of stranded tax effects |  |  |  | 10,920 | (10,920) |  |  | 
| Balance (in shares) at Jun. 30, 2018 |  | 156,048 |  |  |  |  |  | 
| Balance at Jun. 30, 2018 | 1,620,511 |  | 617,999 | 1,056,445 | (53,933) | 1,620,511 | 0 | 
| Increase (Decrease) in Stockholders' Equity |  |  |  |  |  |  |  | 
| Net income attributable to KLA | 395,944 |  |  | 395,944 |  | 395,944 |  | 
| Other comprehensive income (loss) | 8,611 |  |  |  | 8,611 | 8,611 |  | 
| Net issuance under employee stock plans (in shares) |  | 332 |  |  |  |  |  | 
| Net issuance under employee stock plans | (26,961) |  | (26,961) |  |  | (26,961) |  | 
| Repurchase of common stock (in shares) |  | (2,781) |  |  |  |  |  | 
| Repurchase of common stock | (307,787) |  | (11,010) | (296,777) |  | (307,787) |  | 
| Cash dividends and dividend equivalents declared | (117,947) |  |  | (117,947) |  | (117,947) |  | 
| Stock-based compensation expense | 16,138 |  | 16,138 |  |  | 16,138 |  | 
| Balance (in shares) at Sep. 30, 2018 |  | 153,599 |  |  |  |  |  | 
| Balance at Sep. 30, 2018 | 1,567,369 |  | 596,166 | 1,027,370 | (56,167) | 1,567,369 | 0 | 
| Balance (in shares) at Jun. 30, 2018 |  | 156,048 |  |  |  |  |  | 
| Balance at Jun. 30, 2018 | 1,620,511 |  | 617,999 | 1,056,445 | (53,933) | 1,620,511 | 0 | 
| Increase (Decrease) in Stockholders' Equity |  |  |  |  |  |  |  | 
| Net income attributable to KLA | 957,772 |  |  |  |  |  |  | 
| Other comprehensive income (loss) | (4,129) |  |  |  |  |  |  | 
| Net loss attributable to non-controlling interest | (83) |  |  |  |  |  |  | 
| Repurchase of common stock (in shares) |  | (7,107) |  |  |  |  |  | 
| Repurchase of common stock | (756,204) |  |  |  |  |  |  | 
| Balance (in shares) at Mar. 31, 2019 |  | 161,912 |  |  |  |  |  | 
| Balance at Mar. 31, 2019 | 2,885,588 |  | 1,989,914 | 928,086 | (68,907) | 2,849,093 | 36,495 | 
| Increase (Decrease) in Stockholders' Equity |  |  |  |  |  |  |  | 
| Adoption of ASC 606 | Accounting Standards Update 2014-09 | (21,140) |  |  | (21,215) | 75 | (21,140) |  | 
| Balance as of July 1, 2018 | 1,599,371 |  |  | 1,046,150 | (64,778) | 1,599,371 | 0 | 
| Balance (in shares) at Sep. 30, 2018 |  | 153,599 |  |  |  |  |  | 
| Balance at Sep. 30, 2018 | 1,567,369 |  | 596,166 | 1,027,370 | (56,167) | 1,567,369 | 0 | 
| Increase (Decrease) in Stockholders' Equity |  |  |  |  |  |  |  | 
| Net income attributable to KLA | 369,100 |  |  | 369,100 |  | 369,100 |  | 
| Other comprehensive income (loss) | (14,280) |  |  |  | (14,280) | (14,280) |  | 
| Net issuance under employee stock plans (in shares) |  | 321 |  |  |  |  |  | 
| Net issuance under employee stock plans | 17,323 |  | 17,323 |  |  | 17,323 |  | 
| Repurchase of common stock (in shares) |  | (2,556) |  |  |  |  |  | 
| Repurchase of common stock | (242,401) |  | (9,919) | (232,482) |  | (242,401) |  | 
| Cash dividends and dividend equivalents declared | (115,184) |  |  | (115,184) |  | (115,184) |  | 
| Stock-based compensation expense | 15,695 |  | 15,695 |  |  | 15,695 |  | 
| Balance (in shares) at Dec. 31, 2018 |  | 151,364 |  |  |  |  |  | 
| Balance at Dec. 31, 2018 | 1,597,622 |  | 619,265 | 1,048,804 | (70,447) | 1,597,622 | 0 | 
| Increase (Decrease) in Stockholders' Equity |  |  |  |  |  |  |  | 
| Net income attributable to KLA | 192,728 |  |  | 192,728 |  | 192,728 |  | 
| Other comprehensive income (loss) | 1,540 |  |  |  | 1,540 | 1,540 |  | 
| Net loss attributable to non-controlling interest | (83) |  |  |  |  |  | (83) | 
| Assumption of stock-based compensation plan awards in connection with the acquisition of Orbotech | 13,281 |  | 13,281 |  |  | 13,281 |  | 
| Common stock issued upon the acquisition of Orbotech (in shares) |  | 12,292 |  |  |  |  |  | 
| Common stock issued upon the acquisition of Orbotech | 1,330,786 |  | 1,330,786 |  |  | 1,330,786 |  | 
| Net issuance under employee stock plans (in shares) |  | 26 |  |  |  |  |  | 
| Net issuance under employee stock plans | (371) |  | (371) |  |  | (371) |  | 
| Repurchase of common stock (in shares) |  | (1,770) |  |  |  |  |  | 
| Repurchase of common stock | (206,017) |  | (7,240) | (198,777) |  | (206,017) |  | 
| Cash dividends and dividend equivalents declared | (114,669) |  |  | (114,669) |  | (114,669) |  | 
| Non-controlling interest in connection with the acquisition of Orbotech | 36,578 |  |  |  |  |  | 36,578 | 
| Stock-based compensation expense | 34,193 |  | 34,193 |  |  | 34,193 |  | 
| Balance (in shares) at Mar. 31, 2019 |  | 161,912 |  |  |  |  |  | 
| Balance at Mar. 31, 2019 | 2,885,588 |  | 1,989,914 | 928,086 | (68,907) | 2,849,093 | 36,495 | 
| Balance (in shares) at Jun. 30, 2019 |  | 159,475 |  |  |  |  |  | 
| Balance at Jun. 30, 2019 | 2,677,693 |  | 2,017,312 | 714,825 | (73,029) | 2,659,108 | 18,585 | 
| Increase (Decrease) in Stockholders' Equity |  |  |  |  |  |  |  | 
| Net income attributable to KLA | 346,525 |  |  | 346,525 |  | 346,525 |  | 
| Other comprehensive income (loss) | 1,174 |  |  |  | 1,174 | 1,174 |  | 
| Net loss attributable to non-controlling interest | (129) |  |  |  |  |  | (129) | 
| Net issuance under employee stock plans (in shares) |  | 281 |  |  |  |  |  | 
| Net issuance under employee stock plans | (23,423) |  | (23,423) |  |  | (23,423) |  | 
| Repurchase of common stock (in shares) |  | (1,659) |  |  |  |  |  | 
| Repurchase of common stock | (228,496) |  | (20,988) | (207,508) |  | (228,496) |  | 
| Cash dividends and dividend equivalents declared | (120,669) |  |  | (120,669) |  | (120,669) |  | 
| Stock-based compensation expense | 26,944 |  | 26,944 |  |  | 26,944 |  | 
| Balance (in shares) at Sep. 30, 2019 |  | 158,097 |  |  |  |  |  | 
| Balance at Sep. 30, 2019 | 2,679,619 |  | 1,999,845 | 733,173 | (71,855) | 2,661,163 | 18,456 | 
| Balance (in shares) at Jun. 30, 2019 |  | 159,475 |  |  |  |  |  | 
| Balance at Jun. 30, 2019 | 2,677,693 |  | 2,017,312 | 714,825 | (73,029) | 2,659,108 | 18,585 | 
| Increase (Decrease) in Stockholders' Equity |  |  |  |  |  |  |  | 
| Net income attributable to KLA | 805,532 |  |  |  |  |  |  | 
| Other comprehensive income (loss) | (15,265) |  |  |  |  |  |  | 
| Net loss attributable to non-controlling interest | (822) |  |  |  |  |  |  | 
| Repurchase of common stock (in shares) |  | (5,326) |  |  |  |  |  | 
| Repurchase of common stock | (821,084) |  |  |  |  |  |  | 
| Balance (in shares) at Mar. 31, 2020 |  | 155,049 |  |  |  |  |  | 
| Balance at Mar. 31, 2020 | 2,325,196 |  | 2,019,071 | 376,656 | (88,294) | 2,307,433 | 17,763 | 
| Balance (in shares) at Sep. 30, 2019 |  | 158,097 |  |  |  |  |  | 
| Balance at Sep. 30, 2019 | 2,679,619 |  | 1,999,845 | 733,173 | (71,855) | 2,661,163 | 18,456 | 
| Increase (Decrease) in Stockholders' Equity |  |  |  |  |  |  |  | 
| Net income attributable to KLA | 380,555 |  |  | 380,555 |  | 380,555 |  | 
| Other comprehensive income (loss) | 5,097 |  |  |  | 5,097 | 5,097 |  | 
| Net loss attributable to non-controlling interest | (250) |  |  |  |  |  | (250) | 
| Net issuance under employee stock plans (in shares) |  | 442 |  |  |  |  |  | 
| Net issuance under employee stock plans | 12,262 |  | 12,262 |  |  | 12,262 |  | 
| Repurchase of common stock (in shares) |  | (1,690) |  |  |  |  |  | 
| Repurchase of common stock | (280,593) |  | (21,375) | (259,218) |  | (280,593) |  | 
| Cash dividends and dividend equivalents declared | (135,509) |  |  | (135,509) |  | (135,509) |  | 
| Stock-based compensation expense | 26,789 |  | 26,789 |  |  | 26,789 |  | 
| Balance (in shares) at Dec. 31, 2019 |  | 156,849 |  |  |  |  |  | 
| Balance at Dec. 31, 2019 | 2,687,970 |  | 2,017,521 | 719,001 | (66,758) | 2,669,764 | 18,206 | 
| Increase (Decrease) in Stockholders' Equity |  |  |  |  |  |  |  | 
| Net income attributable to KLA | 78,452 |  |  | 78,452 |  | 78,452 |  | 
| Other comprehensive income (loss) | (21,536) |  |  |  | (21,536) | (21,536) |  | 
| Net loss attributable to non-controlling interest | (443) |  |  |  |  |  | (443) | 
| Net issuance under employee stock plans (in shares) |  | 177 |  |  |  |  |  | 
| Net issuance under employee stock plans | (4,284) |  | (4,284) |  |  | (4,284) |  | 
| Repurchase of common stock (in shares) |  | (1,977) |  |  |  |  |  | 
| Repurchase of common stock | (311,995) |  | (25,436) | (286,559) |  | (311,995) |  | 
| Cash dividends and dividend equivalents declared | (134,238) |  |  | (134,238) |  | (134,238) |  | 
| Stock-based compensation expense | 31,270 |  | 31,270 |  |  | 31,270 |  | 
| Balance (in shares) at Mar. 31, 2020 |  | 155,049 |  |  |  |  |  | 
| Balance at Mar. 31, 2020 | $ 2,325,196 |  | $ 2,019,071 | $ 376,656 | $ (88,294) | $ 2,307,433 | $ 17,763 |