# Ln

## Y ## What is the Power Fx LN Function?

The Power Fx LN function is used to calculate the natural logarithm of a number. The natural logarithm is the logarithm to the base of the mathematical constant e (approximately 2.71828). In other words, the natural logarithm of a number x is the value of y that satisfies the equation e^y = x. The Power Fx LN function takes a single argument, which is the number for which you want to calculate the natural logarithm.

## Syntax

The syntax for the Power Fx LN function is as follows:

``` Ln(number) ```

Where `number` is the number for which you want to calculate the natural logarithm.

## Example

Let’s say you want to calculate the natural logarithm of the number 10. You can do this using the following formula:

``` Ln(10) ```

This will return the value 2.302585092994046, which is the natural logarithm of 10.

## Using the Power Fx LN Function in Power Apps

Now that you understand what the Power Fx LN function is and how it works, let’s take a look at how you can use it in your Power Apps.

Suppose you have a text input control in your app where the user can enter a number. You want to display the natural logarithm of this number in a label control. To do this, you would set the Text property of the label control to the following formula:

``` Text(Ln(Value(TextInput1.Text)), "0.000") ```

Here, `TextInput1` is the name of the text input control, and `”0.000″` is the format specifier that specifies the number of decimal places to display.

When the user enters a number in the text input control, the label control will display the natural logarithm of that number.

The Power Fx LN function is a useful tool for working with logarithmic functions in Power Apps. By understanding how this function works and how to use it in your apps, you can create more powerful and versatile apps that meet your business needs.