How does the formal definition of sociology distinguish it from other disciplines?
As the name "sociology" suggests, Sociology is a social and not an exact science (such as Physics or Chemistry). Due to empirical (measurable) study, analysis and research methodology, accurate interpretations of human behavior in specific circumstances can be attained. It is the study (hence the word ends in "ology")
of society, its behavior, its culture, its categories, its institutions
the outcomes of which all affect individual attitudes and responses in group situations.
Sociology is a scientific understanding of a social concept. Hence, it involves behavior.It is distinct from, for example psychology which studies the mind. Sociology involves the origins of society and group interaction and is based on observation rather than an individual's response to a situation based on the complex interpretations of the mind. Sociology studies the individual's behavior within a group and how that group affects him.
People do behave differently according to the circles within which they mix and sociology attempts to quantify this.
The definition of sociology also excludes, to an extent, ancient customs and cultures and how they affect individuals and groups, making it distinct from anthropology.
the methodological study of social facts, processes, and actions
ensuring that it can in itself remain a distinct social science, indispensible in the understanding of society as a whole.