State-funded Holyport College near Maidenhead, opened to pupils for the first time in September.
The Queen and the Duke of Edinburgh were given a tour of the school before unveiling a plaque watched by its 122 pupils, staff and parents.
Holyport College, sponsored by Eton College, accepts boarders and gives its pupils access to some of Eton's facilities.
During the visit, the royal couple met Sir Nicholas Winton, who lives near the school which has named its reception building after him.
Sir Nicholas, dubbed the "British Schindler", helped to save hundreds of children, mainly from Jewish families, from the Nazis by transporting them by train from Prague to the UK in 1939.
The wheelchair-bound 105-year-old said: "I think it's a wonderful honour to have the building named after me.
"I hope the school will make contact with a school in the Czech Republic that is also named after me."
Other guests included Home Secretary Theresa May, MP for Maidenhead.
The school was proposed in February 2012 and then approved by the Department for Education through the free schools programme in June 2012.
Once it reaches capacity, the school will have 500 pupils, including 225 boarders aged 11-19 years.
Parents pay £3,850 a term for boarders but daytime education is free.
Free schools, which anyone can apply to set up, are funded directly by central government and are free from local council control.

The non-native corn snake was spotted by a "shocked" council worker as he sorted through the rubble in a remote area off Mill Lane in Setchey, Norfolk.
It is now being cared for at the RSPCA's East Winch centre.
Manager Alison Charles said "abandoning" the snake was a "callous way to treat a pet".
Tim Borodka, who found the reptile on Friday, said: "It gave me quite a shock when I suddenly saw the snake slither away from me.
"I have come across lizards and wild grass snakes before, but nothing like this."
Ms Charles said the snake would have been unlikely to survive in the wild if Mr Borodka had not put it in a box and taken it to the King's Lynn rescue centre.
"The snake was found so far from any homes and amongst fly-tipped rubbish so it seems likely that it was abandoned."
Corn snakes are native to parts of North America and can grow up to 6ft (1.8m). The 3ft (0.9m) snake that slithered past Mr Borodka will eventually be rehomed at a specialist centre.
"We would encourage people who are thinking about taking on an exotic pet to research the needs of the particular species thoroughly and ensure they can meet them at all times," Ms Charles added.
Last year the RSPCA was called in to collect 807 exotic pet snakes. More than 450 of these were thought to be former pets that had either escaped or been deliberately dumped or released.
A free school in Berkshire has been officially opened by the Queen.
[NEXT_CONCEPT]
An exotic snake had a lucky escape after apparently being fly-tipped at the side of a road with a pile of kitchen cupboards.