chalk it up to, to

chalk it up to, to

To credit or ascribe something. The term comes from the practice of keeping accounts by writing them down with chalk on a slate. It was long used in shops, restaurants, and bars, and later also to keep score in games and sports. The figurative use, as in “chalk it up to experience,” dates from the nineteenth century.
See also: chalk, up