The value of the number pi has been calculated to a new world record length of 31 trillion digits, far past the previous record of 22 trillion.

Emma Haruka Iwao, a Google employee from Japan, found the new digits with the help of the company’s cloud computing service.

Pi is the number you get when you divide a circle’s circumference by its diameter.

The first digits, 3.14, are well known but the number is infinitely long.

Extending the known sequence of digits in pi is very difficult because the number follows no set pattern.

Pi is used in engineering, physics, supercomputing and space exploration – because its value can be used in calculations for waves, circles and cylinders.

The pursuit of longer versions of pi is a long-standing pastime among mathematicians. And Ms Iwao said she had been fascinated by the number since she had been a child.

The calculation required 170TB of data (for comparison, 200,000 music tracks take up 1TB) and took 25 virtual machines 121 days to complete.

- US beats China in supercomputer list
- The race to make the world’s most powerful computer ever
- Coding the future: What will the future of computing look like?

“I feel very surprised,” Ms Iwao, who has worked at Google for the past three years, said of her achievement.

“I am still trying to adjust to the reality. The world record has been really hard.”

But she still hopes to expand on her work.

“There is no end with pi, I would love to try with more digits,” she told BBC News.

It would take 332,064 years to say the 31.4 trillion digit number.

Google announced the news in a blog on Pi Day (14 March – “3.14” in American date notation).

Nasa has previously published a list of some of the ways in which it uses pi. These include:

- calculating the size of a parachute required to send a rover down on to the surface of Mars
- working out how many rectangular camera images will be needed to map the surface of a planet
- getting spacecraft to brake at just the right time to enter orbit around planets

“Pi is useful not only for measuring circles but it also appears in calculations for everything from the period of a pendulum to the buckling force of a beam,” said mathematician Matt Parker.

“Modern maths, physics, engineering and technology could not function without pi.”

In 2010, Nicholas Sze used Yahoo cloud computing to calculate that the two quadrillionth digit of Pi was zero – a calculation that would have taken 500 years on a standard computer at that time.

However, he did not calculate all the digits in between.