A preference in parents for a son is thought to affect their fertility. However, even if parents do not have a preference for a son, the people who surround them possibly have a preference for a son. In this case, social pressure can influence parents’ behavior and fertility. This study explored how social pressure related to the sex of children affects fertility. Effects of social pressure were compared between the pre- and post-World War II generations in Japan. The dependent variable was the number of children in the regression equation. A dummy variable for the first child, which was set to 1 when the first child was a boy, and a dummy variable for the preference for a son were included as independent variables. Social pressure was considered to exist when the dummy variable for the first child had a significant negative sign. The key findings are as follows: in the pre-war generation, if the first child was a daughter, the total number of children tended to increase not only when the mother preferred a son, but also when the mother did not have a preference for either gender. This tendency was not observed for the post-war generation.