We present an algorithm ({scshape mead}, for `Mapping Extinction Against Distance) which will determine intrinsic ($r - i$) colour, extinction, and distance for early-A to K4 stars extracted from the IPHAS $r/i/Halpha$ photometric database. These data can be binned up to map extinction in three dimensions across the northern Galactic Plane. The large size of the IPHAS database ($sim 200$ million unique objects), the accuracy of the digital photometry it contains and its faint limiting magnitude ($r sim 20$) allow extinction to be mapped with fine angular ($ sim 10 $ arcmin) and distance ($sim 0.1$ ~kpc) resolution to distances of up to 10 kpc, outside the Solar Circle. High reddening within the Solar Circle on occasion brings this range down to $sim 2$ kpc. The resolution achieved, both in angle and depth, greatly exceeds that of previous empirical 3D extinction maps, enabling the structure of the Galactic Plane to be studied in increased detail. {scshape mead} accounts for the effect of the survey magnitude limits, photometric errors, unresolved ISM substructure, and binarity. The impact of metallicity variations, within the range typical of the Galactic disc is small. The accuracy and reliability of {scshape mead} are tested through the use of simulated photometry created with Monte-Carlo sampling techniques. The success of this algorithm is demonstrated on a selection of fields and the results are compared to the literature.