﻿---
title: ES|QL TAN function
description: 
url: https://www.elastic.co/elastic/docs-builder/docs/2830/reference/query-languages/esql/functions-operators/math-functions/tan
products:
  - Elasticsearch
---

# ES|QL TAN function
## Syntax

![Embedded](https://www.elastic.co/elastic/docs-builder/docs/2830/reference/query-languages/esql/images/functions/tan.svg)


## Parameters

<definitions>
  <definition term="angle">
    An angle, in radians. If `null`, the function returns `null`.
  </definition>
</definitions>


## Description

Returns the [tangent](https://en.wikipedia.org/wiki/Sine_and_cosine) of an angle.

## Supported types


| angle         | result |
|---------------|--------|
| double        | double |
| integer       | double |
| long          | double |
| unsigned_long | double |


## Example

```esql
ROW a=1.8
| EVAL tan=TAN(a)
```


| a:double | tan:double         |
|----------|--------------------|
| 1.8      | -4.286261674628062 |