An easyJet flight carrying 167 passengers to the UK was 1.3 seconds from reached the end of the runway.
The Airbus A320 took off from Lisbon Airport with just 110m (361ft) of tarmac remaining after the crew members used the wrong calculations for the runway they used.
Based on the speed it was travelling, in another 1.3 seconds the aircraft would have reached the end of the runway, according to a report by the Air Accidents Investigations Branch (AAIB).
Before the flight to Manchester took-off on 16 September, the pilots carried out calculations for runway 21 at Lisbon Airport but mistakenly used the full length of the runway to make their assessment, according to the AAIB.
Instead, the pilots should have used measurements from the intersection on the runway which they used – a difference of 1,395m (4,577ft) from the full length of the runway, it added.
This meant that when the aircraft was cleared for take-off, the wrong calculations were used to get the plane airborne and threatened the safety of the aircraft, the AAIB said.
According to the report, the pilots noticed there was something wrong as they saw the red and white alternate lights of the last 900m (2953ft) of the runway but they did not select takeoff/go-around thrust.
The fence at the end of the runway was cleared by the aircraft by just 35ft (10.6m).
Both pilots were “interrupted numerous times during the pre‑flight preparation”, which the report says contributed to the mistakes they made.