The establishment of a market for CO2 emission rights in Europe leads oil-refining companies to add a cost associated with carbon emissions to the objective function of linear programming models used to manage refineries. These models may be used to compute the marginal contribution of each finished product to the CO2 emissions of the refinery. Babusiaux (Oil. Gas Sci. Technol. , 58, 2003, 685-692) has shown that, under some conditions, this marginal contribution is a relevant means of allocating the carbon emissions of the refinery. Thus, it can be used in a well-to-wheel Life Cycle Assessment. In fact, this result holds if the demand equations are the only binding constraints with a non-zero right-hand side coefficient. This is not the case for short-run models with fixed capacity. Then, allocating CO2 emissions on a marginal basis tends to overvalue (or undervalue) the total volume of emissions. In order to extend the existing methodology, we discuss two distinct solutions to this problem, inspired by economic theory: adapting either the Aumann-Shapley cost sharing method (Values of non-atomic games, 1974, Princeton University Press) or the Ramsey pricing formula (Econ. J. , 37, 1927, 47-61; J. Econ. Theory , 3, 1971, 219-240). We compare these two solutions, with a strong argument in favour of Ramsey prices, based on the determination of the optimal environmental tax rate to which imported finished products should be subject.