Abstract In the chalk of the Ekofisk formation in the Chalk Group of the North Sea, substantial depth-related variations in porosity are observed. With the aim of obtaining a textural interpretation of these porosity data, we have developed a method to assess the grain size distribution of the chalk from image analysis. The chalk is composed of a fine-grained matrix of nannofossils and predominantly calcitic fossil debris with larger microfossil grains, but the chalk may also contain significant amounts of silica and siliciclastic clay. For image analysis, we used backscatter electron images of epoxy-impregnated, polished samples from the Ekofisk Formation, Tyra field, Danish North Sea. On backscatter images the calcite phase will appear light as opposed to the dark pore space. The procedure involves the combination of data acquired at two magnifications and by this method analysis of only four images per sample is sufficient. The two applied magnifications result in images measuring 300 μm×400 μm and 30 μm×40 μm, respectively. The method does not build on image analysis alone because the siliciclastic clay is not resolved at these magnifications but will appear grey; and because the total porosity is difficult to assess from image analysis due to rim effects inherent in backscatter images at high magnification. Thus, in order to obtain a consistent interpretation, we use total (He) porosity and insoluble residue as measured in the laboratory. We find that the volume density of larger grains (cross section larger than 316 μm 2) relative to solids (one minus porosity) primarily controls the porosity of the chalk samples.