| Summary of assets and liabilities measured at fair value on a recurring basis |
The following table summarizes our financial assets that are measured at fair value on a recurring basis during the period: | | | | | | | | | | | | | | | | | | April 30, 2019 | (in thousands) | Amortized Cost | | Gross Unrealized Gains | | Gross Unrealized Losses | | Estimated Fair Value | Level 1: | | | | | | | | Cash equivalents | | | | | | | | Money market funds | $ | 91,330 |
| | $ | — |
| | $ | — |
| | $ | 91,330 |
| Level 2: | | | | | | | | Cash equivalents | | | | | | | | Commercial paper | 4,998 |
| | — |
| | — |
| | 4,998 |
| Available-for-sale securities | | | | | | | | Commercial paper | 62,695 |
| | 31 |
| | (8 | ) | | 62,718 |
| Corporate notes and bonds | 334,912 |
| | 582 |
| | (34 | ) | | 335,460 |
| U.S. Treasury securities | 232,152 |
| | 32 |
| | (15 | ) | | 232,169 |
| U.S. government agency securities | 69,977 |
| | 12 |
| | (5 | ) | | 69,984 |
| Level 2 total | 704,734 |
| | 657 |
| | (62 | ) | | 705,329 |
| Total | $ | 796,064 |
| | $ | 657 |
| | $ | (62 | ) | | $ | 796,659 |
| | | | | | | | | | January 31, 2019 | (in thousands) | Amortized Cost | | Gross Unrealized Gains | | Gross Unrealized Losses | | Estimated Fair Value | Level 1: | | | | | | | | Cash equivalents | | | | | | | | Money market funds | $ | 350,063 |
| | $ | — |
| | $ | — |
| | $ | 350,063 |
| Level 2: | | | | | | | | Cash equivalents | | | | | | | | Commercial paper | 76,828 |
| | — |
| | (11 | ) | | 76,817 |
| Corporate notes and bonds | 2,998 |
| | — |
| | — |
| | 2,998 |
| U.S. government agency securities | 6,491 |
| | — |
| | — |
| | 6,491 |
| Available-for-sale securities | | | | | | | | Commercial paper | 86,655 |
| | 4 |
| | (21 | ) | | 86,638 |
| Corporate notes and bonds | 287,496 |
| | 389 |
| | (105 | ) | | 287,780 |
| U.S. Treasury securities | 4,982 |
| | — |
| | (1 | ) | | 4,981 |
| U.S. government agency securities | 36,021 |
| | 7 |
| | (4 | ) | | 36,024 |
| Level 2 total | 501,471 |
| | 400 |
| | (142 | ) | | 501,729 |
| Total | $ | 851,534 |
| | $ | 400 |
| | $ | (142 | ) | | $ | 851,792 |
|
|
| Fair value of available-for-sale marketable securities by remaining contractual maturities |
The fair value of our available-for-sale marketable securities as of April 30, 2019, by remaining contractual maturities, were as follows (in thousands): | | | | | Due in one year or less | $ | 515,648 |
| Due in one to two years | 184,683 |
| | $ | 700,331 |
|
|