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

# 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
}
```
