LibreOffice Calc · References and calculation · Intermediate
Control recalculation and diagnose circular references
Control recalculation and diagnose circular references. A controlled example with expected outcomes, changed-input checks and recovery.
Documentary author review; no native application testing claimed · Editorial standards
A stale result and a circular reference are different problems. Use Calc’s calculation controls to refresh a valid model; repair a circular dependency instead of enabling iteration merely to hide it.
Establish a control model
This procedure uses LibreOffice Calc 26.2 desktop, English standard menus, on Windows or Linux. It is documentation-based, with independently checked arithmetic rather than a native application test. Work in a disposable ODS file and record your original calculation settings before changing anything.
Enter Units in A1, Price in A2, and Revenue in A3. Enter 4 in B1, 25 in B2, and =B1*B2 in B3. The expected revenue is 100. A separate control in D1 containing =4*25 should also show 100, but unlike B3 it should not change when B1 changes.
Choose Data > Calculate and inspect AutoCalculate. For normal interactive work, keep automatic calculation enabled. Change B1 to 6. B3 should become 150; D1 should remain 100. If B3 does not move, inspect its formula before assuming that the calculation engine is at fault. Text that merely looks like a formula or a pasted value cannot recalculate.
Make manual recalculation deliberate
- In this practice file, turn AutoCalculate off if you want to demonstrate manual mode.
- Change B1 from 6 to 8. A displayed result may now be stale; do not treat it as a new answer.
- Choose Data > Calculate > Recalculate, or press F9. B3 should become 200.
- For a complete recalculation, choose Data > Calculate > Recalculate Hard, or press Ctrl+Shift+F9. This forces all formulas to be recalculated, including non-volatile and add-in functions described in the guide.
- Restore AutoCalculate and change B2 to 30. B3 should become 240 immediately.
A hard recalculation cannot fetch an inaccessible external source, repair a wrong reference, or convert a text string into the intended numeric formula. If the fresh result is still wrong, inspect the model. Detective helps follow dependencies without guessing which input matters.
Introduce and remove a circular dependency
In a separate unused pair of cells, enter =F2+1 in F1 and =F1+1 in F2. Each formula requires the other’s result before it can finish. These equations also have no finite solution: substituting one into the other would require F1 to equal F1 plus 2.
With iteration disabled, Calc reports an error rather than a meaningful pair of numbers. Inspect Tools > Options > LibreOffice Calc > Calculate, where iteration settings are documented. Do not enable Iterations for this exercise. Replace F2 with the constant 5; F1 should become 6. The dependency is now one-way and the model is repaired.
Iteration is appropriate only for a deliberately specified iterative model with convergence criteria. A larger step count does not make a contradictory model correct. If you inherited a workbook using iteration, investigate its assumptions before changing that setting.
Check precision and saved state
In Calculate options, also inspect Precision as shown. When enabled, displayed rounding can affect calculation. Do not enable it simply to make totals look tidy. Number formatting normally changes presentation without discarding underlying precision; that distinction matters when reconciling totals.
Save and reopen the ODS after restoring your normal calculation mode. Confirm B1=8, B2=30, B3=240 and F1=6 with F2=5. Change B1 to 9 and expect 270. Record the restored settings alongside the file so another user does not mistake stale manual-mode values for final results.