A probability-based method is proposed for calculating the concentration of chloride at specified points of deterministic and random heterogeneous microstructures. The method, referred to as local method, is used to calculate effective diffusion coefficients of composite media. The effective diffusion coefficient of a heterogeneous material specimen is defined as the diffusion coefficient of a fictitious homogeneous specimen with the same global properties as those of the original specimen. The local method is based on properties of diffusion processes and Ito's formula: it is simple to code, always stable, accurate and suitable for parallel computing. We use the method to calculate effective diffusion coefficients of a material specimen with a deterministic diffusivity field and a random heterogeneous mortar specimen calibrated to an experiment reported in Care (2003). (C) 2010 Elsevier Ltd. All rights reserved.