FormulaCraft

LET

LET defines named variables inside a formula, assigning each name to a value or sub-expression and then using those names in a final calculation. This eliminates repeated sub-expressions for performance, makes complex formulas far more readable, and allows intermediate results to be reused multiple times without recalculation.

Excel
=LET(x,A2*B2,y,x*0.1,x+y)
Google Sheets
=LET(x,A2*B2,y,x*0.1,x+y)

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

How it works

  1. 1Plan your formula's intermediate values — for example, let 'subtotal' equal quantity times price, and 'tax' equal subtotal times 0.1.
  2. 2Enter =LET(subtotal,A2*B2,tax,subtotal*0.1,subtotal+tax) to compute the total in one readable formula.
  3. 3Add as many name-value pairs as needed before the final result argument; names can reference earlier names defined in the same LET.

Need a version for your data?

Try: “Calculate total price including tax without repeating the subtotal calculation

Related

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: