Balchem (NASDAQ: BCPC) reported its second-quarter earnings results before the bell on Aug. 4. Here's what you need to know.

The key numbers
For the quarter ended June 30, Balchem generated net income of $14.9 million, or $0.47 per diluted share, a 53% increase from a year ago. Excluding special items, the company earned $0.53 per share, up 17% from earnings on the same basis a year ago. 

Revenue was up 1.9% to $134.8 million. 

Shares rose over 4% on Aug. 4 after the news was released.

Fracking is down, but Balchem found good growth elsewhere
Balchem makes a series of specialty chemicals that have applications in industries ranging from medical devices to animal feed to natural-gas fracking. It has a dominant market position within those niches, as well as a long history of good, careful financial management.

Its business is organized into four segments: SensoryEffects, animal nutrition and health, specialty products, and industrial products.

Balchem's SensoryEffects segment covers its food ingredients, which include preservative, baking products, flavorings, and choline, also known as Vitamin B4. (Balchem acquired a food-ingredient maker called SensoryEffects last year, hence the name.) The unit generated $9.1 million in operating income, up 17.9% from the first quarter. (The year-over-year comparison is complicated by the acquisition; the unit earned $2.9 million in the year-ago quarter.) 

Revenue in Balchem's animal nutrition and health segment dropped 3.7% to $41.6 million, but that was more than explained by unfavorable exchange-rate shifts. (Had rates not changed, revenue would have increased 2.4%.) Sales of ingredients for ruminant feed rose 14%, while ingredients for "monogastric" species fell 10%. But the latter had a difficult year-over-year comparison: Balchem's sales in the monogastric market segment spiked a year ago because of contamination issues in products from Chinese competitors. But operating income jumped 35.5% to $7.5 million, because of a favorable product mix and a drop in prices of key petrochemical-derived raw ingredients.

The specialty products segment produces ethylene oxide, which is used to sterilize medical devices, and propylene oxide, used for fumigation and in a variety of industrial applications. The unit generated $6.1 million in operating income (up 11.5% from a year ago) on revenue of $13.8 million (up 1.2%). Both results are records and Balchem attributed the good result to tight control of expenses, good sales, and -- again -- favorable shifts in the cost of petrochemical raw ingredients.

Balchem's industrial products unit sells choline-related products that are used in a variety of industrial applications -- particularly "fracking" of natural gas. That business has drawn many investors to Balchem in the past, but natural-gas fracking is way down in North America right now, and Balchem's results reflected that drop. Revenue dropped almost 54% to $14.1 million, and operating income fell 73% to $1.1 million. 

Margin, cash, and the CEO's outlook
Balchem's gross margin rose to 31.1% in the second quarter from 24.5% a year ago, thanks to a favorable product mix, lower raw material costs, and some favorable year-over-year comparisons (last year's results included costs related to the SensoryEffects acquisition).

Cash flow from operations totaled $49.9 million in the first half of 2015, and the company had $72.2 million in cash as of June 30. Including available credit lines, Balchem had $119.5 million of "net working capital" at the end of the quarter.

CEO Ted Harris noted that the record results came despite macroeconomic headwinds, specifically unfavorable exchange-rate shifts and the slump in the oil and gas industries. Looking ahead, Harris expects those headwinds to continue -- but Balchem will continue seeking growth in other areas of its business while "aggressively managing" costs.