Condensed Consolidated Statements of Stockholders' Equity - USD ($)  shares in Thousands, $ in Thousands  | 
Total  | 
Total KLA Stockholders’ Equity  | 
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)  | 
Non- Controlling Interest  | 
| Beginning balance (in shares) at Jun. 30, 2022 | 
 
 | 
 
 | 
141,804
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Beginning balance at Jun. 30, 2022 | 
$ 1,399,090
 | 
$ 1,401,351
 | 
 
 | 
$ 1,061,940
 | 
$ 366,882
 | 
$ (27,471)
 | 
$ (2,261)
 | 
| Increase (Decrease) in Stockholders' Equity | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Net income | 
1,025,991
 | 
1,025,991
 | 
 
 | 
 
 | 
1,025,991
 | 
 
 | 
 
 | 
| Net income attributable to non-controlling interest | 
74
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
74
 | 
| Other comprehensive income (loss) | 
(31,370)
 | 
(31,370)
 | 
 
 | 
 
 | 
 
 | 
(31,370)
 | 
 
 | 
| Net issuance under employee stock plans (in shares) | 
 
 | 
 
 | 
171
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Net issuance under employee stock plans | 
(54,950)
 | 
(54,950)
 | 
 
 | 
(54,950)
 | 
 
 | 
 
 | 
 
 | 
| Repurchase of common stock (in shares) | 
 
 | 
 
 | 
(257)
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Repurchase of common stock | 
(89,616)
 | 
(89,616)
 | 
 
 | 
(1,926)
 | 
(87,690)
 | 
 
 | 
 
 | 
| Cash dividends and dividend equivalents declared | 
(186,216)
 | 
(186,216)
 | 
 
 | 
 
 | 
(186,216)
 | 
 
 | 
 
 | 
| Stock-based compensation expense | 
34,982
 | 
34,982
 | 
 
 | 
34,982
 | 
 
 | 
 
 | 
 
 | 
| Purchase of non-controlling interest | 
(4,294)
 | 
1,902
 | 
 
 | 
1,902
 | 
 
 | 
 
 | 
(6,196)
 | 
| Disposal of non-controlling interest | 
8,383
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
8,383
 | 
| Ending balance (in shares) at Sep. 30, 2022 | 
 
 | 
 
 | 
141,718
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Ending balance at Sep. 30, 2022 | 
2,102,074
 | 
2,102,074
 | 
 
 | 
1,041,948
 | 
1,118,967
 | 
(58,841)
 | 
0
 | 
| Beginning balance (in shares) at Jun. 30, 2022 | 
 
 | 
 
 | 
141,804
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Beginning balance at Jun. 30, 2022 | 
1,399,090
 | 
1,401,351
 | 
 
 | 
1,061,940
 | 
366,882
 | 
(27,471)
 | 
(2,261)
 | 
| Increase (Decrease) in Stockholders' Equity | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Net income | 
2,702,623
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Net income attributable to non-controlling interest | 
74
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Other comprehensive income (loss) | 
$ (7,820)
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Repurchase of common stock (in shares) | 
(4,913)
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Ending balance (in shares) at Mar. 31, 2023 | 
 
 | 
 
 | 
137,289
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Ending balance at Mar. 31, 2023 | 
$ 2,682,781
 | 
2,682,781
 | 
 
 | 
1,996,773
 | 
721,299
 | 
(35,291)
 | 
0
 | 
| Beginning balance (in shares) at Sep. 30, 2022 | 
 
 | 
 
 | 
141,718
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Beginning balance at Sep. 30, 2022 | 
2,102,074
 | 
2,102,074
 | 
 
 | 
1,041,948
 | 
1,118,967
 | 
(58,841)
 | 
0
 | 
| Increase (Decrease) in Stockholders' Equity | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Net income | 
978,795
 | 
978,795
 | 
 
 | 
 
 | 
978,795
 | 
 
 | 
 
 | 
| Other comprehensive income (loss) | 
9,739
 | 
9,739
 | 
 
 | 
 
 | 
 
 | 
9,739
 | 
 
 | 
| Net issuance under employee stock plans (in shares) | 
 
 | 
 
 | 
170
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Net issuance under employee stock plans | 
31,196
 | 
31,196
 | 
 
 | 
31,196
 | 
 
 | 
 
 | 
 
 | 
| Repurchase of common stock (in shares) | 
 
 | 
 
 | 
