> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.firebolt.io/feedback

```json
{
  "path": "/reference-sql/functions-reference/numeric/tan",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

> Reference material for TAN function

# TAN

export const QueryWindow = ({content}) => {
  const {sql, result} = content;
  const [inited, setInited] = useState(false);
  const buttonRef = useRef(null);
  useEffect(() => {
    if (!inited && buttonRef.current) {
      runQuery(buttonRef.current, true);
      setInited(true);
    }
  }, []);
  return <div className="query-window">
      <div className="query-toolbar">
        <button className="run-button" onClick={ev => runQuery(ev.target)} ref={buttonRef}>Run Query</button>
        <span className="window-title">Interactive SQL Playground 🔥</span>
      </div>
      <div className="query-content">
        <pre><code className="firebolt-sql language-sql" contentEditable="true" spellCheck="false" data-original-query={sql}>{sql}</code></pre>
        <script type="application/json" className="fallback-result" style={{
    display: "none"
  }}>{JSON.stringify(result)}</script>
        <div className="server-unavailable-banner query-window-hidden">
          The Firebolt playground server is currently unavailable. Using precomputed query results.
        </div>
        <div className="query-results"></div>
      </div>
    </div>;
};

Trigonometric function that calculates the tangent of a specific value in radians.

## Syntax

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
TAN(<value>)
```

## Parameters

| Parameter | Description                                                | Supported input types |
| :-------- | :--------------------------------------------------------- | :-------------------- |
| `<value>` | The value that determines the returned tangent in radians. | `DOUBLE PRECISION`    |

## Return Type

`TAN` returns a value of type `DOUBLE PRECISION`.

## Example

The following query calculates the tangent of 1.57 radians. 1.57 is approximately pi/2:

<QueryWindow
  content={{
"sql": "SELECT TAN(1.57) as result;",
"result": {
"data": [
  [
    1255.7655915007897
  ]
],
"meta": [
  {
    "name": "result",
    "type": "double"
  }
],
"query": {
  "query_id": "64e201f0-a853-432c-bcc9-b014392e7c96",
  "query_label": null,
  "request_id": "2543d71f-793f-4d11-aa8e-3fb98e698462"
},
"rows": 1,
"statistics": {
  "bytes_read": 1,
  "elapsed": 0.007459,
  "rows_read": 1,
  "scanned_bytes_cache": 0,
  "scanned_bytes_storage": 0,
  "time_before_execution": 0.000237975,
  "time_to_execute": 8.2824e-05
}
}
}}
/>

The following query calculates the tangent of pi:

<QueryWindow
  content={{
"sql": "SELECT ROUND(TAN(PI()), 5) as result;",
"result": {
"data": [
  [
    0
  ]
],
"meta": [
  {
    "name": "result",
    "type": "double"
  }
],
"query": {
  "query_id": "3f5ed74d-ed11-4844-9638-b28c2313f1c8",
  "query_label": null,
  "request_id": "5570e7e3-ad3f-41bf-8855-7269b1e14acb"
},
"rows": 1,
"statistics": {
  "bytes_read": 1,
  "elapsed": 0.006683,
  "rows_read": 1,
  "scanned_bytes_cache": 0,
  "scanned_bytes_storage": 0,
  "time_before_execution": 0.000234465,
  "time_to_execute": 9.3636e-05
}
}
}}
/>
