A letter Albert Einstein wrote to his son about his famous theory of relativity has been sold for $62,500 (£40,150) at a US auction featuring one of the largest collections of his personal writings.

The auction, which was held by a US dealer of antique documents, Profiles in History, on Thursday (11 June), fetched more than $420,000 in total (£269,800), far exceeding pre-sale estimates.

The subjects covered in the 27 personal letters are diverse – ranging from a letter the renowned physicist wrote to his son discussing the connection between his special theory of relativity and the atomic bomb, to the existence of God, the importance of geometry, and how a toy steam engine prompted a lifelong interest in science.

The letters were written in English and German, with some composed on a typewriter and others handwritten. They had been collected by a private collector over several decades.

"I have repeatedly said that in my opinion the idea of a personal God is a childlike one," he wrote to a man in the 1940s, who had corresponded with him twice on the subject. "You may call me an agnostic, but I do not share the crusading spirit of the professional atheist… I prefer an attitude of humility corresponding to the weakness of our intellectual understanding of nature and of our own being."

Joseph Maddalena, founder of Profiles in History, said, "We all know about what he accomplished, how he changed the world with the theory of relativity. But these letters show the other side of the story. How he advised his children, how he believed in God."

"These are certainly among the most important things I've ever handled," Maddalena said, adding that the seller of the items wishes to remain anonymous. "This is not like a Babe Ruth autograph or a signed photo of Marilyn Monroe. These are historically significant."

The letter were purchased by various individuals.