| Consolidated Statements of Stockholders' Equity (Parenthetical) - $ / shares | 12 Months Ended | ||
|---|---|---|---|
| Jun. 30, 2020 | Jun. 30, 2019 | Jun. 30, 2018 | |
| Statement of Stockholders' Equity [Abstract] | |||
| Cash dividends declared (in dollars per share) | $ 3.30 | $ 3.00 | $ 2.52 | 
| X | ||||||||||
| 
- Definition Aggregate dividends declared during the period for each share of common stock outstanding. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- References No definition available. 
 |