An interesting question from Marginal Revolution: how much cash should you carry?
Greg Mankiw has also commented on this; apparently there's a standard model called the "Baumol-Tobin model" that answers this question.
There are two factors in play here that we need to think about. Any cash you're carrying can't earn interest, so you forgo interest by carrying more cash. But it takes time to go to the ATM, and your time has some value; you use more time in getting money if you habitually carry less cash. (If you also have to pay ATM fees, they can be folded into this.)
I suspect that most people, in most situations, manage their cash in the following simple way -- when the amount of cash they have is less than c dollars, they go to the ATM and withdraw C dollars. (For most people, c is probably on the order of the amount of cash they spend in the average day, because they pass by a convenient ATM once a day or so.) In my case, c = 20 and C = 60; that is, when I have less than $20 I stop at an ATM and withdraw $60. The times I don't do this are when I know that I'll have large cash expenditures; for example, last time I moved I withdrew a few hundred dollars in cash because I knew my movers only took cash. The average amount of money I have in my wallet is something like C/2 + c, since it is about equally likely to be anywhere between c and c+C; I'm going to make the simplifying assumption that c is much smaller than C, so we'll call this C/2.
So how much interest do I forgo, annually, by carrying this amount of cash? That's easy; it's Cr/2, where r is the interest rate. (My ATM card is linked to a checking account which gets essentially zero interest.)
Now, let's say each trip to the ATM costs me an amount a, measured in dollars. This is a combination of the time it takes me to get to the ATM, valued at whatever amount I value my time at, and any ATM fees I might pay. If the amount I spend annually in cash is s, then I'll have to make s/C trips to the ATM during the year. The quantity we want to minimize is the sum of the amount of interest I forgo by carrying cash and the time value of my trips to the ATM, which is
f(C) = as/C + Cr/2
To minimize this, we take its derivative; f'(C) = -as/C2 + r/2. Setting f'(C) = 0 and solving for C, we see that each time I go to the ATM I should withdraw (2as/r)1/2. Note that the dimensions work -- a has units of dollars, as does s, and r is a pure number, so 2as/r has units of square dollars.
Off the top of my head, I have s equal to about $4,000 (I withdraw $60 slightly more than once a week), a about $1 (I'm just guessing here, but the "good" ATM is a bit out of my way), and r about 0.12% (it's a checking account -- those don't have interest any more). Plugging in, I get C = $2,581; I should be withdrawing that amount of money every eight months or so. Even if I take r = 4%, which I could get from a high-yield savings account, I get C = $447, which would correspond to a withdrawal in that amount about every six weeks.
Why don't I withdraw that much money? I think it's because I wouldn't feel comfortable carrying it in my wallet; there are psychological factors that this model doesn't take into account, as people point out. Also, I suspect that if I were carrying a wad of cash like that I'd feel richer, which would lead me to spend more money, which would make me actually poorer. Plus, carrying large amounts of cash probably increases my probability of getting robbed...