As we already know, a diffraction grating can be used to produce interference in the same way a double slit can. We looked at how we can use our knowledge of path difference with a bit of trigonometry to give us an equation for use with diffraction gratings. This gave us the equation nλ = d sinθ where n is the order of the maxima e.g. 1,2,3 etc. This equation can also be applied to the path difference for a minima but I haven't seen this asked for some time.
To calculate the slit separation, d, you must know firstly how many lines there are per metre and then divide 1 by that value. The angle of deviation, θ, is the angle that the wave/ray is deviated from the normal line.
Remember also that wavelength of red light = 700 nm and wavelength of violet light = 400 nm.