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

# log10

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

## log10(a: Number): Number | NaN

Returns the logarithm base 10 of a number.

_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>a</code></p></td><td><div><div><p>A <code>Number</code> value that serves as input to the function.</p></div></div></td></tr></tbody></table>

### Example

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

#### Source

```DataWeave
%dw 2.0
import * from dw::util::Math
output application/json
---
{
  "log1010": log10(10),
  "log1013": log10(0.13),
  "log10-20": log10(-20)
}
```

#### Output

```Json
{
   "log1010": 1.0,
   "log1013": -0.8860566476931632,
   "log10-20": null
}
```
