Recently, the rapid climate change caused by increasing CO2 emissions has become a global concern. Efficient transportation systems are necessary to reduce CO2 emissions in cities. Taxi services are an essential part of the transportation system, both in urban areas with high demand and in rural areas with inadequate public transportation. Inefficient taxi services cause problems such as increased idle times, resulting in increased CO2 emissions. This study proposes a taxi allocation model that minimizes taxi idle time costs for efficient taxi service operation. We also propose three heuristic algorithms to solve the proposed model. At last, we conduct a case study by using real taxi data in Nagaoka, Japan. By comparing the three algorithms, the dynamic greedy algorithm produced the best result in terms of idle time cost and CPU time. The findings indicate that by minimizing idle time costs and reducing the number of taxis, it is possible to achieve a significant 81.84% reduction in CO2 emissions within the transportation sector. Further, in order to estimate the idle time costs the sensitivity of demand is considered.