To calculate the cost per unit, add all of your fixed costs and all of your variable costs together and then divide this by the total amount of units you produced during that time period.