Hello, and thank you for calling Costco Wholesale Corporation. I'm David Sherwood, a VP of Finance and Investor Relations, and I will review our sales results for the four-week retail month of May, which started on Monday, May 2nd, and ended on Sunday, May 29th. This period is compared to the four weeks that began last year on Monday, May 3rd, and ended on Sunday, May 30th. This call will include forward-looking statements within the meaning of the Private Securities Litigation Reform Act of 1995. These statements involve risks and uncertainties that may cause actual events, results, and/or performance to differ materially from those indicated by such statements. The risks and uncertainties include, but are not limited to, those outlined in today's call and sales release, as well as other risks identified from time to time in the company's public statements and reports filed with the SEC.
Forward-looking statements speak only as of the date they are made, and the company does not undertake to update them except as required by law. As reported in our release, net sales for May came in at $18.23 billion, an increase of 16.9% from $15.59 billion last year. Comparable sales were as follows. On a reported basis, the U.S. for the four weeks was at 17.5%. For 39 weeks, 16.0%. In Canada, the four weeks was at 17.4%. 39 weeks, 16.2%. Other international for the four weeks is at 2.6%. 39 weeks, 7.8%. Total company, the four weeks is at 15.5%. 39 weeks, 14.9%. E-commerce, the four weeks is at 6.3%. 39 weeks, 11.1%.
Comparable sales, excluding the impacts from changes in gasoline prices and foreign exchange, were as follows. In the U.S., the four weeks was at 10.7%. 39 weeks, 10.7%. Canada, the four weeks is at 19.5%. 39 weeks, 11.9%. Other International, the four weeks is at 10.1%. 39 weeks, 9.6%. Total Company, four weeks is 11.8%. 39 weeks, 10.7%. E-commerce for the four weeks is at 7.7%. In the 39 weeks, 11.1%. Our comp traffic or frequency for May was up 7.7% worldwide and 6.1% in the U.S. Foreign currencies year-over-year relative to the U.S. dollar negatively impacted total and comparable sales as follows.
Canada by approximately 7.2%, other international by approximately 10.6%, and total company by approximately 2.4%. Gasoline price inflation positively impacted total reported comp sales by approximately 6.2%. The average worldwide selling price per gallon was 49% higher versus last year. Worldwide, the average transaction was up 7.3%, which included the benefit from gasoline inflation and the negative impact from FX. In terms of regional merchandising categories, the general highlights were as follows. U.S. regions with the strongest comparable sales were Texas, the Midwest, and San Diego. Other international and local currencies, we saw the strongest results in Spain, Australia, and Mexico. Overall inflation in May was slightly higher than what we saw in April, primarily related to food and sundries.
Moving to the merchandise highlights, the following comparable sales results by category for the month exclude the impact of foreign exchange. Food and sundries were positive in the low double digits. Sundries, food, and cooler were the strongest departments. Fresh foods were up high single digits. Better performing departments included bakery and produce. Non-foods were positive low double digits. Better performing departments included toys and seasonal, automotive, and lawn and garden. Ancillary business sales were up low fifties. Gas and Food Court were the top performers. Looking ahead, the June sales reporting period began May 30th and ends July 3rd, compared to the five weeks that began last May 31st and ended July 4th, 2021. This year, June will have one extra selling day due to the shift in timing of the July 4th holiday. June sales will be announced Thursday, July 7th at 1:15 P.M. Pacific Time.
If you have any questions regarding our May sales results or any other investor relations questions, please call Bob Nelson at 425-313-8255, Josh Dahmen at 425-313-8254, or myself, David Sherwood, at 425-313-8239. This recording will be available until 5:00 P.M. Pacific Time, Thursday, June 9th. Thanks for calling, and have a great day.