If you have a goal time in mind for your next race, you need a game plan going into it. Figuring out what pace to run for a given race distance can be tricky, but there are several ways to do it.
Generally speaking, the most accurate way to figure out a realistic pace for an upcoming race is to base it off of your most recent race time. If you've done a 5k and are getting ready for a 10k, work off the 5k time. If you're running a marathon, using your most recent 1/2 marathon time will be your best baseline for determining a realistic time. If you have a big gap in between an upcoming race and the last time you raced--six months or a year or so, for instance--then doing a time trial of two to three miles on a local track is going to be your better gauge.
Once you have a time to work from, there are a few different calculators you can plug the data into and come up with a number in the right ballpark. A few to try:
Now go get that goal time!