For a closed-loop control system with a digital channel between the sensor and the controller, the notion of invariance entropy quantifies the smallest average rate of information above which a given compact subset of the state space can be made invariant. There exist different versions of this quantity for deterministic and uncertain systems, which are equivalent in the deterministic case. In this work, we present algorithms for the numerical computation of these two quantities. In particular, given a subset $Q$ of the state set, we first partition it. Then a controller, in the form of a lookup table that assigns a set of control values to each cell of the partition, is computed to enforce invariance of $Q$. After determinizing the controller, a weighted directed graph is constructed. For deterministic systems, the logarithm of the spectral radius of a transition matrix obtained from the graph gives an upper bound of the entropy. For uncertain systems, the maximum mean cycle weight of the graph upper bounds the entropy. With three deterministic examples, for which the exact value of the invariance entropy is known or can be estimated by other means, we demonstrate that the upper bound obtained by our algorithm is of the same order of magnitude as the actual value. Additionally, our algorithm provides a static coder-controller scheme corresponding to the obtained data-rate bound. Finally, we present the computed upper bounds of invariance entropy for an uncertain linear control system as well.