The present invention provides a method for identifying biomarkers and generating an output indicative of lung cancer. The method for identifying biomarkers comprises the steps of collecting a breath sample from subjects known to have lung cancer and subjects known to be free of lung cancer; analyzing the collected breath samples to determine all mass ions in each of the collected breath samples using at least one time-resolved separation technique and at least one mass-resolved separation technique; identifying a subset of the determined mass ions in a processor as the biomarkers for detecting lung cancer, the subset of the determined mass ions are statistically significant for detecting lung cancer; and combining the subset of the determined mass ions in a multivariate algorithm in the processor to generate a value of a discriminant function indicating the likelihood that the subject has lung cancer.