Calculate min/max client side