> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# LOG10

> Returns the base-ten logarithm of a number.

<div className="e6-meta"><span className="e6-eyebrow e6-eyebrow--quiet">Scalar function</span></div>

Returns NULL when an argument is NULL.

## Syntax

### Scalar

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
log10(value)
```

## Arguments

| Name | Type | Required | Description |
| - | - | - | - |
| value | TINYINT, SMALLINT, INTEGER, BIGINT, FLOAT, DOUBLE or DECIMAL(p, s) | Yes | The number to evaluate. For DECIMAL(p, s), p is precision (total digits) and s is scale (digits after the decimal point). |

## Returns

* Type: DOUBLE; FLOAT when the input is evaluated as FLOAT
* Possible values: Real logarithms for positive input; negative infinity at zero and NaN for negative input.
* NULL behavior: Returns NULL when an argument is NULL.

## Properties

| Property | Value |
| - | - |
| Deterministic | Yes |
| Supports window usage | No |
| Exact result | No |

* Approximation bound: No fixed maximum error is guaranteed.

## Usage notes

* Numeric inputs are normally converted to DOUBLE for calculation. An input evaluated as FLOAT keeps FLOAT precision.
* INTEGER and INT mean the same type; STRING means VARCHAR text. NULL can be used with a supported type. Cast NULL explicitly when its type would otherwise be unclear.
* Exact result: Floating-point computation can round the mathematical result.

## Examples

### Value and NULL input

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT log10(CAST(1 AS DOUBLE)) AS "value", log10(CAST(NULL AS DOUBLE)) AS null_value;
```

| value | null\_value |
| - | - |
| 0 | NULL |

### Values below and above one

Results are rounded to six decimal places for display.

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT round(log10(CAST(0.01 AS DOUBLE)), 6) AS below_one, round(log10(CAST(100 AS DOUBLE)), 6) AS above_one;
```

| below\_one | above\_one |
| - | - |
| -2 | 2 |

## Limitations

* Zero returns negative infinity; negative input returns NaN.
* The result is FLOAT when the input is evaluated as FLOAT, and DOUBLE after other numeric conversions. Query tools may report the original input type instead; this does not convert the result back to INTEGER or DECIMAL.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.