| Condensed Consolidated Statements of Stockholders' Equity (Unaudited) - USD ($)shares in Thousands, $ in Thousands
 | Total | Cumulative Effect, Period of Adoption, Adjustment | Common Stock and Capital in Excess of Par Value, Shares | Common Stock and Capital in Excess of Par Value, Amount | Retained Earnings | Retained Earnings  Cumulative Effect, Period of Adoption, Adjustment | Accumulated Other Comprehensive Income (Loss) | Total KLA Stockholders' Equity | Total KLA Stockholders' Equity  Cumulative Effect, Period of Adoption, Adjustment | Non- Controlling Interest | 
| Beginning balance (in shares) at Jun. 30, 2019 |  |  | 159,475 |  |  |  |  |  |  |  | 
| Beginning 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 | 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 |  |  | 
| Ending balance (in shares) at Sep. 30, 2019 |  |  | 158,097 |  |  |  |  |  |  |  | 
| Ending balance at Sep. 30, 2019 | 2,679,619 |  |  | 1,999,845 | 733,173 |  | (71,855) | 2,661,163 |  | 18,456 | 
| Beginning balance (in shares) at Jun. 30, 2019 |  |  | 159,475 |  |  |  |  |  |  |  | 
| Beginning 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 | (15,265) |  |  |  |  |  |  |  |  |  | 
| Net loss attributable to non-controlling interest | (822) |  |  |  |  |  |  |  |  |  | 
| Repurchase of common stock (in shares) |  |  | (5,326) |  |  |  |  |  |  |  | 
| Repurchase of common stock | (821,084) |  |  |  |  |  |  |  |  |  | 
| Ending balance (in shares) at Mar. 31, 2020 |  |  | 155,049 |  |  |  |  |  |  |  | 
| Ending balance at Mar. 31, 2020 | 2,325,196 |  |  | 2,019,071 | 376,656 |  | (88,294) | 2,307,433 |  | 17,763 | 
| Beginning balance (in shares) at Jun. 30, 2019 |  |  | 159,475 |  |  |  |  |  |  |  | 
| Beginning 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 |  |  |  |  |  |  |  |  |  |  | 
| Accounting Standards Update [Extensible List] |  | us-gaap:AccountingStandardsUpdate201613Member |  |  |  |  |  |  |  |  | 
| Ending balance (in shares) at Jun. 30, 2020 |  |  | 155,461 |  |  |  |  |  |  |  | 
| Ending balance at Jun. 30, 2020 | 2,681,010 | $ (5,530) |  | 2,090,268 | 654,930 | $ (5,530) | (79,774) | 2,665,424 | $ (5,530) | 15,586 | 
| Beginning balance (in shares) at Sep. 30, 2019 |  |  | 158,097 |  |  |  |  |  |  |  | 
| Beginning 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 | 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 |  |  | 
| Ending balance (in shares) at Dec. 31, 2019 |  |  | 156,849 |  |  |  |  |  |  |  | 
| Ending 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 | (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 |  |  | 
| Ending balance (in shares) at Mar. 31, 2020 |  |  | 155,049 |  |  |  |  |  |  |  | 
| Ending balance at Mar. 31, 2020 | 2,325,196 |  |  | 2,019,071 | 376,656 |  | (88,294) | 2,307,433 |  | 17,763 | 
| Beginning balance (in shares) at Jun. 30, 2020 |  |  | 155,461 |  |  |  |  |  |  |  | 
| Beginning balance at Jun. 30, 2020 | 2,681,010 | (5,530) |  | 2,090,268 | 654,930 | (5,530) | (79,774) | 2,665,424 | (5,530) | 15,586 | 
| Increase (Decrease) in Stockholders' Equity |  |  |  |  |  |  |  |  |  |  | 
| Net income attributable to KLA | 420,567 |  |  |  | 420,567 |  |  | 420,567 |  |  | 
| Other comprehensive income | 328 |  |  |  |  |  | 328 | 328 |  |  | 
| Net loss attributable to non-controlling interest | (425) |  |  |  |  |  |  |  |  | (425) | 
| Net issuance under employee stock plans (in shares) |  |  | 172 |  |  |  |  |  |  |  | 
| Net issuance under employee stock plans | (25,145) |  |  | (25,145) |  |  |  | (25,145) |  |  | 
| Repurchase of common stock (in shares) |  |  | (1,027) |  |  |  |  |  |  |  | 
| Repurchase of common stock | (193,897) |  |  | (19,400) | (174,497) |  |  | (193,897) |  |  | 
| Cash dividends and dividend equivalents declared | (141,555) |  |  |  | (141,555) |  |  | (141,555) |  |  | 
| Stock-based compensation expense | 26,992 |  |  | 26,992 |  |  |  | 26,992 |  |  | 
| Ending balance (in shares) at Sep. 30, 2020 |  |  | 154,606 |  |  |  |  |  |  |  | 
| Ending balance at Sep. 30, 2020 | 2,762,345 |  |  | 2,072,715 | 753,915 |  | (79,446) | 2,747,184 |  | 15,161 | 
| Beginning balance (in shares) at Jun. 30, 2020 |  |  | 155,461 |  |  |  |  |  |  |  | 
| Beginning balance at Jun. 30, 2020 | 2,681,010 | $ (5,530) |  | 2,090,268 | 654,930 | $ (5,530) | (79,774) | 2,665,424 | $ (5,530) | 15,586 | 
| Increase (Decrease) in Stockholders' Equity |  |  |  |  |  |  |  |  |  |  | 
| Net income attributable to KLA | 1,445,314 |  |  |  |  |  |  |  |  |  | 
| Other comprehensive income | 9,301 |  |  |  |  |  |  |  |  |  | 
| Net loss attributable to non-controlling interest | (1,019) |  |  |  |  |  |  |  |  |  | 
| Repurchase of common stock (in shares) |  |  | (2,707) |  |  |  |  |  |  |  | 
| Repurchase of common stock | (644,830) |  |  |  |  |  |  |  |  |  | 
| Ending balance (in shares) at Mar. 31, 2021 |  |  | 153,359 |  |  |  |  |  |  |  | 
| Ending balance at Mar. 31, 2021 | 3,112,864 |  |  | 2,115,205 | 1,070,124 |  | (70,473) | 3,114,856 |  | (1,992) | 
| Beginning balance (in shares) at Sep. 30, 2020 |  |  | 154,606 |  |  |  |  |  |  |  | 
| Beginning balance at Sep. 30, 2020 | 2,762,345 |  |  | 2,072,715 | 753,915 |  | (79,446) | 2,747,184 |  | 15,161 | 
| Increase (Decrease) in Stockholders' Equity |  |  |  |  |  |  |  |  |  |  | 
| Net income attributable to KLA | 457,251 |  |  |  | 457,251 |  |  | 457,251 |  |  | 
| Other comprehensive income | 6,742 |  |  |  |  |  | 6,742 | 6,742 |  |  | 
| Net loss attributable to non-controlling interest | (268) |  |  |  |  |  |  |  |  | (268) | 
| Net issuance under employee stock plans (in shares) |  |  | 329 |  |  |  |  |  |  |  | 
| Net issuance under employee stock plans | 15,356 |  |  | 15,356 |  |  |  | 15,356 |  |  | 
| Repurchase of common stock (in shares) |  |  | (774) |  |  |  |  |  |  |  | 
| Repurchase of common stock | (177,492) |  |  | (10,477) | (167,015) |  |  | (177,492) |  |  | 
| Cash dividends and dividend equivalents declared | (140,455) |  |  |  | (140,455) |  |  | (140,455) |  |  | 
| Stock-based compensation expense | 26,827 |  |  | 26,596 |  |  |  | 26,596 |  | 231 | 
| Ending balance (in shares) at Dec. 31, 2020 |  |  | 154,161 |  |  |  |  |  |  |  | 
| Ending balance at Dec. 31, 2020 | 2,950,306 |  |  | 2,104,190 | 903,696 |  | (72,704) | 2,935,182 |  | 15,124 | 
| Increase (Decrease) in Stockholders' Equity |  |  |  |  |  |  |  |  |  |  | 
| Net income attributable to KLA | 567,496 |  |  |  | 567,496 |  |  | 567,496 |  |  | 
| Other comprehensive income | 2,231 |  |  |  |  |  | 2,231 | 2,231 |  |  | 
| Net loss attributable to non-controlling interest | (326) |  |  |  |  |  |  |  |  | (326) | 
| Net issuance under employee stock plans (in shares) |  |  | 104 |  |  |  |  |  |  |  | 
| Net issuance under employee stock plans | (6,674) |  |  | (6,674) |  |  |  | (6,674) |  |  | 
| Repurchase of common stock (in shares) |  |  | (906) |  |  |  |  |  |  |  | 
| Repurchase of common stock | (273,441) |  |  | (12,431) | (261,010) |  |  | (273,441) |  |  | 
| Cash dividends and dividend equivalents declared | (140,058) |  |  |  | (140,058) |  |  | (140,058) |  |  | 
| Stock-based compensation expense | 30,327 |  |  | 30,120 |  |  |  | 30,120 |  | 207 | 
| Net issuance on exercise of options by non-controlling interest | 127 |  |  |  |  |  |  |  |  | 127 | 
| Disposal of non-controlling interest | (17,124) |  |  |  |  |  |  |  |  | (17,124) | 
| Ending balance (in shares) at Mar. 31, 2021 |  |  | 153,359 |  |  |  |  |  |  |  | 
| Ending balance at Mar. 31, 2021 | $ 3,112,864 |  |  | $ 2,115,205 | $ 1,070,124 |  | $ (70,473) | $ 3,114,856 |  | $ (1,992) |