maybe this page explaining some basic Arduino Arithmetic will help you.
On that page there is a good example which you can change and use in your program.
If you look on google you can find several projects similar to yours, like:
-
http://www.instructables.com/id/Arduino-Bike-Speedometer/
or - http://scuola.arduino.cc/courses/lessons/view/kKa1Z3K
But, like PaulS said, you will learn more if you understand how it works and then write your own code. This way not only you are learning, but you will have much more control on how things work and in the end i think you'll feel a nicer "wow, i actually managed to do it" feeling! =)