← All how-to recipes

How to calculate the difference from the previous row

✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)

Row-over-row change — daily deltas, meter readings, running comparisons.

The formula

AppFormulaNotes
Excel (desktop)=A3-A2Start beside the SECOND row and fill down. Percent change: =(A3-A2)/A2.
Google Sheets=A3-A2Identical.
LibreOffice Calc=A3-A2Identical.

How it works

The formula lives one row below the first value and references the row above with relative addresses, so filling down produces each row's delta: 145 − 120 = 25. Meter-style cumulative readings become per-period usage this way. Refinements: (A3-A2)/A2 for percent change (pair with the plus-sign format recipe for +/- display), IF(A2="","",A3-A2) to keep the column clean above gaps, and remember sorting breaks the meaning — deltas assume the rows are in order.

Verified, not just documented

We ran =A3-A2 in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 25 — exactly the expected result. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned 25 for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run desktop Excel.