So, open the lid all the way and measure from one end to the other and see how long the strut needs to be.
Ok, let's try this.
1. Using the appropriate tools and safety precautions, remove the existing strut or struts. Be careful, as the lid may want to fall once the existing strut or struts are removed and can cause injury if any post of your body is in it's path.
2. Open the lid to the desired opening.
3. While holding the open lid with one hand, use the other hand to measure the distance between the mounting point on the lid and the mounting point on the box. This will be the extended length of a newly installed strut of the appropriate length.
Now, bear in mind that the retracted length of the strut also has to fit with the lid in the closed position. That can be calculated with a little math, but I'm not sure I can explain it here in such a way that it'll be understood.