An “extremely rare” leather-bound copy of Ada Lovelace’s pioneering computer program has been sold at auction for nearly £100,000.

First published in 1843, the book contains Lovelace’s translation of paper from the Italian mathematician LF Menabrea discussing Charles Babbage’s plans for a computing machine. It also includes her reflections as well as explanatory notes featuring a groundbreaking algorithm, considered by some experts to be the first computer program.

According to Moore Allen & Innocent auction house, there are only six known bound copies of the book Lovelace had printed of the article. The Moore Allen & Innocent copy of Sketch of the Analytical Engine Invented by Charles Babbage Esq by LF Menabrea of Turin, Officer of the Military Engineers, with Notes by the Translator, was expected to fetch £40,000 to £60,000, but was sold for £95,000 to a Cotswolds book dealer on behalf of an anonymous buyer.

The auctioneer, Philip Allwood, called it “the first separate edition of arguably the most important paper in the history of digital computing before modern times” and “an extremely rare piece”.

The copy is inscribed “Lady Lovelace” on the title page, just below the printed line “with Notes by the Translator”, with additional handwritten notes attributed to Lovelace’s friend Dr William King, who is believed to have been its original owner.

A rare copy of Menabrea’s Sketch, translated by Lovelace.

Lovelace, the daughter of Lord Byron, was born in 1815. She was a close friend of Babbage and was encouraged in her interest in maths by Mary Somerville and Augustus De Morgan.

“She’s written a program to calculate some rather complicated numbers – Bernoulli numbers,” said Ursula Martin, co-author of a recently published biography of Ada Lovelace and a professor of computer science at Oxford University. While Babbage never built his Analytical Engine, she continued, “This shows off what complicated things the computer could have done. She sets them out in a very clear and logical way. I like to think of her as the first computer scientist. She’s also thinking about broader abstract ideas than just the first program – she’s thinking about computing as something you could build theories of, and she’s thinking about what sort of things you can compute.”

Martin said a market had developed in Lovelace memorabilia, with “even a brief ‘sorry, I can’t come to tea’ letter from Lovelace rais[ing] several thousand”.

She added: “Recent scholarship, seeing past the naivety and misogyny of earlier work, has recognised that [Lovelace] was an able mathematician, and that her paper went beyond the ironmongery of Babbage’s never-built invention to give far reaching insights into the nature and potential of computation.”

Kate Pankhurst, a distant relative of Emmeline Pankhurst and author of the bestselling children’s book Fantastically Great Women Who Changed the World, agreed.

“Until recently, her story of mathematical excellence was a lesser known one,” Pankhurst said. “So it’s a thrill to see Ada’s remarkable work drawing such attention, especially at a time when there is a huge drive to encourage more girls to turn their brilliant minds to Stem subjects and careers.”

AN Devers, who is launching a rare book dealership focusing on works by or about women, The Second Shelf, in September, said the translation was “potentially worth much more than its final hammer price”, and that Lovelace had had to “gasp for acknowledgement” of her achievements.

Even today, said Devers, Lovelace’s credit as the world’s first computer programmer was “often argued against by mathematicians and scholars, even though there is primary source documentation of her keen ability and training with math, her correspondence with Babbage, and her own handwritten notes of her algorithm”.

Devers said The Second Shelf was “focused on the idea of women’s literary and historical contributions being under-recognised, and so even though Lovelace’s name is starting to be known, I see the road she must travel in her afterlife to be long and arduous and in need of support from historians and mathematicians who will not undermine her genius.”