The longest non-stop (by Wikipedia source) flight is Newark to Singapore on Singapore Airlines flight SQ21 which is and 18 hour 50 minute flight of some 15,345km.
However for single flight number, allowing stopover , things are hard to research.
Not many websites list tables of distances by flight number.
So I resorted to thinking of a route and then looking on the airline websites to see if it was one flight number or split over two flight numbers.
I suspect the longest route that could be a single flight number and have a stopover would be Northern Europe to Australia.
So I searched on several airlines for flights.
I found a few contenders (but no definitive answers): NZ1 and NZ38, both on Air New Zealand fly London to Auckland with a stop in Hong Kong in 26 hours and 40 minutes.
A distance of 18,463 km.
QF320 on Qantas and BA15 on British Airways fly London to Sydney with a stopover in Singapore.
They both take 22 hours and 50 minutes.
QF1 on Qantas goes from Sydney to London, again stopping in Singapore and is 23 hours and 25 minutes.
travel.stackexchange.com/users/602/Rincewind42
From Wikipedia : Newark - Singapore ( Singapore Airlines ) flight number: SQ 21 , 15,345km (9,535 miles, 8,285 nautical miles) from 18 hr 40 min to 18 hr 50 min, aircraft: Airbus A340-500 , first flight - 29 June 2004
Second place: Los Angeles - Singapore ( Singapore Airlines ) flight number: SQ 37 , 14,114km (8,770 miles, 7,621 nautical miles) from 17 hr 20 min to 18 hr 05 min, aircraft: Airbus A340-500 , first flight - 3
February 2004 Third place (surprisingly only by distance, but not by time) Sydney - Dallas ( Qantas ) flight number: QF 7 , 13,804km (8,578 miles, 7,454 nautical miles) 15 hr 25 min, aircraft: Boeing 747-400 , first flight - 16 May 2011 Third place by time: Los Angeles - Bangkok
( Thai Airways International ) flight number: TG 795 , 13,309km (8,270 miles, 7,186 nautical miles) 17 hr 20 min, aircraft: Airbus A340-500 , first flight - 28 September 2006
travel.stackexchange.com/users/19/VMAtm
Since the two answers so far will no longer be valid soon , I thought it is time to add a new answer: Singapore Airlines is cancelling their nonstop flights from Newark to Singapore and from Los Angeles to Singapore.
So the longest flight will be Sydney - Dallas by Qantas (QF7).
travel.stackexchange.com/users/693/RoflcoptrException
The longest flight by flight number (including stops) would be Korean Air's flight 062 from Guarulhos Gov Andre Franco Montouro (GRU) in Sao Paulo, Brazil to Incheon Intl (ICN) in South Korea via Los Angeles International (LAX).
It is 28 hours and 35 minutes.
travel.stackexchange.com/users/6107/Andy
According to this CNN article , the record has been broken because of the COVID-19 outbreak: On March 14, French airline Air Tahiti Nui flew the longest ever scheduled passenger flight by distance -- transiting 9,765 miles across the world from Papeete, in Tahiti, French Polynesia, to Paris' Charles de Gaulle airport.
This one off milestone was a direct consequence of the coronavirus-induced US travel restrictions.
This route usually involves a scheduled stopover at Los Angeles International Airport (LAX).
But when an airplane stops over in the US, all passengers must alight the aircraft and proceed through US Customs and Border Protection before they're allowed to advance on with the next leg of their journey.
Current restrictions rendered this part of the journey untenable, so instead, flight TN064 just carried straight on, departing at 3 a.m. local time from Papeete airport and arriving in Paris at 6:30 a.m. local time on March 15.
This is a scheduled flight, but a one time deviation from the schedule (though the situation may continue to be like this in the near future).
travel.stackexchange.com/users/28333/Glorfindel
Air India Flight 173 from New Delhi to San Francisco is the world's longest flight.
It covers over 15,000 km (9,300 miles) en route, over the Pacific Ocean in about 15 hours.
This is from Flightaware :
The Wikipedia page has now been updated as well.
Since 15 October 2016, Air India Flight 173 from New Delhi to San Francisco started flying over the Pacific Ocean.
Tailwinds over the Pacific Ocean helped in reducing the flight time by 2 hours, despite increasing the total distance by 1,100 km.
This also made AI 173 the world's longest flight by actual distance flown, with total distance traveled being over 15,100 km (9400 miles).The return flight AI 174 however still flies over the Atlantic Ocean, to take advantage of tailwinds in that direction.
Air India therefore advertised this route as around the world flight, as it departs over Pacific and returns over Atlantic.
Some other interesting articles and videos on AI 173: Air India taking advantage of tailwinds Air India now operates the world's longest routing (sort of) Official statement by Air India captain Rajneesh Sharma
travel.stackexchange.com/users/50086/anshabhi
Here is an update for 2016: Early on 3 March, Emirates flight 449 made history when it touched down in Dubai from Auckland.
The Airbus A380 covered an estimated 9,000 miles between New Zealand’s largest city and the airline's hub, making it the current longest non-stop scheduled commercial flight by a distance.
The Independent Here is what we can look forward to in the coming years: Qatar Airways Flight 921 from Auckland to Doha, which will be the longest flight in the world, will be flown with a Boeing 777-200LR when it starts 2 February 2017, overtaking Emirates' spot with their Auckland-Dubai flight.
Wikipedia Singapore Airlines revealed plans last year to bring back its Singapore-New Jersey service in 2018.
The flight will apparently cover some 15,300km (9,500 miles) in 19 hours.
travel.stackexchange.com/users/44274/Nathan Shoesmith
For example, JQ151 from Sydney to Christchurch is around 3 hours.  NZ1 however, is about another 7 to Hong Kong.  Will need a regular flight number to verify.  Definition is longest in terms of flight time / distance (they should be linked, logically?).
What is the longest passenger flight (with a flight number) in the world?
travel.stackexchange.com
<air-travel><routes><long-haul><statistics><factoids>
travel.stackexchange.com/questions/5065
travel.stackexchange.com/users/101/Mark Mayo
Singapore Airlines flight SQ21 from Newark to Singapore is an 18 hour 50 minute flight of some 15,345km, and the longest non-stop flight listed on Wikipedia. However, this flight has been canceled and restored in the past. Other contenders include multi-stop flights between London and Sydney with a stopover in Singapore, or the first flight of the Airbus A340-500. There are many contenders for the longest flight and the information is constantly changing. The record, however, for the longest flight is held by Air Tahiti Nui, Tahiti to Paris non-stop, as a result of restrictions preventing it landing for a stopover in Los Angeles.
There are many contenders for the world's longest flight and the information keeps changing as routes are stopped, started or modified. The latest record for the longest flight is Air Tahiti Nui which flew from Tahiti to Paris non-stop as Covid-19 restrictions prevented it from landing in Los Angeles.