Neutron scattering offers a length-scale-independent method of probing structured matter on an atomic scale through nano-scale to meso-scale. A protocol is presented that provides a versatile method of determining structure, by comparison of measured and calculated neutron scattering, for any structural distribution that can be described algebraically or numerically, requiring no particular model other than the model of the structure, and needing no adjustable parameters other than the scale and other parameters describing the physical model. The method enables the direct comparison of measured and calculated scattering from structured matter: from simple finite and infinite bodies, from extended regular array of pores, or from extended arrays of pores with a partially randomised character. Examples are given for the radial distributions of a range of regular bodies, of large arrays of highly ordered porous materials such as templated SBA-15 and MCM-41 silicas, as well as for more disordered materials such as sol–gel silicas. Monte Carlo integration of the calculated scattering for ensembles of up to about 100,000 pores has been studied using these techniques. The method enables the calculation of the solid–solid density correlation function G(r) for model systems, and hence, by Fourier transformation, the expected scattering. Example measured scattering is compared with the calculated scattering, with further data presented in a related paper. The technique allows the direct calculation and comparison with measurement of all three of the main pore structural parameters: lattice spacing, pore diameter, and pore-wall thickness. Example SBA-15 wide and small angle neutron scattering (SANS) data, measured on NIMROD (the Near and InterMediate Range Order Diffractometer at ISIS), is used as an initial evaluation of the applicability of the techniques. The method is also applicable to determining structure by comparing calculating with measured diffraction broadening, and an example is given using SBA-15 diffraction data, measured on D20, at the Institut Laue-Langevin (ILL), Grenoble.