What does "up to X damage" exactly mean?

Solution 1:

If base damage of the weapon as listed on info screen is 4 it means that non-critical hits will hit from 3 to 5 at random with 4 being the most probable. In such cases you will see "up to 5". It does not mean that you will always hit for 5 damage, you may hit for less. The number shown depends only on your weapon, nothing else seems to affect it. If the shot crits you can deal more than 5 damage.