Compute ratio