Cost of a branch misprediction on a deep out-of-order pipeline

A modern out-of-order core has a deep front-to-back pipeline (roughly 19 stages from fetch through the stage where a branch's actual outcome and target are finally resolved in execute). A branch mispredicts. Roughly how many cycles of useful work are lost, and what determines that number?

27 of 47 in Computer Architecture