# pi

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

---
title: pi
latest-operator-version: v26.2.4
latest-console-tag: v3.12.0
latest-connect-version: 4.113.1
latest-redpanda-tag: v26.2.4
docname: sql/sql-functions/math-functions/pi
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: sql/sql-functions/math-functions/pi.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/reference/pages/sql/sql-functions/math-functions/pi.adoc
description: The `pi()` function returns the mathematical constant pi.
page-topic-type: reference
page-git-created-date: "2026-09-08"
page-git-modified-date: "2026-09-08"
---

<!-- Source: https://docs.redpanda.com/cloud-data-platform/reference/sql/sql-functions/math-functions/pi.md -->

The `pi()` function returns the mathematical constant pi (π).

## [](#syntax)Syntax

```sql
PI()
```

The `pi()` function takes no arguments.

## [](#return-type)Return type

`double precision`

## [](#examples)Examples

### [](#basic-usage)Basic usage

```sql
SELECT PI();
```

```sql
        pi
-------------------
 3.141592653589793
(1 row)
```

### [](#use-pi-in-an-expression)Use pi() in an expression

This example uses `pi()` to convert an angle in radians to degrees:

```sql
SELECT DEGREES(PI());
```

```sql
 degrees
---------
     180
(1 row)
```