Using ammonium based nitrogen fertilizers in crop production has been shown to acidify soils. Lime used to correct soil pH is an important cost to producers. Recommendations of the optimal level of nitrogen to apply typically ignore the cost of lime created by nitrogen fertilization. This study was aimed to estimate soil pH change in response to nitrogen and lime application, and determine the effect of considering the cost of lime on recommendations about the optimal level of nitrogen. Yield response and pH functions were estimated and used to determine optimal levels of inputs. The effect of the cost of lime on recommendations about the optimal level of nitrogen was found to be marginal. Nitrogen acidification was found to be more severe with nitrogen application amounts above recommended rates than with nitrogen that is used by the plant.