Measure the length of the roof or the ramp from its edge to the porch. This is the run. For instance, you might have a ramp that is 8 feet long from its end to the edge of the porch.
Calculate the height of the ramp or roof. If you are measuring a ramp, you will need to measure the height of the ramp from its highest point -- where it connects with the porch -- to the ground. For a roof, you will first need to climb a ladder that gives you access to the roof. Hold a level at the tallest point of the roof's slope in relation to the porch -- the point where the porch connects to the house. Drop a tape measure downward from this point and take note of the measurement that coincides with the bottom of the roof.
Divide the height of the ramp or roof by its length in order to find the slope. This is equal to the "rise" divided by the "run." For example, if a ramp is 8 feet long and 2 feet high, you would divide 2 by 8 to get 1/4 or 0.25.