I'm not an expert, having only a couple recent cycles under my belt after decades off.
I tend to aim for a minimum duration and stop when I get to a point where either sides outweigh the benefits or I plateau at a level where changes would undoubtedly cause an increase in unacceptable sides. Verify progress a minimum of one time during the cycle.
Example, I aimed for an 8 week cycle and ended at 11. There were a couple weeks where I was making dosage ratio adjustments. I could eliminate those from the equation and say my planned 8 week cycle was a 9 cycle, but was 11 weeks on gear total. I ran labs in the middle, saw prolactin and E were in control after dosage adjustments, added the extra length at end.