LOS ANGELES — “Transformers: Dark of the Moon” earned $116.4 million domestically over the four-day July Fourth weekend according to early studio estimates, giving the alien robot action film the biggest opening of the year.

The film is projected to beat the four-day record set by “Spider-Man 2,” which earned $115.8 million during the 2004 holiday weekend.

Cumulatively, “Dark of the Moon,” the third film in the “Transformers” franchise from Viacom Inc.’s Paramount Pictures and the first to be presented in 3D, has earned $181.1 million since officially premiering last Tuesday night. The sum is less than what its predecessor, 2009’s “Transformers: Revenge of the Fallen,” grossed during the same period.

Internationally, however, the Michael Bay-directed film did gangbusters, earning $217 million from 9,075 locations in 58 markets, making “Dark of the Moon” Paramount’s biggest international opening of all time. The previous record-holder was the $147 million opening of “Indiana Jones and the Kingdom of the Crystal Skull.”

“Dark of the Moon” was also the biggest opening of all-time in seven countries, including Korea, Hong Kong, and Malaysia, and 55 percent ahead of the opening weekend of “Revenge of the Fallen.”

As anticipated, young males made up the majority of the domestic audience, with market research showing that 62 percent of ticket buyers were male and 55 percent were under the age of 25.

The film also reversed the downward trend of audiences choosing not to see movies in 3D. While recent releases like “Cars 2″ and “Green Lantern” saw roughly 40 percent of their tickets sales come from 3D, “Dark of the Moon” did 60 percent of its business in 3D domestically and 70 percent internationally.

“In the US, there’s a situation where people need to be convinced that 3D is worth the premium,” said Paramount Vice Chairman Rob Moore in an interview Monday. “So the message we tried to get out about this movie, particularly at the end of the film’s marketing campaign, is that it was a much better experience in 3D.”