From Latin extensiōn-em, nominalized from extendĕre "to extend" (Oxford English Dictionary).
In the sense of the totality of things to which a word or concept applies, the earliest attestation in English is in Watts (1725): "The extension of an universal Idea regards all the particular Kinds and single Beings that are contained under it."
In this sense, the word is a borrowing from French, and was introduced in the Port-Royal Logic of Arnauld and Nicole (1662):
Mais il faut pareillement considerer icy ce que nous avons déja dit, qu'il faut distinguer dans les idées la comprehension de l'extension, & que la comprehension marque les attributs contenus dans une idée, & l'extension, les sujets qui contiennent cette idée.
(But it is necessary to consider similarly here what we have already said, that it is necessary to distinguish the comprehension from the extension in ideas, and that that the comprehension marks the attributes contained in an idea, and the extension, the subjects which contain that idea.)
Earlier in the book, Arnauld and Nicole had made a similar point, but used the synonymous term étendue rather than extension.
References
- Arnauld, Antoine and Pierre Nicole (1662) La logique, ou L'Art de penser. Jean Guignart, Charles Savreux, & Jean de Lavnay.
- Watts, Isaac (1725) Logick: or, The Right Use of Reason in the Enquiry After Truth. John Clark and Richard Hett