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

# 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><p>A <code>Number</code> value that serves as input to the function.</p></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
}
```
