v3.26.1
Stockholders' Equity - Additional information (Details)
$ / shares in Units, $ in Millions
6 Months Ended 12 Months Ended
Jul. 31, 2022
shares
Jul. 31, 2026
USD ($)
period
$ / shares
shares
Jul. 31, 2025
USD ($)
shares
Jul. 31, 2024
USD ($)
shares
Aug. 31, 2026
$ / shares
May 07, 2026
USD ($)
Aug. 19, 2025
USD ($)
Jul. 31, 2023
shares
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Stock repurchased during period (in shares) | $   $ 5,463 $ 2,793 $ 1,978        
Amounts due for share repurchases | $   31 14          
Stock repurchase program, additional authorized amount (in shares) | $             $ 3,200  
Stock repurchase program, remaining authorized repurchase amount | $           $ 8,000    
Retirement of treasury stock | $   $ (27,006) $ 0 $ 0        
Common stock dividends, cash paid (in dollars per share) | $ / shares   $ 4.80            
Common stock dividends | $   $ 1,300            
Common stock, shares authorized (in shares) | shares   750,000,000 750,000,000          
Pool shares reduced for each share granted (in shares) | shares   2.3            
Pool shares increased for each share forfeited (in shares) | shares 2.3 2.3            
Shares available for grant (in shares) | shares   11,280,000 25,147,000 27,317,000       19,026,000
Stock offering period, months, employee stock purchase plans   6 months            
Stock accrual period, employee stock purchase plans, number of accrual periods | period   2            
Stock offering period, number of months in accrual period   3 months            
Percentage of lower of the closing price for stock on the first day last day of the offering period   85.00%            
Shares issued during period for Employee Stock Purchase Plans (in shares) | shares   438,432 306,286 360,028        
Shares available for issuance under Employee Stock Purchase Plan (in shares) | shares   1,219,234            
Market price of common stock (in dollars per share) | $ / shares   $ 316.07            
Stock Options                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Number of years until options vest   7 years            
Unrecognized compensation cost | $   $ 88            
Weighted-average vesting period   2 years 7 months 6 days            
Stock Options | Minimum                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Award vesting period   3 years            
Stock Options | Maximum                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Award vesting period   4 years            
Restricted Stock Units (RSUs)                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Percent of total share-based compensation expense   90.00%            
Unrecognized compensation cost | $   $ 4,900            
Weighted-average vesting period   3 years            
Restricted Stock Units (RSUs) | Minimum                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Award vesting period   3 years            
Restricted Stock Units (RSUs) | Maximum                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Award vesting period   4 years            
Employee Stock                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Common stock, shares authorized (in shares) | shares   25,800,000            
Restated 2005 Plan                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Common stock, shares authorized (in shares) | shares   171,700,000            
Restated 2005 Plan | Stock Options                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Pool shares reduced for each share granted (in shares) | shares   1            
Number of shares added back to plan when grants are forfeited (in shares) | shares   1            
Shares available for grant (in shares) | shares   11,300,000            
Subsequent Event                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Dividends payable per share (in dollars per share) | $ / shares         $ 1.38      
Current Program                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Stock repurchase program remaining authorized repurchase amount | $   $ 7,900            
Common Stock                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Stock repurchases under stock repurchase programs (in shares) | shares   13,366,000 4,319,000 3,427,000        
Treasury Stock                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Stock repurchased during period (in shares) | $   $ 5,463 $ 2,793 $ 1,978        
Shares, retired (in shares) | shares   233,000,000            
Retirement of treasury stock | $   $ 27,006            
Additional Paid-In Capital                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Retirement of treasury stock | $   (23,159)            
Retained Earnings                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Retirement of treasury stock | $   $ (3,847)