The most accurate method would be to net the fish out and measure it, but that's really stressful for the fish.
I taped a ruler to the front of my tank and took a picture. If he swims along next to the front glass, it should give you a pretty acurate measurement.