What is the etymology and meaning of the phrase "chalk it up"? For instance:
J.S. Farmer and W.E. Henley, Slang and Its Analogues (1890), says that "to chalk up, or to chalk it up" is "To credit, or take credit; to put to one's account." In the context of tavern bills, "take credit" means to accept a promise to pay such a debt. The book then offers three historical examples of this usage (with the year given first):
 1st Pt. Return Parnass. I., i.. 451. "All my debts stande chaukt upon the poste for liquor." [M.]
 Chapman, May-Day, Act I., p. 278 (Plays, 1874). "Faith sir, she [hostess] has chalked up twenty shillings, already, and swears she will chalk no more."
 Punch's Almanack, Jan. ... "When you wish for beer, resort freely to the chalk, and go on, getting as much as you can upon this principle, until it becomes unproductive, when you may try it in another quarter."
Slang and Its Analogues also reports that "chalking the lamppost" was mid-nineteenth-century slang in Philadelphia for bribery.
Christine Ammer, American Heritage Dictionary of Idioms (1997), says that "chalk up" has two meanings, with different dates of emergence in English:
- Score or earn, as in "She chalked up enough points to be seeded first in the tournament." This term alludes to recording accounts (and later scores) in chalk on a slate [c. 1700] 2. Credit or ascribe, as "They chalked their success up to experience." [First half of 1900s]
In my view, Ammer invites misinterpretation of the common phrase "chalk it up to experience" by associating it with a success to be explained, rather than presenting it as an attempt to put a positive spin on something more or less unpleasant. I would have said that "chalk it up to experience" means something like "consider it part of the ongoing price you pay to become wiser and more experienced." I notice that FumbleFingers has made a similar point about that phrase.
Finally, Eric Partridge, Dictionary of Slang and Unconventional English (1961), reports that in the UK in the 1920s, "chalk it up!" could mean "Just look at that!" He cites J. Manchon's Le Slang (1923) as the source of this information.
It comes from literally writing up a debt with chalk. The OED defines it:
3. b. spec. To write up in chalk (a record, esp. of credits given); to score. Hence to chalk it : to run up a score, take ‘tick’. Now esp. common in phr. to chalk it up (to) , to charge it (to) (a person, an account, experience, etc.). Also, to write down; to set down as a sum or estimate.
Their earliest citation is:
1597 1st Pt. Returne fr. Parnassus i. i. 451 All my debts stande chaukt upon the poste for liquor.
However, I found an antedating in The London adviser and guide - Page 27 - by John Trusler - 1586:
Bakers, like milkwomen, will sometimes leave tallies, on which they daily chalk what is left, but a mark is easily added, while the servant is inattentive, which robs you of the price of a loaf, or a pint of milk. These marks are sometimes made on the door-post, oftener without the door than within ; of course an addition can be made unknown to you servant, unknown to your servant, as the baker or milk woman passes the door ; or they may be wholly rubbed out, by wanton boys or others, as is frequently the case ; and when the score is gone, the baker or milk woman may charge what they please ; and as they can sell a loaf or a pint of milk to those who pay ready money, and secrete that money ; to conceal this fraud from their masters, they will score it up to their customers on credit.
When did the figurative meaning come about? Christine Ammer's American Heritage Dictionary of Idioms (1997) has it from the first half of 1900s. The Routledge Dictionary of Historical Slang by Eric Partridge says:
chalk up, To conside in a person's favour: coll, from ca 1890
I found an 1870 example of chalking to give credit, in The bane of a life by Thomas Wright:
"Holloa, Mr Mason ! they got you all right, I see. You may chalk this down to me ; and now I think I'm a little more tan level with you.
I found an early example specifically of chalking it to experience in The Sun (New York [N.Y.]), 22 March 1909:
"Chalk this down as a new experience for me." said the business man.
As noted, chalk it up is just another way of saying write up in chalk (that's OED's definition).
Years ago you might sometimes find a pub run by a trusting landlord who would run a slate for favoured clientele. The customer could order a drink and say "Chalk it up" or "Put it on the slate", and the landlord would write the price into a notebook for later settlement of the bill. Not that I ever saw any slates or chalk in such contexts - it was a metaphorical chalkboard.
Thus, one meaning of chalk it up is make a note of the cost, which will be paid at a later date. But I think by far the most common usage today is...
...which is normally said to someone who's put considerable effort into doing something that hasn't produced any obvious gain. By extension from this, you'll often see other "categorisations" besides experience used in the same construction, but usually that's the sense (whatever's being "chalked up" has failed to achieve its purpose, or turned out to be a disappointment for some reason).
Note that the "literal" sense of the modern usage is that your experience will (like the trusted customer in the pub), pay you back in the fullness of time (because you'll be older and wiser, so you'll do things better next time).
But not everybody grasps that. So, as Sven Yargs points out, even contributors to American Heritage Dictionary of Idioms interpret the expression as meaning ascribe, categorise, and hence extend use to contexts where it introduces an explanation (of anything, potentially even something good), rather than an amelioration/mitigation (of something which is apparently useless).
I believe it comes from the idea of writing something on a chalk board. At one time when you wanted to note why something had happened, you might note it on a chalk board. For example in many sports, scores were tallied on a chalk board, so if you wanted to denote an event like a fault, you would chalk it up.
- to score points, or to achieve success in a game
a. to achieve a particular level or number
- to consider something as having a particular cause
- chalk something up to experience to consider something bad that happens to you as an experience that will help you to deal better with similar situations in the future
-- source: Macmillan Dictionary
All your examples seem to use the second form of the idiom. I suppose chalking it up here is a reference not specifically to a game, but to simply noting the cause of something on a chalk board, as a teacher might do in class.
Literally, chalk it up to means to use chalk to add to an account. It means you do not have to pay, at least not immediately, and if it is not your personal account then not ever.
Figuratively, you can speak of charging any negative outcome to the account of a metaphorical third party (such as “experience”), just as you would a debt. Again you are spared from paying or making amends.¹
So the meaning that the literal and figurative uses have in common is that there is a negative consequence which you do not have to pay for. As a figurative phrase, it is essentially a face saving gesture.
Here is the earliest use I found of the phrase in literature. (In this example, “G. H. R.” is a railroad company and the meaning is literal.)
1854 FULLOM The Great Highway: A Story of the World’s Struggles “Now, what will you have?” said Parkyns: “a drop of the celebrated mixture. We can’t chalk it up to the G. H. R.”