You can also use a little bit of geometry, as I've shown in the attachment.
Slope is rise over run, and I show a way to identify the rise over the run. Similar triangles can be set up to identify distance D which is the run (the run happens to be negative D here). The rise was already identified in your drawing.
Now, the triangles are obviously similar if you consider that all angles in a triangle add to 180 degrees. Then similar triangles may have different lengths for the sides, but the ratios between corresponding lengths are all equal. Hence a simple ratio identifies the length D.