%n or Out [n]
is a global object that is assigned to be the value produced on the n^(th) output line.
%
gives the last result generated.
%%
gives the result before last. %%…% (k times) gives the k^(th) previous result.
Out
%n or Out [n]
is a global object that is assigned to be the value produced on the n^(th) output line.
%
gives the last result generated.
%%
gives the result before last. %%…% (k times) gives the k^(th) previous result.
Examples
open all close allBasic Examples (1)
Given a sequence of inputs:
Recall the outputs:
Scope (2)
Applications (1)
Evaluate some expressions:
Evaluate DownValues for Out to see what outputs are stored:
Do the same by looking at Information for Out :
Properties & Relations (5)
A combinations of n % signs is equivalent to Out [-n]:
Referencing an output number greater than the total number of outputs returns unevaluated:
If $HistoryLength is finite, only the $HistoryLength most recent values of Out will have a value:
The value of $Line corresponds to the numbers in In and Out :
See Also
In $Line $HistoryLength MessageList CellLabel EchoEvaluation
Function Repository: ToggleLogInputs
Related Workflows
- Use Previous Outputs in a Computation ▪
- Limit the Amount of History Stored in the System
History
Introduced in 1988 (1.0)
Text
Wolfram Research (1988), Out, Wolfram Language function, https://reference.wolfram.com/language/ref/Out.html.
CMS
Wolfram Language. 1988. "Out." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Out.html.
APA
Wolfram Language. (1988). Out. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Out.html
BibTeX
@misc{reference.wolfram_2025_out, author="Wolfram Research", title="{Out}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/Out.html}", note=[Accessed: 17-November-2025]}
BibLaTeX
@online{reference.wolfram_2025_out, organization={Wolfram Research}, title={Out}, year={1988}, url={https://reference.wolfram.com/language/ref/Out.html}, note=[Accessed: 17-November-2025]}