# LAMBDA function in Excel

> LAMBDA creates your own function from a formula: name the inputs, then write the calculation, as in LAMBDA(price, rate, price*(1+rate)).

Source: https://spreadsheetpractice.com/functions/lambda · Updated October 28, 2026 · Formulas and results on this page were run by the Spreadsheet Practice formula engine on October 30, 2026

## Quick answer

- **What it does:** LAMBDA creates your own function from a formula: name the inputs, then write the calculation, as in LAMBDA(price, rate, price*(1+rate)).
- **Syntax:** `=LAMBDA([parameter1], [parameter2], ..., calculation)`
- **Most common use:** `=LAMBDA(p,r,p*(1+r))(A2,B2)` returns $86.40 (Defined and called in one formula)
- **Available in:** Excel 2024 and Microsoft 365
- **Category:** [Dynamic array functions](https://spreadsheetpractice.com/functions/category/dynamic-arrays)
- **Returns:** A function. On its own in a cell it shows #CALC!; called with values, it returns the calculation's result.
- **Google Sheets:** Available in Google Sheets, where saved ones are called named functions.

## What it does

LAMBDA creates your own function from a formula: name the inputs, then write the calculation, as in LAMBDA(price, rate, price*(1+rate)). Call it at once with values in parentheses after it, give it a name with LET or the Name Manager, or pass it to MAP, BYROW, REDUCE and the other helpers that run it on every row or value.

## Syntax

`=LAMBDA([parameter1], [parameter2], ..., calculation)`

| Argument | Required? | What it is |
|---|---|---|
| `parameter1` | Optional | A name for the first input, such as price. Avoid names that look like cell addresses, such as A1. |
| `parameter2` | Optional | Optional: names for more inputs. |
| `calculation` | Required | The formula that uses the inputs. Its result is the function's result. |

## Examples

Each result was calculated by running the formula on the sample sheet.

| Cell | Formula | Result | What it shows |
|---|---|---|---|
| C2 | `=LAMBDA(p,r,p*(1+r))(A2,B2)` | $86.40 | Defined and called in one formula |
| C3 | `=LET(withTax,LAMBDA(p,r,p*(1+r)),withTax(A3,B3))` | $132.81 | Named with LET, then called by name |
| C4 | `=MAP(A2:A3,B2:B3,LAMBDA(p,r,ROUND(p*(1+r),2)))` | $86.40 (spills 2 × 1) | Passed to MAP to run on every row |

### The sample sheet

Every formula above runs on this data:

|  | A | B | C |
|---|---|---|---|
| 1 | Price | Tax rate | Result |
| 2 | $80.00 | 8% | $86.40 |
| 3 | $125.00 | 6.25% | $132.81 |
| 4 |  |  | $86.40 |
| 5 |  |  | $132.81 |

## Common mistakes

| What you see | Why, and how to fix it |
|---|---|
| #CALC! in the cell | A LAMBDA on its own is a function, not a value. Call it with values after it: =LAMBDA(x,x*2)(A2). |
| #VALUE! | You passed more or fewer values than the LAMBDA has inputs. |
| #NAME? | An input name looks like a cell address, such as TAX1, or is spelled differently in the calculation. |

## Tips

- In Excel, save a LAMBDA in Formulas > Name Manager with a name such as ADDTAX, and use =ADDTAX(A2,B2) anywhere in the workbook.

## Related functions

- [LET](https://spreadsheetpractice.com/functions/let): LET gives names to values or calculations inside a single formula, then uses those names in a final calculation.
- [MAP](https://spreadsheetpractice.com/functions/map): MAP runs a LAMBDA on each value of an array, or on matching values from several arrays, and returns an array of the same size.
- [BYROW](https://spreadsheetpractice.com/functions/byrow): BYROW runs a LAMBDA on each row of a range and returns one result per row, all from one spilling formula.

## Questions

### What is LAMBDA in Excel?

A way to define your own function with a formula. LAMBDA(x, x*2) is a function that doubles its input.

### How do I reuse a LAMBDA?

Name it in the Name Manager in Excel or as a named function in Google Sheets, or name it with LET inside one formula.

## Practice

A graded LAMBDA exercise ("Your own discount function") is on [the LAMBDA page](https://spreadsheetpractice.com/functions/lambda). It is checked instantly, then re-checked on changed data.

---

Spreadsheet Practice (https://spreadsheetpractice.com) teaches spreadsheet formulas by practice: every exercise is graded in a live grid and re-checked on changed data.
