Various companies do it in various ways. Weight may be part of it as may be the miles driven. Cargo size may enter in as may the size of the truck. Accessorials are part of it such as lift gate, detention time, security services, team or solo drivers, time to delivery, pad wrap, pallet jack...