Step 1: Understanding the Concept:
By definition, a function \(f:X\to Y\) is onto (surjective) when every element of the codomain \(Y\) is the image of at least one element of \(X\).
Step 2: Applying the definition:
This is exactly the statement that the range of \(f\) (the set of all actual outputs) equals the whole codomain \(Y\), not just a subset of it.
Final Answer:
An onto function must have range \(=Y\).\[ \boxed{Y} \]