The number **π** (/paɪ/; spelled out as "**pi**") is a mathematical constant. It is defined in Euclidean geometry[a] as the ratio of a circle's circumference to its diameter, and it also has various equivalent definitions. It appears in many formulas in all areas of mathematics and physics. It is approximately equal to 3.14159. The earliest known use of the Greek letter π to represent the ratio of a circle's circumference to its diameter was by Welsh mathematician William Jones in 1706.[1] It is also referred to as **Archimedes's constant**.[2][3][4]

Being an irrational number, π cannot be expressed as a common fraction, although fractions such as .mw-parser-output .sfrac{white-space:nowrap}.mw-parser-output .sfrac.tion,.mw-parser-output .sfrac .tion{display:inline-block;vertical-align:-0.5em;font-size:85%;text-align:center}.mw-parser-output .sfrac .num,.mw-parser-output .sfrac .den{display:block;line-height:1em;margin:0 0.1em}.mw-parser-output .sfrac .den{border-top:1px solid}.mw-parser-output .sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}22/7 are commonly used to approximate it. Equivalently, its decimal representation never ends and never settles into a permanently repeating pattern. Its decimal (or other base) digits appear to be randomly distributed, and are conjectured to satisfy a specific kind of statistical randomness.

It is known that π is a transcendental number:[3] it is not the root of any polynomial with rational coefficients. The transcendence of π implies that it is impossible to solve the ancient challenge of squaring the circle with a compass and straightedge.

Ancient civilizations, including the Egyptians and Babylonians, required fairly accurate approximations of π for practical computations. Around 250 BC, the Greek mathematician Archimedes created an algorithm to approximate π with arbitrary accuracy. In the 5th century AD, Chinese mathematics approximated π to seven digits, while Indian mathematics made a five-digit approximation, both using geometrical techniques. The first exact formula for π, based on infinite series, was discovered a millennium later, when in the 14th century the Madhava–Leibniz series was discovered in Indian mathematics.[5][6]

The invention of calculus soon led to the calculation of hundreds of digits of π, enough for all practical scientific computations. Nevertheless, in the 20th and 21st centuries, mathematicians and computer scientists have pursued new approaches that, when combined with increasing computational power, extended the decimal representation of π to many trillions of digits.[7][8] The primary motivation for these computations is as a test case to develop efficient algorithms to calculate numeric series, as well as the quest to break records.[9][10] The extensive calculations involved have also been used to test supercomputers and high-precision multiplication algorithms.