Most of the anthropogenic air pollution sources are located in urban environments. The contribution of these sources to the population of atmospheric particles in the urban environment is poorly known. In this study, we investigated the aerosol particle number concentrations in a diameter range from 1 to 800 nm at a street canyon site and at a background station within 1 km from each other in Helsinki, Finland. We use these number size distribution data together with complementary trace gas data and develop a method to estimate the relative contributions of traffic and atmospheric new particle formation (NPF) to the concentrations of sub-3 nm particles. During the daytime, the particle concentrations were higher at the street canyon site than at the background station in all analyzed modes: sub-3 nm particles, nucleation mode (3-25 nm), Aitken mode (25-100 nm), and accumulation mode (100-800 nm). The population of sub-3 nm and nucleation mode particles was linked to local sources such as traffic, while the accumulation mode particles were more related to non-local sources. Aitken mode particles were dominated by local sources at the street canyon site, while at the background station they were mainly influenced by non-local sources. The results of this study support earlier research showing direct emissions of the sub-3 nm particles from traffic. However, by using our new method, we show that, during NPF events, traffic contribution to the total sub-3 nm particle concentration can be small and during daytime (6:00-20:00) in spring it does not dominate the sub-3 nm particle population at either of the researched sites. In the future, the contribution of traffic to particle number concentrations in different urban environments can be estimated with a similar approach, but determining the relationships between the gas and particle concentrations from observations needs to be conducted with longer data sets from different urban environments.