how patch cost is calculated