Unfortunately, there is no super quick way.
You could make a request under the Privacy Act/Freedom of Information Act to obtain your records from Customs and Border Protection. The relevant webpage for CBP records specifically lists "Information Regarding Entry and Exit" and "Passenger Name Record (PNR) (Travel Industry Reservation Data)" as types of records you can request. This should give you what you're looking for (though note that some exits through the Mexican or Canadian land borders may not always be recorded, so you'll need to fill in the gaps for any such trips). Note that CBP has a significant records request backlog, to the extent that they've been sued for failure to respond to many such requests. It looks like they've managed to reduce the backlog since then, but I would not count on a rapid response.
If CBP can't respond quickly enough, you might be able to reconstruct this information from the airlines. If you stick with one airline (or one alliance), your frequent flyer account will show you the all flights you've taken, and you can usually access your statements online. With multiple airlines, you'll need to check the statements for each one. You could also gather information from your email account (confirmations of flight ticket purchases), credit card statements (purchases in various countries), discarded boarding passes in the bottom of your bag, crumpled up receipts in your wallet, etc...
One note for future readers is that that non-citizens maywho were in the US as non-immigrant visitors might, depending on the details of their status and other particulars, be able to get this information from the I-94 website.
Many expats who may be close to physical presence thresholds for tax purposes will keep their own records and retain evidence from the airlines to make this process easier. If you might be in a similar situation in the future, it's probably a good idea to start your own log.