Abstract Background Upper gastrointestinal white light endoscopy is the most used procedure for assessing upper gastrointestinal tract condition and identification of various types of lesions. The characteristics of lesions may influence subsequent treatment steps. Among these characteristics, the size of a lesion plays a crucial role in determining the surveillance interval, appropriate resection method and predicting the risk of malignancy. Visual size estimation is highly subjective although this is the method currently used in clinical practice. Another important characteristic is the lesion location, which is currently estimated using the markers on the scope. However, in the stomach the endoscope may be curved to visualise the lesion, making location measurements inaccurate. Identifying the accurate location of the lesion is important for surgical planning and help in deciding the extent of surgical resection required. We aimed to improve endoscopic measurements by developing a quantitative method that can provide lesion size and location measurements in an accurate, objective, contactless and automatic way during endoscopy procedure. Methods A miniaturised electromagnetic tracking sensor was places inside the instrument channel of the endoscope to trace the pose of the camera scope. An algorithm based on feature points tracking was used to identify reference points on each image of interest; a triangulation technique was then used to determine the size of a lesion and its precise location with respect to desired anatomical landmark. Surgeons only require to take two different pictures of the lesion and one single picture of any anatomical landmark that they are interested in knowing the size and location information. At the same time corresponding tracking information were recorded for each captured image. Using these images and recorded tracking information (i.e. position and orientation), our proposed method computed the size of the lesion and its distance with respect to the selected anatomical landmark. The proposed quantitative endoscopy method was tested using a simulated plastic upper gastrointestinal endoscopy model with an artificial lesion. Results 10 different image sets of the same lesion were processed using the model of the upper gastrointestinal tract. A first picture was captured as soon as the endoscope had passed the gastroesophageal junction; two additional images were then captured from different angles when the scope was close to the lesion. The artificial lesion was a rounded shape lesion (diameter 12mm) placed 15.2 cm from gastroesophageal junction. Using the proposed method, the estimated distance from the gastrointestinal junction 15.17 ± 0.51 cm (mean ± SD); the assessed size was 12.76 ± 0.83 mm. The difference between the mean of 10 measurements and the actual values were 2.28 mm for the distance and 0.76 mm for the lesion size. The root mean square error was 5.14mm (distance) and 1.12 mm (size). Conclusions We have developed a quantitative endoscopy method and validated its accuracy in a simulated plastic upper gastrointestinal endoscopy model. This method may potentially be better than the deep learning approaches which require a huge amount of training data set. Our method can also compute the size directly whereas deep learning based algorithms can only classify the lesion into different size groups. There is also no limitation for the size of the lesion, as our method is tool independent. Using the same method and configuration the lesion can be accurately localised, which is also clinically important. The magnitude of error of the proposed quantitative endoscopy method is clinically acceptable and has the potential to highly improve the efficiency of endoscopic diagnosis and enhance patient outcome.