Earnings Per Share - Schedule of Stock Options and Restricted Stock Units that were not Included in the Diluted Earnings Per Share Calculation (Details) - $ / shares shares in Thousands |
3 Months Ended | |
|---|---|---|
Jan. 31, 2026 |
Jan. 31, 2025 |
|
| Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items] | ||
| Exercise prices, lower limit (in dollars per share) | $ 78.51 | $ 82.46 |
| Exercise prices, upper limit (in dollars per share) | $ 101.54 | $ 101.54 |
| Stock option shares excluded | ||
| Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items] | ||
| Stock option shares and restricted stock units excluded (in shares) | 1,481 | 784 |
| Restricted stock units excluded | ||
| Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items] | ||
| Stock option shares and restricted stock units excluded (in shares) | 350 | 2 |