vicky,
The context of your question is not clear. I'm assuming you are starting from the equation for a straight line y = mx + b, where m is the slope, b is the y intercept, x is the independent variable (horizontal) axis, y is the dependent variable (vertical) axis.
y = mx + b
mx = y - b
m = y/x - b/x
Is this what your are looking for?
Regards,
Kral