COSTA MESA The 2017 OC Fair generated $9.2 million in profit despite a slight dip in attendance from last year, officials announced this week.

In total, the fair took in $34.5 million in revenue, an increase of $800,000 from 2016 spurred by concession sales and gate admissions, said Michele Richards, vice president of business development for the OC Fair & Event Center.

“There was a slight increase on weekends from $12 to $14,” Richards said of gate ticket prices, which added to the boost in earnings.

Concession prices are at the discretion of the vendor, but the Fair & Event Center does receive a percentage of sales, said Terry Moore, director of communications for the fairgrounds.

Attendance for the fair, which ran from July 15 to Aug. 13, was 1.334 million visits. That number was down .76 percent from 2016 when 1.344 million fair-goers passed through the gates.

More than 16,000 veterans and active-duty military service members entered the fair for free. The Heroes Hall veterans museum saw around 43,418 visitors in its fair debut.

Another factor in the increased revenue, Richards said, was the current economic upswing in which people have more disposable income.

The profits will be put back into the fairgrounds operating budget, Richards said, which funds community give-back programs in an effort to make the fair more accessible and charitable causes.