# sin

> 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: sin
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
latest-redpanda-tag: v26.1.9
docname: sql/sql-functions/math-functions/sin
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/sin.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/reference/pages/sql/sql-functions/math-functions/sin.adoc
description: "`sin()` is a numeric function that returns the trigonometric sine value of a specified angle in radians."
page-topic-type: reference
page-git-created-date: "2026-05-26"
page-git-modified-date: "2026-05-26"
---

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

`sin()` is a numeric function that returns the trigonometric sine value of a specified angle in radians.

## [](#syntax)Syntax

The syntax of the `sin()` function is:

```sql
SIN (x)
```

The `sin()` function requires one argument:

`x`: A positive or a negative angle (or an expression that evaluates to an angle).

## [](#examples)Examples

### [](#sine-a-positive-value)Sine a positive value

This example uses the `sin()` function with a positive angle as the argument.

```sql
SELECT SIN(5);
```

This returns the sine value of 5.

```sql
+-----------------------+
| f                     |
+-----------------------+
| -0.9589242746631385   |
+-----------------------+
```

### [](#sine-a-negative-value)Sine a negative value

This example shows the `sin()` function with a negative angle as the argument:

```sql
SELECT SIN(-3);
```

The query returns:

```sql
+----------------------+
| f                    |
+----------------------+
| -0.1411200080598672  |
+----------------------+
```

### [](#sine-a-fraction-value)Sine a fraction value

This example shows the `sin()` function with a fractional value as the argument:

```sql
SELECT SIN(5.8732);
```

The query returns:

```sql
+----------------------+
| f                    |
+----------------------+
| -0.3985959081271079  |
+----------------------+
```

### [](#sine-with-an-expression)Sine with an expression

The `sin()` function can also include an expression:

```sql
SELECT sin(8.5 * 2.3);
```

The query returns:

```sql
+-----------------------+
| f                     |
+-----------------------+
| 0.6445566903363104    |
+-----------------------+
```

### [](#use-the-sin-function-with-a-table)Use the `sin()` function with a table

This example combines the `sin()` function with a `CREATE TABLE` statement to obtain the sine values of a specific column:

1.  Create a new table named **sineTable** containing the **initialValue** column. Input some values with the negative and positive angles into the column.

    ```sql
    CREATE TABLE sineTable(initialValue int);
    INSERT INTO sineTable(initialValue)
    VALUES (-5),(18), (0),(-27);
    ```

2.  Run this query to get the sine value output:

    ```sql
    SELECT * ,SIN(initialValue) AS sinValue FROM sineTable;
    ```

3.  The final result will have the **initialValue** column with the source value and the **sinValue** column with their calculated sine values.

    ```sql
    +---------------+-------------------------------+
    | initialvalue  | sinvalue                      |
    +---------------+-------------------------------+
    | -5            | 0.9589242746631385            |
    | 18            | -0.7509872467716762           |
    | 0             | 0                             |
    | -27           | -0.956375928404503            |
    +---------------+-------------------------------+
    ```