In mathematics, a cocountable subset of a set X is a subset Y whose complement in X is a countable set. In other words, Y contains all but countably many elements of X. For example, the irrational numbers are a cocountable subset of the reals. If the complement is finite, then one says Y is cofinite.
The set of all subsets of X that are either countable or cocountable forms a σ-algebra, i.e., it is closed under the operations of countable unions, countable intersections, and complementation. This σ-algebra is the countable-cocountable algebra on X. It is the smallest σ-algebra containing every singleton set.
The cocountable topology (also called the "countable complement topology") on any set X consists of the empty set and all cocountable subsets of X.