Background Socioeconomic position inequalities in infant mortality are well known, but there is less information on how child mortality is socially patterned by sex and age. Objective To assess maternal and paternal socioeconomic inequalities in mortality by sex, whether these differences vary by age and country, and how much of the sex differences can be explained by external causes of death. Methods Data on all live-born children were received from national birth registries for 1981-2000 (Denmark: n=1 184 926; Norway: n=1 090 127; and Sweden n=1 961 911) and for 1987-2000 (Finland: n=841 470). Data on the highest level of education in 2000 were obtained from national education registers, and data on mortality and causes of death were received from the national cause-of-death registers until the end of follow-up (20 years or 2003). Results Boys had a higher child and adolescent mortality than girls. The children of mothers and fathers who had had the shortest education time had the highest mortality for both sexes and for all ages and countries. The differences between the groups with longer than basic education were smaller, particularly among older children and girls. The gradient in mortality was mostly similar for boys and girls. Among 1-19-year-olds, 32% of boys' deaths and 27% of girls' deaths were due to external causes. Conclusion Boys' excess mortality was only partly explained by educational inequalities or by deaths from external causes. A more detailed analysis is needed to study whether the share of avoidable deaths is higher among children whose parents have had a shorter education time.