(3,429)
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Repurchase of common stock | 
(370,982)
 | 
(370,982)
 | 
 
 | 
870,811
 | 
(1,241,793)
 | 
 
 | 
 
 | 
| Cash dividends and dividend equivalents declared | 
(185,967)
 | 
(185,967)
 | 
 
 | 
 
 | 
(185,967)
 | 
 
 | 
 
 | 
| Stock-based compensation expense | 
38,405
 | 
38,405
 | 
 
 | 
38,405
 | 
 
 | 
 
 | 
 
 | 
| Ending balance (in shares) at Dec. 31, 2022 | 
 
 | 
 
 | 
138,459
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Ending balance at Dec. 31, 2022 | 
2,603,260
 | 
2,603,260
 | 
 
 | 
1,982,360
 | 
670,002
 | 
(49,102)
 | 
0
 | 
| Increase (Decrease) in Stockholders' Equity | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Net income | 
697,837
 | 
697,837
 | 
 
 | 
 
 | 
697,837
 | 
 
 | 
 
 | 
| Net income attributable to non-controlling interest | 
0
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Other comprehensive income (loss) | 
13,811
 | 
13,811
 | 
 
 | 
 
 | 
 
 | 
13,811
 | 
 
 | 
| Net issuance under employee stock plans (in shares) | 
 
 | 
 
 | 
57
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Net issuance under employee stock plans | 
$ (16,154)
 | 
(16,154)
 | 
 
 | 
(16,154)
 | 
 
 | 
 
 | 
 
 | 
| Repurchase of common stock (in shares) | 
(1,227)
 | 
 
 | 
(1,227)
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Repurchase of common stock | 
$ (482,712)
 | 
(482,712)
 | 
 
 | 
(17,563)
 | 
(465,149)
 | 
 
 | 
 
 | 
| Cash dividends and dividend equivalents declared | 
(181,391)
 | 
(181,391)
 | 
 
 | 
 
 | 
(181,391)
 | 
 
 | 
 
 | 
| Stock-based compensation expense | 
48,130
 | 
48,130
 | 
 
 | 
48,130
 | 
 
 | 
 
 | 
 
 | 
| Ending balance (in shares) at Mar. 31, 2023 | 
 
 | 
 
 | 
137,289
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Ending balance at Mar. 31, 2023 | 
2,682,781
 | 
2,682,781
 | 
 
 | 
1,996,773
 | 
721,299
 | 
(35,291)
 | 
0
 | 
| Beginning balance (in shares) at Jun. 30, 2023 | 
 
 | 
 
 | 
136,750
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Beginning balance at Jun. 30, 2023 | 
2,919,753
 | 
2,919,753
 | 
 
 | 
2,107,663
 | 
848,431
 | 
(36,341)
 | 
0
 | 
| Increase (Decrease) in Stockholders' Equity | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Net income | 
741,375
 | 
741,375
 | 
 
 | 
 
 | 
741,375
 | 
 
 | 
 
 | 
| Other comprehensive income (loss) | 
(13,097)
 | 
(13,097)
 | 
 
 | 
 
 | 
 
 | 
(13,097)
 | 
 
 | 
| Net issuance under employee stock plans (in shares) | 
 
 | 
 
 | 
173
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Net issuance under employee stock plans | 
(68,237)
 | 
(68,237)
 | 
 
 | 
(68,237)
 | 
 
 | 
 
 | 
 
 | 
| Repurchase of common stock (in shares) | 
 
 | 
 
 | 
(956)
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Repurchase of common stock | 
(459,093)
 | 
(459,093)
 | 
 
 | 
(14,722)
 | 
(444,371)
 | 
 
 | 
 
 | 
| Cash dividends and dividend equivalents declared | 
(179,256)
 | 
(179,256)
 | 
 
 | 
 
 | 
(179,256)
 | 
 
 | 
 
 | 
| Stock-based compensation expense | 
48,772
 | 
48,772
 | 
 
 | 
48,772
 | 
 
 | 
 
 | 
 
 | 
| Ending balance (in shares) at Sep. 30, 2023 | 
 
 | 
 
 | 
135,967
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Ending balance at Sep. 30, 2023 | 
2,990,217
 | 
2,990,217
 | 
 
 | 
2,073,476
 | 
966,179
 | 
(49,438)
 | 
0
 | 
| Beginning balance (in shares) at Jun. 30, 2023 | 
 
 | 
 
 | 
