The interactions of people using public transportation in large metropolitan areas may help spread an influenza epidemic. An agent-based model computer simulation of New York City's (NYC's) five boroughs was developed that incorporated subway ridership into a Susceptible-Exposed-Infected-Recovered disease model framework. The model contains a total of 7,847,465 virtual people. Each person resides in one of the five boroughs of NYC and has a set of socio-demographic characteristics and daily behaviors that include age, sex, employment status, income, occupation, and household location and membership. The model simulates the interactions of subway riders with their workplaces, schools, households, and community activities. It was calibrated using historical data from the 1957-1958 influenza pandemics and from NYC travel surveys. The surveys were necessary to enable inclusion of subway riders into the model. The model results estimate that if influenza did occur in NYC with the characteristics of the 1957-1958 pandemic, 4% of transmissions would occur on the subway. This suggests that interventions targeted at subway riders would be relatively ineffective in containing the epidemic. A number of hypothetical examples demonstrate this feature. This information could prove useful to public health officials planning responses to epidemics.