Every weapon has a 5 point range in damage an accuracy. For example take a hypothetical weapon with a 50-55 damage range and 50-55 accuracy range.
Normal weapons have their stats somewhere inside this range, and the quality is somewhere between 0 and 100, where 0 quality is 50 damage/50 acc, and 100% quality is 55 damage/55 accuracy. (Note a weapon with 55 damage/50 accuracy would be 50% quality).
Yellow weapons can have quality above 100%, most common is 100-140%, but there have been yellow weapons with 160% before.
What that translates to is, as an example, a 140% quality weapon could have 57 damage/57 accuracy. Or 59 damage/55 acccuracy. Or even 61 damage/53 accuracy. etc
Probably more important than the weapon stats is the RW weapon bonus. Things like Powerful, Focus, Empower, etc. Read up on that here
https://wiki.torn.com/wiki/Weapon_Bonus