---
schema_version: "1"
id: ed07125c132401cd31508d34f40a4be0356a2149f3c151c85e62affed2af9175
title: tan
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.12/dw-math-functions-tan.md
canonical_url: https://docs.mulesoft.com/dataweave/2.12/dw-math-functions-tan
source_site: docs.mulesoft.com
content_type: documentation
content_hash: c6d5d8af1a20075f3038cc6c98580d7fe708c3570471afd2fec740004062c78e
description: MuleSoft Documentation Site
release: "2.12"
latest: false
---
---
product: DataWeave
version: 2.12
---

# tan

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

## tan(angle: Number): Number

Returns the trigonometric tangent of an angle from a given number of radians.

_Introduced in DataWeave version 2.4.0._

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>angle</code></p></td><td><div><div><p>Number of radians in an angle.</p></div></div></td></tr></tbody></table>

### Example

This example shows how `tan` behaves with different inputs.

#### Source

```DataWeave
%dw 2.0
import * from dw::util::Math
output application/json
---
{
   "tan0": tan(0),
   "tan13": tan(0.13),
   "tan-1": tan(-1)
}
```

#### Output

```Json
{
   "tan0": 0.0,
   "tan13": 0.13073731800446006,
   "tan-1": -1.5574077246549023
 }
```
