Opening length
The longitudinal (largest) dimension of the slab opening, measured parallel to the direction of ascent. The most important size for the stair.

01 /Why opening length is the most important dimension
Stairwell opening length is the longitudinal (largest) dimension of the through hole in the floor slab, measured parallel to the direction of stair ascent.
Put simply: it is the distance from the slab edge against which the topmost step abuts, to the opposite edge of the cutout.
While the opening width is usually just the stair width plus a small allowance, the opening length directly determines whether you will hit your head on the ceiling while descending or climbing.
The key concept here is the critical clearance (headroom). It is the vertical distance from the step you stand on to the lower edge of the slab above you. Per building codes and ergonomic rules, this clearance must be at least 2000 mm (2 metres).
It is precisely to provide these safe 2 metres that the ceiling cutout has to be made long enough.
02 /What the opening-length calculation depends on
Stair slope
This is the main dependency. The more comfortable and gentle the stair (around 30–35 degrees), the slower you gain height per step forward. Therefore the opening above must be longer. A steep stair allows a shorter opening but is hard and dangerous to walk on.
Floor slab thickness
That very multi-layer «cake». The thicker the slab (heavy beams or a thick concrete slab plus underfloor heating), the lower its underside hangs, and the longer the opening cutout must be to keep your head clear.
Floor height
The floor-to-floor distance directly affects the overall stair length and, consequently, the size of the opening for it.