The dead included 12 militants, two government soldiers and three members of Shi'ite militias that provide vital support for the army.
The clash between ISIS militants and pro-government forces took place in Baiji close to the country's biggest refinery, news agency Reuters reported.
Fighting occurred on a road used by ISIS for supply lines leading from Baiji to the nearby town of Siniya to the west.
Siniya is held by Islamic State, which controls a third of Iraq, as well as parts of neighbouring Syria.
A large swaths of Iraq has been captured by the ISIS. Iraqi army has largely been proven ineffective against the ISIS.
The group has used beheadings and executions, sometimes videotaped, to strike fear into residents of areas it captures to try to create a self-sustaining caliphate and redraw the map of the Middle East.