math.modulo can be calculated with decimals install npm i math.modulo # or yarn add math.modulo use import modulo from "math.modulo"; modulo(377, 37.7); // 0