By Sean Coughlan
BBC News education
School fund-raisers selling raffle tickets will be looking enviously at the donation from a former pupil to a school in Seattle in the United States.
Bill Gates has given $40m to his old school
Lakeside School is receiving $40m (£22.5m) from the charitable foundation of Bill Gates, the Microsoft founder, who left the school in 1973.
The money will fund scholarships to help poorer children attend the fee-paying school.
Mr Gates began his interest in computers while at the school.
Instead of the parent-teachers' association announcing the success of hot dog sales, and getting a cheer from the parents who had been applying themselves to the wine-in-a-box, the staff at Lakeside were able to announce this huge single donation.
The donation was announced at a parents' event at the school at the weekend.
"I can say without Lakeside there would be no Microsoft, and I'm here to say thank you," Mr Gates told parents.
Among his first commercial software programs was a timetable system for the school.
Maia Mulligan, spokeswoman for the Seattle school, told BBC News: "It's an incredibly generous gift - and also idealistic, giving access to the school to children from all across the city."
She said that Mr Gates had told parents that he had appreciated the way that the school had allowed him the space to follow his own interest in computers. Later in his education career, Mr Gates famously dropped out of Harvard University.
Last week, Mr Gates was named as holding first place in a rich list of tycoons in the United States - two places above Microsoft co-founder Paul Allen, who was also a pupil at Lakeside School. Mr Allen has previously given the school a donation of $20m (£11.3m).
The latest donation has been made through the Bill and Melinda Gates Foundation. In its first five years, the foundation has given almost $2.4bn (£1.35bn) in donations to education - including $1.2bn (£680m) in scholarships.
Foundation spokesperson, Greg Shaw, said the funding would allow Lakeside to take more low-income students - providing the financial support for students who had sufficient academic ability.
Lakeside School, which charges fees of about $20,000 (£11,300) per year, has average class sizes of 16, a ratio of one teacher for every nine pupils and an endowment of $56m (£32m). About a third of its pupils are from an ethnic minority.
As well as supporting scholarships, the funding will pay for a project in which pupils from the school spend time in developing countries.
This is intended to give pupils a broader perspective of the world - and the head of school, Bernie Noe said: "We are living in a global society. Americans have been called upon to understand and appreciate other peoples and cultures."