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, lift gate, reefer, etc. Another factor is the contract a carrer has with a shipper. If it is a one-time load the rate may well be higher than if a shipper regularly ships dozens or hundreds of loads a month.