Roof pitch is measured in a rise to run ratio, with the vertical rise always shown first. The traditional method has been [rise inches]/[12 run inches]. So if your roof is a 45 degree angle (that is, for every 12″ along the horizontal (run), it rises 12″) it’s a 12/12 pitch. If it rises only 6″ for every 12″, it’s a 6/12 pitch. The metric method (for slopes less than 45 degrees) shows the first number as 1 all the time, so a 1/3 slope would mean a rise of 1 cm. for every 3 cm of run. Compare the fractions and you’ll see this is the same as 4/12.
To calculate vertical and horizontal cuts on rafters for head-cuts (where the rafter meets the ridge), birdsmouths (where it sits on the wall), and tail-cuts, you use a framing square. It’s an L-shaped square with measurements along both arms. Once you know the pitch, you simply position this on your rafter to line up the various cuts.
It’s also handy to know what angle the actual pitch is, so that you can set your circular saw or miter saw to the correct angle when cutting the tops of studs on a gable end wall. Trigonometry is one way, but here’s a handy table.