Four people need one table. The fifth person suddenly needs a second one. It is precisely at jumps like these that an adjustable model explains more than a smooth decimal number. You see not only a result, but also which rule produces it.
In supported interfaces, ChatGPT can display interactive explanations and calculators. Availability depends on the account and the interface, among other things. A single relationship is enough for a sensible start. The table model below is an illustration of our own; it was not generated in a ChatGPT session or tested as an application.
The assumption belongs next to the slider
Our simplified model assumes four places per table. What we are looking for is a whole number of tables for a non-negative whole number of participants. Room shape, escape routes, accessibility and particular space requirements are not calculated. The scope stays readable right next to the display.
The rule is: divide the number of people by four and round up. With zero people, this model gives zero. One to four people give one table; five to eight give two. These values follow mathematically from the chosen rule; they are not observed results of a model evaluation.
A small function makes the rule visible
function tische(personen) {
if (!Number.isInteger(personen) || personen < 0) {
throw new Error("Number of participants must be a whole number from zero.");
}
return Math.ceil(personen / 4);
}
Our own JavaScript function deliberately contains only the subject-matter relationship. It knows nothing about a room or bookings. This narrow reach is helpful: the calculation can be read independently of colours, motion and controls.
For the interface, a number field with a visible value may be enough. A slider is an additional way of operating it, not a replacement for the exact result. The following HTML excerpt of our own shows the labelling and an area for the feedback.
<label for="personen">Number of participants</label>
<input id="personen" type="number" min="0" max="200" step="1" value="0">
<p>Assumption: four places per table.</p>
<output id="bedarf" aria-live="polite">0 tables</output>
Connect input and calculation deliberately
A connecting piece of code reads the text from the number field, checks for a permissible whole number and only then calls the calculation function. An empty field should trigger understandable feedback instead of being treated, unintentionally, like a zero entered on purpose.
const eingabe = document.querySelector("#personen");
const ausgabe = document.querySelector("#bedarf");
eingabe.addEventListener("input", () => {
const text = eingabe.value.trim();
const n = Number(text);
if (text === "" || !Number.isInteger(n) || n < 0 || n > 200) {
ausgabe.textContent = "Please enter a whole number from 0 to 200.";
return;
}
const anzahl = tische(n);
ausgabe.textContent = `${anzahl} ${anzahl === 1 ? "table" : "tables"}`;
});
The upper limit of 200 is a limit we chose for this learning interface. It is not factual proof of capacity. Place the executing part of the script after the number field and the output. Provide the function and the excerpt in the same small document if you experiment with them; these are readable building blocks, not a delivery that has already been run.
Motion must not replace the only text that shows the result. Anyone who reduces animations or reads only the number should be able to understand the same rule. So keep the assumption and the calculated result permanently visible.
Check the jumps and the controls separately
Work out zero, one, four, five and eight people yourself. Also look at an empty field, a negative number and a decimal value. This way you examine both the rule and the input handling. After that, check operation with the keyboard and the readability of the feedback.
If you want to reuse the same building block of your own on a website, the developer mode of KENJTEC WebSiteBuilder ai, for example, offers a place for your own HTML, CSS and JavaScript, with a preview and separate code publishing. The transfer happens deliberately as code; a chat visualisation is not carried over automatically.
In the end, the model answers exactly its own small question. Its strength lies in the fact that input, formula and limit are visible together. Real room planning needs further information that this display explicitly does not provide.
Sources and documentation status: 25 October 2026.

