A general formalism and methodology are presented for the Monte Carlo simulation of equilibria in multicomponent systems, and are applied to the study of phase equilibrium in a model binary mixture, and to phase and chemical equilibrium in the ternary mixture Br2-Cl2-BrCl. Very good agreement with available experimental data is obtained. The formalism is based upon an ensemble in which the ratios of all fugacities to a reference fugacity are imposed. Simulations of mixtures performed in this ensemble fluctuate in composition while keeping constant the total number of particles. The reference fugacity is computed by integration of simulation averages of the composition for varying values of the fugacity ratios. Several features of the approach are: (1) it can be readily applied to mixtures of any number of components, even to polydisperse systems, with little additional computational effort; (2) the chemical potential of only one species at one state need be evaluated by conventional techniques, regardless of the number of components; (3) because equilibrium is established by changes in species identity rather than by particle insertion, convergence of the composition is extremely fast, even when close to a first-order phase transition; (4) certain chemically reacting systems can be simulated as easily as nonreacting mixtures.