I suppose it depends on how you look at "size":

The largest palace in the world is Istana Nurul Iman (Brunei) with 1,788 rooms, and 2,152,782 square feet or 200,000 square meters

Buckingham Palace has 775 rooms, and 828,818 square feet or 77,000 square meters.

The Royal Palace of Madrid has 2,800 rooms, and 1,453,122 square feet or 135,000 square meters.

The Stockholm Palace has 609 rooms, but sadly I can't locate its interior footage / meter size. Like Madrid's palace, Stockholm has many more floors (7 I believe), than Buckingham Palace.