A numerical study was performed to compare the formation of nitric oxide (NO) and nitrogen dioxide (NO₂), collectively termed NOx, resulting from biodiesel and diesel combustion in an internal combustion engine. It has been shown that biodiesel tends to increase NOx compared to diesel, and to-date, there is no widely accepted explanation. Many factors can lead to increased NOx formation and it was of interest to determine if fuel chemistry plays a significant role. Therefore, in order to isolate the fuel chemistry from mixing processes typical in a compression ignition engine, sprays were not considered in the present investigation.The current study compares the NOx formation of surrogates for biodiesel (as represented by methyl butanoate and n-heptane) and diesel (n-heptane) under completely homogeneous conditions. Combustion of each fuel was simulated using the Senkin code for both an adiabatic, constant volume reactor, and an adiabatic, single-zone HCCI engine model. The fuel chemistry is represented using an updated version of a mechanism that combines reduced mechanisms for methyl butanoate and n-heptane. NOx chemistry is predicted using a 19-step model that includes species and reactions for both thermal and prompt NOx.It was found that the biodiesel surrogate can cause a NOx increase when compared to diesel surrogate, but the relative increase was small (≺3%) for most equivalence ratios. The differences in initial temperatures required to match ignition time make it difficult to definitively link the NOx increase to the oxygen in the fuel under these conditions. The largest NOx increase (26%) was seen at near-stoichiometric conditions. However, it was found that the fuel-bound oxygen in biodiesel did not increase NOx to the extent that the same amount of oxygen would create if it were available in the surrounding air. While the presence of O₂ in the biodiesel surrogate does slightly impact NOx formation, it does not appear to be a dominant factor for HCCI engines, where mixture conditions are well below stoichiometric. In conventional diesel combustion, where equivalence ratios are often above stoichiometric, these results suggest that the fuel chemistry can play a role in the observed NOx increase.