Pinhole calculator