v3.26.3
INCOME TAXES - Additional Information (Details) - USD ($)
$ in Thousands
12 Months Ended
Aug. 31, 2026
Aug. 31, 2025
Aug. 31, 2024
Income Taxes [Line Items]      
Tax Jurisdiction of Domicile [Extensible Enumeration] U.S. Plans    
Unrecognized deferred tax liability from undistributed earnings of foreign subsidiaries $ 450,000    
Tax holiday income tax benefits 54,000 $ 50,000 $ 44,000
Deferred tax assets valuation allowance 1,674,836 1,689,015  
Net (decrease) increase in deferred tax valuation allowance (14,179) 70,601  
Tax credit carryforwards 1,537,225 1,544,834  
Operating loss carryforwards 1,116,954    
Unrecognized tax benefits 2,529,828 2,409,655 1,904,867
Unrecognized tax benefits potential to favorably impact effective tax rate 1,647,268 1,614,917  
Unrecognized tax benefits recorded as offsetting tax benefits associated with the correlative effects of potential transfer pricing adjustments, state income taxes and timing adjustments 882,560 794,738  
Unrecognized tax benefits, interest and penalties expense (benefit) 12,402 (20,036) $ 37,396
Unrecognized tax benefits, interest and penalties accrued, pre-tax 199,714 186,901  
Unrecognized tax benefits, interest and penalties accrued, net of tax benefits 179,073 $ 173,628  
Amount of increase in unrecognized tax benefits that is reasonably possible 1,300,000    
Tax Credit Carry Forwards, Expiring Between 2027 and 2036      
Income Taxes [Line Items]      
Tax credit carryforwards 23,050    
Tax Credit Carryforwards with Indefinite Carryforward Period      
Income Taxes [Line Items]      
Tax credit carryforwards 1,514,175    
Net Operating Loss Carryforwards, Expiring Between 2027 and 2036      
Income Taxes [Line Items]      
Operating loss carryforwards 100,779    
Net Operating Loss Carryforwards, Expiring Between 2037 and 2046      
Income Taxes [Line Items]      
Operating loss carryforwards 83,769    
Net Operating Loss Carryforwards with Indefinite Carryforward Period      
Income Taxes [Line Items]      
Operating loss carryforwards $ 932,406