J = \frac{q}{|p_e - p_{wf}|}

where

flowrate (the specification of which may differ, see below)

formation pressure

bottom hole pressure at sandface