Nitrogen fertilizer producer CVR Partners LP (UAN -1.83%) has been whipped around by Mr. Market with the rest of its peer group in the last year. Market conditions have thrown up multiple challenges in pricing and supply, which only compounded the issues encountered following an upgrade to its lone facility in the first half of 2013.

UAN Chart

UAN data by YCharts

CVR Partners now has its entire facility running on all cylinders, but weak selling prices for ammonia and urea ammonium nitrate aren't being kind to operations. There's still a nearly double-digit yield on shares at current prices for investors, although you may be wondering if this year's planting season will provide a rebound to the cyclical fertilizer market. Before we get into that, I think it's a good idea to discuss how the company makes money in the first place.

Mo' money, less nitrogen
Let's start with a quick review of operations. CVR Partners uses petroleum coke as a feedstock, rather than the industry standard natural gas, to produce the nitrogen fertilizer ammonia. To maximize the value of the nitrogen consumed during production, the company converts the majority of the ammonia it produces into UAN, which has historically sold as a higher-value fertilizer.

Source: CVR Partners.

It's important not to be deceived by market prices. Sure, ammonia sells for more dollars per ton than UAN, but it takes just 0.41 tons of ammonia to produce one ton of UAN. Therefore, CVR Partners will capture more revenue and income by producing UAN instead of ammonia as long as the ammonia-to-UAN break-even price exceeds the current market price for ammonia.

It sounds confusing, but the calculation is quite simple. The break-even price can be calculated by taking the current market price of UAN and dividing it by 0.41. If the number is greater than the selling price of ammonia, then you should be cranking out as much UAN as possible to maximize value. If the number is less than the selling price of ammonia -- and I don't believe it has even been less -- then it makes more sense to sell ammonia instead of UAN. Here's how that broke down for the first quarter:

Product

Average Selling Price

Ammonia

$479 per ton

UAN

$253 per ton

Breakeven price

$617 per ton of ammonia

Source: CVR Partners press release, author's calculations.

Another way to look at it: CVR Partners sold the ammonia it produced for $617 per ton -- a 29% premium to the fertilizer's average market price -- by converting it to UAN. Or, without this capability, the company would have realized nearly 29% less revenue by selling all of its production as ammonia.

Foolish bottom line
There may soon be another calculation for investors to conduct, as management wants to begin producing commercial volumes of diesel emission fluid, or DEF, which sells at a premium to UAN on a nitrogen basis. For CVR Partners, it's all about optimizing the realized price per unit of nitrogen that enters its process. Adding additional product capabilities increases the operational flexibility to do just that.

Why is operational flexibility so important? It allows companies to fine-tune production to sync with market conditions to maximize value for shareholders, even in the toughest markets. Collecting a cool 29% premium on ammonia production isn't a bad turnaround, but it's far from the only thing to take into account for an investment. Next, we'll take a look at those pesky market conditions that remain out of the company's control -- and other steps it's taking to reduce its exposure to such risks.