%n or Out[n]
is a global object that is assigned to be the value produced on the n
output line.
%
gives the last result generated.
%%
gives the result before last. %%…% (k times) gives the k
previous result.
Out 
%n or Out[n]
is a global object that is assigned to be the value produced on the n
output line.
%
gives the last result generated.
%%
gives the result before last. %%…% (k times) gives the k
previous result.
Examples
open all close allBasic Examples (1)
Scope (2)
1 + 12 + 2Return the most recent and second most recent outputs using % and %%, respectively:
{%, %%}Refer to the second and third most recent outputs using the FullForm Out[-n]:
{Out[-2], Out[-3]}1 21 2 3Refer to the outputs using Out with explicit positive integer arguments:
{Out[1], Out[2]}Applications (1)
a = 1;Prime[10]Integrate[x^2, x]Evaluate DownValues for Out to see what outputs are stored:
DownValues[Out]Do the same by looking at Information for Out:
??OutProperties & Relations (5)
A combinations of n % signs is equivalent to Out[-n]:
1 + 2;
2 + 3;
{Out[-1], Out[-2]} === {%, %%}Hold[%] === Hold[Out[]]Referencing an output number greater than the total number of outputs returns unevaluated:
Out[5]If $HistoryLength is finite, only the $HistoryLength most recent values of Out will have a value:
$HistoryLength = 2;
1 + 1;
2 + 2;
3 + 3;
Table[Out[n], {n, 4}]
$HistoryLength=.The value of $Line corresponds to the numbers in In and Out:
1 + 1$LineSee 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_2026_out, author="Wolfram Research", title="{Out}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/Out.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_out, organization={Wolfram Research}, title={Out}, year={1988}, url={https://reference.wolfram.com/language/ref/Out.html}, note=[Accessed: 12-June-2026]}