Soil carbon stocks are the second largest natural reservoir of carbon globally, after oceans. Soil carbon sequestration is a key process that supports both climate change mitigation and adaptation strategies. Thus, accurate mapping of soil organic carbon (SOC) stocks is essential for estimating their regional distribution and assessing soil functions. Regular ground sampling for estimating SOC is often expensive, prompting exploration of alternative, cost-effective techniques such as remote sensing. Many studies have applied remote sensing and machine learning to identify factors influencing SOC and predict its levels, but they often rely on limited data, such as single-year soil samples and small sample sizes, restricting their ability to capture SOC's variability and dynamics.This study aims to combine long-term SOC data (2010-2021) with remote sensing, topographic, and climatic data using random forest (RF) modeling to estimate SOC stocks in surface soils (0–30 cm) and identify key influencing factors across Taiwan’s agricultural and forest lands. Initially, 23 variables were considered, and the least important ones were excluded. Two models were developed: one for agricultural land and one for forest land, with 12 and 14 variables selected, respectively. The agricultural model emphasized elevation, climate, and green soil-adjusted vegetation index (GSAVI), while the forest model focused on vegetation indices and elevation. The models successfully predicted SOC stocks (in kg m-²), showing a strong correlation (R² > 0.60). Results revealed higher SOC in mountainous regions and lower SOC in suburban and low-lying agricultural areas, with SOC stocks ranging from 2.55 to 7.14 kg m-² in agricultural land and 3.47 to 11.75 kg m-² in forest land. This research significantly contributes to SOC monitoring and informs carbon sequestration policy development in Taiwan. The results of this research will contribute significantly to the long-term monitoring of SOC carbon stocks in Taiwan and serve as a valuable reference for the development of carbon sequestration policies.