--- title: "calculate-iteration-number()" slug: "math-calculate-iteration-count" updated: 2026-08-13T13:07:52Z published: 2026-08-13T13:07:52Z canonical: "docs.lobstersoftware.com/math-calculate-iteration-count" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # calculate-iteration-number() This function calculates the number of iterations necessary to process a given number of **a** elements when **b** elements are processed per iteration. ## Parameters | Parameter | Description | | --- | --- | | a | Total number of elements. | | b | (optional) Number of elements being processed per iteration. Default: *1* | | c | (optional) Offset (already processed elements). Default: *0* | ## Examples | Parameter a | Parameter b | Parameter c | Result | | --- | --- | --- | --- | | 10 | | | 10 | | 10 | | 5 | 5 | | 5 | 2 | 0 | 3 | | 5 | 2 | 1 | 2 | | 5 | 2 | 2 | 2 | | 5 | 2 | 4 | 1 | | 5 | 2 | 6 | 0 |