[Shorter variant:] In the short run, the market is a voting machine but in the long run, it is a weighing machine.
Notes from Wikiquote
The statement is not found in any of Graham's publications or lecture transcripts, and when asked, Buffett could not provide a reference.