I've run out of air once. I did it on purpose.
At a previous job, I would often dive with a co-worker. His tanks were due for annual service and they had a low fill on them. (Mine had about 2000# to start. I'd have to check my dive log to see what the actual value was.) We decided to go diving rather than just open them up and let the air out.
We planned a short dive, with turnaround times at halfway. We were aware that it would be a short and shallow dive, we knew it was probably going to be me running out, we both kept a very careful watch on our gauges (I'd say the longest we went without checking was 30 seconds), and we were able to do our safety stops before it happened. (They weren't required due to the short dive and shallow depth, but I try to do them on any dive anyway.) The plan was to do a stop, get to about 100, then move to even shallower water (5feet) and see what it felt like to actually run out of air.
Now, this was a shore dive. When we're in 5 feet, we can just stand up and switch to atmospheric air.
At the last minute, we realized it was a Bad Plan, so we went up. I was walking to shore with my regs in, as you often do for a shore dive. (That way if you trip or get swept away, you've got air.) I got two breaths after standing up and then I was out.
I did learn that the second to last breath is really rough. You've got to earn it.