Just in time for Pi Day, a new world record has been set for calculating the ratio of a circle's circumference to its diameter.

On Thursday, Google revealed that developer advocate Emma Haruka Iwao, with the help of the tech giant's cloud platform, calculated pi to 31.4 trillion decimal places, beating the previous record by nearly 9 trillion digits.

To do this, Iwao's team used a program called ycruncher capable of computing pi to trillions of digits powered by 25 virtual machines run through Google Cloud's Compute Engine.

"The biggest challenge with pi is that it requires a lot of storage and memory to calculate," said Iwao, who has worked with the company for nearly four years, in a blog posted published Thursday by Google.

The calculation required 170 terabytes of data, about the same amount of data as the entire Library of Congress print collection, Google said.

Emma Haruka Iwao, a developer advocate with Google, set a world record for the longest calculation of Pi, reaching more than 31 trillion decimal places.(Photo: Google)

After about fourth months of calculating, Iwao arrived at the record-breaking result.

"The world of math and sciences is full of records just waiting to be broken," Iwao wrote in a separate Google post. "We had a great time calculating 31.4 trillion π digits, and look forward to sinking our teeth into other great challenges."

Posted!

A link has been posted to your Facebook feed.

Lightning strikes in the sky over the beach of Santa Ponsa, in Mallorca, Spain on Sept. 14, 2019. The State Meteorological Agency (Aemet) forecasted for the day heavy and persistent rainfall and storms in the center, south and east of Spain. Cati Cladera, EPA-EFE

A model presents a creation from the Fyodor Golan catwalk show for the Spring/Summer 2020 collection, on the second day of London Fashion Week in London on Sept. 14, 2019. Tolga Akmen, AFP/Getty Images

Demonstrators on bicycles are pictured on their way over the A 648 motorway to protest against the Frankfurt motor show IAA 2019, in Frankfurt am Main Germany, on September 14, 2019. Frankfurt's biennial International Auto Show (IAA) opened its doors to the public on Sept. 12, 2019, but major foreign carmakers are staying away while climate demonstrators march outside forming a microcosm of the under-pressure industry's woes. Daniel Roland, AFP/Getty Images

Police detain a man after fights broke out between pro-China supporters and anti-government protesters outside the Amoy Plaza in the Kowloon Bay district in Hong Kong, Saturday, Sept. 14, 2019. Skirmishes broke out Saturday at a shopping mall in Hong Kong between supporters of the ongoing protests for democratic reforms in the semiautonomous Chinese territory and people backing the central government in Beijing. Kin Cheung, AP

The casket of former president Robert Mugabe is escorted by military officers as it departs after a state funeral at the National Sports Stadium in Harare, Zimbabwe, Saturday, Sept. 14, 2019. African heads of state and envoys gathered to attend a state funeral for Zimbabwe's founding president, Robert Mugabe, whose burial has been delayed for at least a month until a special mausoleum can be built for his remains. Themba Hadebe, AP

Cambodian Buddhist monks enjoy their lunch during the start of Pchum Ben festival at a pagoda in Phnom Penh, Cambodia on Sept. 14, 2019. Phum Ben, a 15-day Buddhist festival to commemorate past ancestors, this year will run from September 14 to 28, 2019. Mak Remissa, EPA-EFE