v3.26.1
Stockholders' Equity - Stock option activity and related share-based compensation expense (Details) - USD ($)
$ / shares in Units, shares in Thousands, $ in Millions
12 Months Ended
Jul. 31, 2026
Jul. 31, 2025
Jul. 31, 2024
Summary of stock option activity, number of shares      
Number of shares, beginning balance (in shares) 1,319 1,772 2,130
Granted (in shares) 69 287 326
Exercised (in shares) (30) (660) (570)
Canceled or expired (in shares) (118) (80) (114)
Number of shares, ending balance (in shares) 1,240 1,319 1,772
Weighted Average Exercise Price Per Share      
Weighted-average exercise price per share, Beginning Balance (in dollars per share) $ 566.59 $ 449.66 $ 360.17
Granted (in dollars per share) 281.53 781.21 626.32
Exercised (in dollars per share) 478.86 354.70 212.89
Canceled or expired (in dollars per share) 601.89 493.70 467.16
Weighted-average exercise price per share, Ending Balance (in dollars per share) $ 549.37 $ 566.59 $ 449.66
Stock Options Outstanding      
Number of shares (in thousands), options outstanding (in shares) 1,240 1,319 1,772
Weighted average remaining contractual life (in years), options outstanding 3 years 10 months 9 days    
Weighted-average exercise price per share, options outstanding (in dollars per share) $ 549.37 $ 566.59 $ 449.66
Aggregate intrinsic value (in millions), options outstanding $ 4    
Number of shares (in thousands), options exercisable (in shares) 793    
Weighted-average remaining contractual life (in years) options exercisable 2 years 10 months 20 days    
Weighted-average exercise price per share, options exercisable (in dollars per share) $ 508.10    
Aggregate intrinsic value (in millions), options exercisable $ 1    
Additional information on stock options and ESPP shares      
Weighted-average fair value of options granted (in dollars per share) $ 124.58 $ 246.17 $ 188.54
Total grant date fair value of options vested $ 48 $ 43 $ 38
Aggregate intrinsic value of options exercised 5 208 209
Total tax benefit for stock option and ESPP share-based compensation 366 548 594
Cash received from option exercises 14 234 121
Cash tax benefits realized related to tax deductions for non-qualified option exercises and disqualifying dispositions under all share-based payment arrangements 2 27 49
Stock Options and ESPP      
Additional information on stock options and ESPP shares      
Share-based compensation expense for stock options and ESPP 98 86 83
Total tax benefit for stock option and ESPP share-based compensation $ 6 $ 24 $ 49