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

where

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

formation pressure

bottom hole pressure at sandface


The definition of flowrate  and formation pressure  may vary depending on how one makes use of productivity index. 

See Definition specifics on formation pressure and productivity index between Dynamic Modelling, Well Flow Performance and Well Tests