The gradient of parallel lines can be calculated using line equation y=mx+b for each line such that m1 = m2.