And some of the worst grossing movies, as well:
Heaven's Gate, for example, is 325 minutes as a workprint, 219 minutes for the original theatrical release, and 149 minutes for the "edited" version for wide release. It made $3.5 million on a $44 million investment in 1980.
The Greatest Story Ever Told started out as a 4 hour 20 minute epic (in a roadshow theatrical release), but was trimmed multiple times, until it finally had a general release of 2 hours 17 minutes. It's never made back anywhere near enough to cover production costs.
Cleopatra in 1963 had the distinction of being the highest grossing film of the year ($26 million) while still losing money (production and marketing cost $44 million), and is notorious for almost bankrupting 20th Century-Fox. The director originally screened a 6 hour version for the studio, but was forced to cut it down to about 4 hours for the premiere. It was cut down to 3 hours for general release, so that theaters could get in more showings in a day.