In scholastic metaphysics, a formal distinction is a distinction intermediate between what is merely conceptual, and what is fully real or mind-independent. It was made by some realist philosophers of the Scholastic period in the thirteenth century, and particularly by Duns Scotus.
Many realist philosophers of the period (such as Aquinas and Henry of Ghent), recognised the need for an intermediate distinction that was not merely conceptual, but not fully real or mind-independent either. Aquinas held that the difference between our concepts arises not just in the mind, but has a foundation in the thing (fundamentum in re). Henry held that there was an 'intentional' distinction (distinctio intentionalis) such that 'intentions' (i.e. concepts) that are distinct in the mind, correspond to things which are potentially distinct in reality.
Scotus argued for a formal distinction (distinctio formalis a parte rei), which holds between entities which are inseparable and indistinct in reality, but whose definitions are not identical. For example, the personal properties of the Trinity are formally distinct from the Divine essence. Similarly, the distinction between the 'thisness' or haecceity of a thing and its existence is intermediate between a real and a conceptual distinction. There is also a formal distinction between the divine attributes and the powers of the soul.
Ockham was opposed to the idea, arguing that whenever there is any distinction or non-identity in reality, then two contradictory statements can be made. But contradictory statements, he goes on arguing, cannot be truly asserted unless the realities they stand for are either (1) distinct real things (2) distinct concepts or (3) a thing and a concept. But if they all exist in reality, they are not distinct concepts, nor are they a real thing and a concept. Therefore, they are distinct in reality.