This is not possible. There are no standards about what measurements the size letters correspond to, so you cannot figure out the letter size except by trying things on.
I, for example, am either an M, L, XL, XXL, or even XXXL depending on the individual item being tried on.
It is not uncommon to find tops for which the difference between L and XL is that the XL is about 1/2 cm looser and about 2 cm longer, and the XXL has about the same relationship. Under those conditions, the question of which is the "right" fit comes down to a preference for how low you want the top to sit. As these tops might be sweater-like people might prefer them to sit lower down to reduce cold breezes, and so might choose something nominally very large according to the letter system when really they were just looking for something a bit longer instead of something "larger".
Someone suggested checking shoulders. Shoulders tend to carry relatively little fat, so shoulder measurements tend not to be adequate, as such measurements do not take into consideration bust size or torso or belly fat or hip size. Shoulder width might put a lower bound on letter sized clothing, but there can be a lot of variability below the shoulder.
I mentioned length earlier. People have different proportions in ways that cannot be dealt with with just one or two measurements. For example my legs are right at the upper end of the "short" sizes in length, but my torso is on the long side. Tops that fit my shoulders and arms and torso width tend to be short on me, which cannot be captured easily by the lettered clothing system.