The iPhone can become a pretty decent measuring thinger, with a little app for just 0.99$. This app is Ruler 2, and it is also compatible with the iPad (well, it’s hard to believe that you’ll use your iPad as a ruler, but just in case..)

Buy it fromiTunes