136,750
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Beginning balance at Jun. 30, 2023 | 
2,919,753
 | 
2,919,753
 | 
 
 | 
2,107,663
 | 
848,431
 | 
(36,341)
 | 
0
 | 
| Increase (Decrease) in Stockholders' Equity | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Net income | 
1,925,450
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Net income attributable to non-controlling interest | 
0
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Other comprehensive income (loss) | 
$ (5,179)
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Repurchase of common stock (in shares) | 
(2,392)
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Repurchase of common stock | 
$ (1,276,352)
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Ending balance (in shares) at Mar. 31, 2024 | 
 
 | 
 
 | 
134,713
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Ending balance at Mar. 31, 2024 | 
3,094,885
 | 
3,094,885
 | 
 
 | 
2,177,501
 | 
958,904
 | 
(41,520)
 | 
0
 | 
| Beginning balance (in shares) at Sep. 30, 2023 | 
 
 | 
 
 | 
135,967
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Beginning balance at Sep. 30, 2023 | 
2,990,217
 | 
2,990,217
 | 
 
 | 
2,073,476
 | 
966,179
 | 
(49,438)
 | 
0
 | 
| Increase (Decrease) in Stockholders' Equity | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Net income | 
582,534
 | 
582,534
 | 
 
 | 
 
 | 
582,534
 | 
 
 | 
 
 | 
| Other comprehensive income (loss) | 
17,174
 | 
17,174
 | 
 
 | 
 
 | 
 
 | 
17,174
 | 
 
 | 
| Net issuance under employee stock plans (in shares) | 
 
 | 
 
 | 
141
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Net issuance under employee stock plans | 
45,427
 | 
45,427
 | 
 
 | 
45,427
 | 
 
 | 
 
 | 
 
 | 
| Repurchase of common stock (in shares) | 
 
 | 
 
 | 
(848)
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Repurchase of common stock | 
(441,563)
 | 
(441,563)
 | 
 
 | 
(13,014)
 | 
(428,549)
 | 
 
 | 
 
 | 
| Cash dividends and dividend equivalents declared | 
(198,698)
 | 
(198,698)
 | 
 
 | 
 
 | 
(198,698)
 | 
 
 | 
 
 | 
| Stock-based compensation expense | 
48,620
 | 
48,620
 | 
 
 | 
48,620
 | 
 
 | 
 
 | 
 
 | 
| Ending balance (in shares) at Dec. 31, 2023 | 
 
 | 
 
 | 
135,260
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Ending balance at Dec. 31, 2023 | 
3,043,711
 | 
3,043,711
 | 
 
 | 
2,154,509
 | 
921,466
 | 
(32,264)
 | 
0
 | 
| Increase (Decrease) in Stockholders' Equity | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Net income | 
601,541
 | 
601,541
 | 
 
 | 
 
 | 
601,541
 | 
 
 | 
 
 | 
| Net income attributable to non-controlling interest | 
0
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Other comprehensive income (loss) | 
(9,256)
 | 
(9,256)
 | 
 
 | 
 
 | 
 
 | 
(9,256)
 | 
 
 | 
| Net issuance under employee stock plans (in shares) | 
 
 | 
 
 | 
41
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Net issuance under employee stock plans | 
$ (24,275)
 | 
(24,275)
 | 
 
 | 
(24,275)
 | 
 
 | 
 
 | 
 
 | 
| Repurchase of common stock (in shares) | 
(588)
 | 
 
 | 
(588)
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Repurchase of common stock | 
$ (375,696)
 | 
(375,696)
 | 
 
 | 
(9,415)
 | 
(366,281)
 | 
 
 | 
 
 | 
| Cash dividends and dividend equivalents declared | 
(197,822)
 | 
(197,822)
 | 
 
 | 
 
 | 
(197,822)
 | 
 
 | 
 
 | 
| Stock-based compensation expense | 
56,682
 | 
56,682
 | 
 
 | 
56,682
 | 
 
 | 
 
 | 
 
 | 
| Ending balance (in shares) at Mar. 31, 2024 | 
 
 | 
 
 | 
134,713
 | 
 
 | 
 
 | 
 
 | 
 
 | 
| Ending balance at Mar. 31, 2024 | 
$ 3,094,885
 | 
$ 3,094,885
 | 
 
 | 
$ 2,177,501
 | 
$ 958,904
 | 
$ (41,520)
 | 
$ 0
 |