diff --git a/src/which_plates/functions.py b/src/which_plates/functions.py
index ac67ef5..21e9370 100644
--- a/src/which_plates/functions.py
+++ b/src/which_plates/functions.py
@@ -41,7 +41,7 @@ def calc_plates(weight: int, available_plates: list[float]) -> dict:
         # at least two plates left in remaining weight
         if remaining_weight / Decimal(plate) >= Decimal(2):
             # can only use even number of plates
-            if ((remaining_weight / Decimal(plate)) % 2) == 0:
+            if (int(remaining_weight / Decimal(plate)) % 2) == 0:
                 plate_count = int(Decimal(remaining_weight) // Decimal(plate))
             else:
                 plate_count = int(Decimal(remaining_weight) // Decimal(plate)) - 1