The animated sequel was followed by the sci-fi flick "Prometheus" with $20.2 million and the musical "Rock of Ages" with Tom Cruise, which was third with $15 million.
"Snow White and the Huntsman," starring Charlize Theron, fell to No. 4 with $13.8 million.
"That's My Boy" was fifth with $13 million and "Men in Black 3," starring Will Smith, earned $ 10 million for sixth place.
All studio estimates of gross box office receipts are via Box Office Mojo.
"Marvel's The Avengers" was No. 7 with $8.84 million; "The Best Exotic Marigold Hotel" eighth with $2.2 million; and "Moonrise Kingdom" was ninth with $2.18 million.
"What to Expect When You're Expecting" rounded out the top films with $1.33 million.
"Battleship" and "The Dictator" dropped out of the Top 10.
Gal Gadot cast as Wonder Woman for 'Batman vs. Superman'
Jordana Brewster on Paul Walker: 'He was an enormous presence in my life'