A “boys’ weekend” of golf with Tiger Woods in 2013 was fun for President Obama, but it was a triple-bogey for taxpayers.

The Government Accountability Office reported Wednesday that the departments of Defense and Homeland Security spent more than $3.6 million in travel costs and other expenses for Mr. Obama’s getaway weekend with Mr. Woods and other golf partners at an exclusive resort in Florida.

The audit said the costs included operation of Air Force One, at about $200,000 per hour of flight, plus a virtual squadron of “supporting aircraft and U.S. Coast Guard small boats,” as well as per diem and other travel expenses for an unspecified number of Pentagon and Homeland Security personnel required to support the president’s golf weekend.

The military transport aircraft needed for the golfing weekend included a $200 million C-17 Globemaster and the C-5 Super Galaxy, which departed from various U.S. Air Force bases and arrived at Joint Base Andrews or Marine Corps Base Quantico “to transport Secret Service personnel and vehicles and Marine Corps personnel and helicopters to support the trip before returning to their air bases of origin,” the report said.

In all, Mr. Obama’s four-day excursion required six additional military transport planes flying eight missions with at least 22 total flight legs, involving 14 commercial airports and Air Force bases ranging from Joint Base McGuire in New Jersey to Dyess Air Force Base in Texas.

The Pentagon spent at least $2.8 million, and the Homeland Security Department spent another $767,000, which included about $180,000 for the Secret Service.

The long President’s Day weekend began with Mr. Obama traveling from Washington to Chicago on Friday, Feb. 15, 2013, to give a speech on building a stronger middle class.

It was a follow-up to his State of the Union address earlier in the week.

From Chicago, Mr. Obama flew on Air Force One to the airport in West Palm Beach, Florida — near Donald Trump’s estate — and was driven about an hour to coastal Palm City, location of the gated and luxurious Floridian Yacht and Golf Club. There he played golf with Mr. Woods and reportedly got lessons from the golfer’s legendary coach at the time, Butch Harmon.

During the same weekend, first lady Michelle Obama and daughters Malia and Sasha were on a ski trip to Aspen, Colorado.

The golf resort where the president played is owned by Jim Crane, a businessman who also owns Major League Baseball’s Houston Astros. The private club on the St. Lucie River includes eight cottages, a 68-slip deep-water marina, the club’s 61-foot yacht and a private helicopter service with two helipads.

The Coast Guard spent about $586,000 to provide support for the president’s trip.

“Specifically, this trip included the use of the RB-S boat and HH-65 Dolphin helicopter [a MedEvac-capable search and rescue helicopter] to provide support in waterways,” the GAO said.

As for the Pentagon’s expenses that weekend, the GAO said, “According to White House officials, to be able to communicate instantly with the U.S. military, the President flies on military aircraft whenever he travels — whether for official, political, or other non-official reasons.”

The performance audit, which took about 20 months to complete, was requested by Sen. John Barrasso, Wyoming Republican. The report said the true costs of the president’s golf weekend cannot be known because some of the Pentagon’s expenses are classified.

Mr. Barrasso noted that the golf outing took place as the administration and Congress were imposing automatic spending caps.

“At a time when the government was tightening its belt to prepare for sequestration, President Obama had such little disregard for the taxpayer that he spent millions of dollars to play golf with Tiger Woods,” Mr. Barrasso said. “This arrogance is par for the course for the Obama administration.”

The total also doesn’t include “the salaries and benefits of U.S. government civilian and military personnel traveling with the president or involved with agency travel preparations, since these personnel would have received their salaries and benefits for the conduct of their regular duties and responsibilities regardless of whether the president traveled.”

The president flew back to Washington on Monday, Feb. 18.

Mr. Obama has played more than 300 rounds of golf during his presidency, the vast majority of them on courses in the immediate Washington area.