I assume that the rack is to mate with an existing gear. The tooth pitch of the rack will be the same as the circular pitch of the mating gear. In fact the tooth pitch of the rack is the circular pitch, just that the radius of the circle is infinite.
For gears specified in DP the circular pitch (CP) is:
CP = pi/DP
As an example let's assume the rack needs to mesh with a 10DP gear. The circular pitch will be approximately:
3.14159/10 = 0.314159"
If the DP is integer then the CP has to be irrational, which is a pain when 'indexing'. It would be best to calculate each value separately to avoid cumulative errors.
Andrew