In this work, a mobile application is developed to assist patients suffering from chronic obstructive pulmonary disease (COPD) or Asthma that will reduce the dependency on hospital and clinic based tests and enable users to better manage their disease through increased self-involvement. Due to the pervasiveness of smartphones, it is proposed to make use of their built-in sensors and ever increasing computational capabilities to provide patients with a mobile-based spirometer capable of diagnosing COPD or asthma in a reliable and cost effective manner. Data collected using an experimental setup consisting of an airflow source, an anemometer, and a smartphone is used to develop a mathematical model that relates exhalation frequency to air flow rate. This model allows for the computation of two key parameters known as forced vital capacity (FVC) and forced expiratory volume in one second (FEV1) that are used in the diagnosis of respiratory diseases. The developed platform has been validated using data collected from 25 subjects with various conditions. Results show that an excellent match is achieved between the FVC and FEV1 values computed using a clinical spirometer and those returned by the model embedded in the mobile application.