---
schema_version: "1"
id: f49cc887e1c3b37ed869e3b6494bca20d9ba04024c996aec7b9209a20fb17e2a
title: ln({n})
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi_dev_guide_sql/guides/bi-sql-math-ln.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-sql/guide/bi-sql-math-ln.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 95036605b6720c369f3dd8f3a58d1552307d9a137184d107901680eee38e6758
products:
  - SQL for Analytics Developer Guide
  - analytics
---

# ln({n})

Returns the base e (Euler's number) logarithm of a number _n_. The value _n_ can be any positive, non-zero numeric value in the range 0 \< _n_ \<= 1.797e308.

`ln({n})` takes the following syntax.

```nolang
SELECT ln(NUMERICVALUE) as ALIASNAME
FROM DATASET;
```

## Example

This example returns the base e logarithm for the number 8.

```nolang
SELECT ln(8.0) as LnExample FROM Superstore
LIMIT 1;
```

| LnExample |
| --------- |
| 2.079     |
