1. From the attic (safest)
Level against a rafter, mark 12 in, measure straight up to the rafter. 6 in means 6/12. If you have only a 24-in level, measure at 24 in and enter rise and run as they are – the calculator divides.
2. On the roof
Same method on the shingles, with the level's end touching the roof. Only if you are equipped for working at height.
3. From the ground
Stand square to a gable end and photograph it straight on from a distance. Measure the angle of the rake on the photo (any on-screen protractor), and enter the angle. Lens distortion and a not-quite-square position add a degree or two of error – enough to move between 5/12 and 6/12 – so prefer the attic method for ordering.