Canopy trees play an important role in regulating the microclimate in various ecosystems. This research aims to study the contribution of tree canopy to the microclimate in urban ecosystems and karst ecosystems in the Special Region of Yogyakarta. Trees can affect the microclimate around them, in this case, the ambient temperature. Currently, development in Yogyakarta continues to expand, and green open spaces are being increasingly eroded. The reduction of forest cover and green open spaces in Yogyakarta impacts both the macro and micro environments in the region. Therefore, this study examines the contribution of trees to the ecosystem in terms of air temperature at heights of 1 meter and 10 meters above ground level, soil temperature, air humidity, soil moisture, light intensity, pH, and wind speed in urban and karst ecosystems. This research was conducted at the end of the dry season, in mid-September, from 11:00 a.m. to 1:00 p.m. After the data was collected and tabulated into a collective table containing all the raw data, it was then calculated for its mean and standard deviation, and displayed in the form of a histogram. To determine the differences in parameters between each location, a Least Significant Difference (LSD) test was conducted. Based on the research conducted, both in urban and karst ecosystems, the air temperature 10 meters above the ground (the area around the tree canopy) was lower than the air temperature 1 meter above the ground. The difference in air temperature around the canopy and far from the tree canopy reached 4°C (℃ ) to 10°C (℃ ). Overall, the average air temperature in karst ecosystems was higher than in urban ecosystems. This is due to the differences in the shapes and structures of the tree canopies in the two ecosystems. Trees in urban ecosystems have more diverse shapes and are denser than trees in karst ecosystems. This study proves that trees contribute to the microclimate by lowering the temperature.