This paper presents a systematic approach to generate layouts for two devices, with an arbitrary integer ratio of device sizes, that cancels up to at least 3 rd order gradient effects. A new analysis leads to mathematical constraints on 1dimensional layouts that meet the required integer ratio and cancel 2 nd-order gradients. From those layouts, we apply reflection and rotation symmetries to generate 2-dimensional layouts that cancel higher-order gradients. Importantly, our procedures can handle "dummy lanes" to ensure "routability". Furthermore, we discuss evaluation metrics that identify which of the multiple gradient canceling layout is best for any fixed rectangular grid and device application.