The number **π** (/paɪ/) is a mathematical constant. It is defined 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. It has been represented by the Greek letter "π" since the mid-18th century, and is spelled out as "**pi**". It is also referred to as **Archimedes' constant**.

Being an irrational number, π cannot be expressed as a common fraction, although fractions such as 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: 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 to π 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.[1][2] 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.[3][4] 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.[5][6] The extensive calculations involved have also been used to test supercomputers and high-precision multiplication algorithms.

Because its most elementary definition relates to the circle, π is found in many formulae in trigonometry and geometry, especially those concerning circles, ellipses, and spheres. In more modern mathematical analysis, the number is instead defined using the spectral properties of the real number system, as an eigenvalue or a period, without any reference to geometry. It appears therefore in areas of mathematics and the sciences having little to do with the geometry of circles, such as number theory and statistics, as well as in almost all areas of physics. The ubiquity of π makes it one of the most widely known mathematical constants both inside and outside the scientific community. Several books devoted to π have been published, and record-setting calculations of the digits of π often result in news headlines. Adepts have succeeded in memorizing the value of π to over 70,000 digits.