I'll tell you how to measure your carry-on baggage correctly - use a soft tape measure or tape measure to accurately measure each parameter, check the dimensions in advance to avoid unpleasant surprises at the airport. Look at the requirements of a specific airline, they may differ slightly from each other. Also, don't forget about the weight, some airlines also limit the weight of carry-on baggage. More detailed information about linear inches meaning can be found on
this resource.