How to turn on iterative calculation in Google Sheets with confidence

On this page
- Where the iterative setting lives
- What the three controls do
- A self-referencing formula you can copy
- Why a result can run one step behind
- When a loop is the wrong tool
- The same setting in Excel
- Habits that keep loops safe
- Action steps
- Frequently asked questions
- Where is iterative calculation in Google Sheets?
- What maximum number of iterations should I use?
- Why do I still see a circular dependency warning?
- Does Excel have the same feature?
- Can an AI tool write a self-referencing formula?
Learning how to turn on iterative calculation in Google Sheets takes under a minute. Using it well takes a little more care. The setting lets a formula refer to its own cell, so a sheet can remember a count, freeze a timestamp or settle on a stable answer. Switch it on without a plan, though, and an accidental circular reference can hide a real mistake.
Where the iterative setting lives
Open your spreadsheet, choose File, then Settings, then the Calculation tab. Here is how to turn on iterative calculation in Google Sheets: set iterative calculation to On, choose a maximum number of iterations, and save the settings. Google added these controls in 2016, and they cap how many times a calculation with a circular reference can run.
Until you switch the setting on, a formula that points at its own cell shows a circular dependency warning that sends you to this same page. That warning is useful. It tells you a loop exists, so you can decide whether you meant it.
What the three controls do
| Setting | What it does | When to use it |
|---|---|---|
| Iterative calculation | Lets a formula depend on its own result | Turn it on only in sheets that need a loop |
| Max number of iterations | Caps how many times the loop repeats per recalculation | Use 1 for counters, switches and timestamps |
| Threshold | Stops repeating once results change by less than this amount | Matters for formulas that settle on a value |
Pick one iteration for counters, switches and timestamps, because each recalculation should move the formula forward exactly one step. Ben Collins builds a working drawing game this way, and his Etch A Sheet walkthrough says the template needs iterative calculation on with a maximum of 1 iteration. A Google Docs Editors Community thread shows another sheet set to 1 iteration, a 0.05 threshold and recalculation on change. Higher limits suit formulas that converge, such as interest that depends on its own balance.

A self-referencing formula you can copy
The most practical use is a memory cell. Collins turns a checkbox into a button with three formulas. Here the checkbox sits in F30, and a named range called reset points to a second checkbox that clears everything.
// Cell V3 stores the last state of the checkbox
=IF(F30<>V3,F30,V3)
// Cell U3, named right, is TRUE only when F30 has just changed
=F30<>V3
// Cell W3 counts up while right is TRUE and resets to 0
=IF(reset,0,IF(right,W3+1,W3))
Cell V3 remembers the checkbox, so U3 can spot a change. The counter in W3 adds 1 while right is TRUE, and the reset checkbox sends it back to 0. For a simpler job, you can freeze a timestamp when someone types a task name in column A. Put this formula in B2:
=IF(A2<>"",IF(B2="",NOW(),B2),"")
While A2 is empty, B2 stays blank. Once A2 has text, B2 reads NOW() a single time and then keeps returning its own value, so the time stops changing. Clear A2 and the cell resets. Test it on a copy first, because every self-referencing formula depends on the iteration setting.
Why a result can run one step behind
Collins notes that the line in his template trails each button press by one step, and he leaves the fix as a challenge for readers. A formula that reads its own previous value will often show the old state for one pass, because it checks memory before it picks up the newest input. Routing the input through a helper cell, as V3 does above, is the first fix to try. Also keep looping cells in a small, labelled area, so ordinary formulas read from them and the loop does not ripple across the whole sheet.
When a loop is the wrong tool
Many loops are unnecessary. Finding the third hyphen in a text string looks like a job for repetition, yet in Excel 2024 and Excel 365 TEXTBEFORE with LEN finds the nth occurrence of a character in one formula. Exceljet adds that older versions of Excel can combine FIND and SUBSTITUTE for the same result. If a circular warning appears by accident, fix the reference instead, and our guide to common Google Sheets errors is a good place to start.
Before you switch iteration on, try these alternatives first:
- Rewrite the formula with algebra when the circle can be solved directly.
- Use Goal Seek or Solver in Excel when you need an input that hits a target number.
- Wrap any value that could run away in MIN and MAX to keep it in a sensible range.
- Move helper calculations into their own columns so each step is easy to trace.
The same setting in Excel
Excel has the same feature under a different path. Corporate Finance Institute's guide to imbalanced 3-statement models gives the shortcut Alt + F + T, then Formulas, then Enable Iterative Calculation. It also recommends labelling intentional circularities, such as interest income and expense, and using Trace Precedents or the Circular References tool to find accidental ones. Our walkthrough of tracing dependents in Excel shows how to read those arrows.
Habits that keep loops safe
Iterative calculation is a spreadsheet setting, so check it in every copy you make. Collins gives the same advice for his template: if it does not work, confirm the setting is on with one iteration. A copy with the setting off will show a circular warning instead of your result.
- Label each intentional loop with a note or a named range.
- Add a reset checkbox so you can return a counter to zero.
- Limit values with MIN and MAX when a loop adds or multiplies.
- Write the required settings in a note on the sheet for the next person.
Every self-referencing formula needs a way back to zero.
You now know how to turn on iterative calculation in Google Sheets and when to leave it off. If you would rather describe a formula than hand-write it, the formula creator in Formula Foundry can draft the syntax for you. Test the result on a copy before you rely on it.
Action steps
- Open the settings: Choose File, then Settings, then the Calculation tab in your spreadsheet.
- Turn it on: Set iterative calculation to On and choose a maximum number of iterations, using 1 for counters and timestamps.
- Build a memory cell: Write a formula that refers to its own cell, such as the timestamp formula in B2, and test it on a copy.
- Add a reset: Include a reset checkbox or condition so the loop can return to its starting value.
- Check every copy: Confirm the setting is on whenever you copy the sheet or share a template.
Frequently asked questions
Where is iterative calculation in Google Sheets?
Open File, then Settings, then the Calculation tab. There you can turn iterative calculation on and set the maximum number of iterations and the threshold.
What maximum number of iterations should I use?
Use 1 for counters, switches and timestamps so each recalculation advances the formula one step. Formulas that settle on a value may need a higher limit and a threshold.
Why do I still see a circular dependency warning?
The setting may be off in that copy of the spreadsheet, or the loop may be accidental. Check the Calculation tab first, then trace which cell refers back to itself.
Does Excel have the same feature?
Yes. Corporate Finance Institute gives the path Alt + F + T, then Formulas, then Enable Iterative Calculation.
Can an AI tool write a self-referencing formula?
It can draft one from a plain description, but you should test it on a copy with the right iteration settings before you rely on it.