CFC: a tool for monitoring genetic diversity. Monitoring genetic diversity through probability of gene origin has become an important issue in genetic preservation projects as well as in animal breeding. CFC is originally developed to compute population statistics on relationships by a computationally efficient indirect method. Ancestral decompositions are proposed to determine the contribution of ancestors to the average inbreeding coefficients and coancestry. The capability of CFC is also extended to optimizing matings for minimizing the coancestries between mate candidates by simulated annealing algorithm providing forbidden matings and contributions for sires and dams. CFC is memory efficient and fast and applicable to very large pedigrees. The software is available free for research proposes at iwsk/cfc.html.