Table
✖
Table
Details

- You can use Table to build up vectors, matrices, tensors, and other arrays.
- Table uses the standard Wolfram Language iteration specification.
- Table evaluates its arguments in a nonstandard way.
- Table[expr,spec] first evaluates spec, then localizes the variable specified and successively assigns values to it, each time evaluating expr.
- Table effectively uses Block to localize values or variables.
- Table[expr,spec1,spec2] is effectively equivalent to Table[Table[expr,spec2],spec1].
- Parallelize[Table[expr,iter]] or ParallelTable[expr,iter] computes Table[expr,iter] in parallel on all subkernels. »
Examples
open allclose allBasic Examples (6)Summary of the most common use cases
A table of the first 10 squares:

https://wolfram.com/xid/0gisaa-j9w

A table with running from 0 to 20 in steps of 2:

https://wolfram.com/xid/0gisaa-bd0


https://wolfram.com/xid/0gisaa-dm0


https://wolfram.com/xid/0gisaa-uth


https://wolfram.com/xid/0gisaa-nux


https://wolfram.com/xid/0gisaa-nd9


https://wolfram.com/xid/0gisaa-nor

Scope (6)Survey of the scope of standard use cases
The index in the table can run backward:

https://wolfram.com/xid/0gisaa-b2n


https://wolfram.com/xid/0gisaa-eu6


https://wolfram.com/xid/0gisaa-fpi

Make a 3×2×4 array, or tensor:

https://wolfram.com/xid/0gisaa-n5r

Iterate over an existing list:

https://wolfram.com/xid/0gisaa-ragly9

Make an array from existing lists:

https://wolfram.com/xid/0gisaa-cdobrh

Table evaluates the expression separately each time:

https://wolfram.com/xid/0gisaa-ui1ns7

Generalizations & Extensions (3)Generalized and extended use cases
The table index can have symbolic values:

https://wolfram.com/xid/0gisaa-bql

The variables need not just be symbols:

https://wolfram.com/xid/0gisaa-ebk


https://wolfram.com/xid/0gisaa-wez

ParallelTable computes Table in parallel:

https://wolfram.com/xid/0gisaa-oejvh4

Table can be parallelized automatically, effectively using ParallelTable:

https://wolfram.com/xid/0gisaa-q0irvc

Applications (4)Sample problems that can be solved with this function

https://wolfram.com/xid/0gisaa-kf5

Generate the corners of a polygon:

https://wolfram.com/xid/0gisaa-e3k


https://wolfram.com/xid/0gisaa-bdb

Compare font sizes from 10 points to 20 points:

https://wolfram.com/xid/0gisaa-p5y

Properties & Relations (13)Properties of the function, and connections to other functions
Display of Tables (5)
Use ListPlot, ListLinePlot and similar functions to visualize numeric tables:

https://wolfram.com/xid/0gisaa-s1u

Use Grid to format a two-dimensional table:

https://wolfram.com/xid/0gisaa-irs

Two-dimensional numeric tables can be visualized with ArrayPlot and MatrixPlot:

https://wolfram.com/xid/0gisaa-dqz

Print the values of the table index while the table is being generated:

https://wolfram.com/xid/0gisaa-utg

Monitor the values by showing them in a temporary cell:

https://wolfram.com/xid/0gisaa-dkpurk

Relations to Other Functions (5)
Range gives the sequence of values of a table iterator:

https://wolfram.com/xid/0gisaa-e5a


https://wolfram.com/xid/0gisaa-naf

Do evaluates the same sequence of expressions as Table, but does not return them:

https://wolfram.com/xid/0gisaa-x10

https://wolfram.com/xid/0gisaa-ugy

Sum effectively applies Plus to results from Table:

https://wolfram.com/xid/0gisaa-ec


https://wolfram.com/xid/0gisaa-ic5

Array iterates over successive integers:

https://wolfram.com/xid/0gisaa-wzj


https://wolfram.com/xid/0gisaa-mww


https://wolfram.com/xid/0gisaa-uvj

Map applies a function to successive elements in a list:

https://wolfram.com/xid/0gisaa-k99str


https://wolfram.com/xid/0gisaa-cfm7sr

Table can substitute successive elements in a list into an expression:

https://wolfram.com/xid/0gisaa-ep4419

Nested Tables (1)
Using multiple iteration specifications is equivalent to nesting Table functions:

https://wolfram.com/xid/0gisaa-rxa


https://wolfram.com/xid/0gisaa-g7s

Programmatic Table Construction (2)
Feed in parameters for tables:

https://wolfram.com/xid/0gisaa-ji1


https://wolfram.com/xid/0gisaa-gdd

Use Apply to splice a complete iterator specification into Table:

https://wolfram.com/xid/0gisaa-nti


https://wolfram.com/xid/0gisaa-fv4

With can insert the specification for a single iterator:

https://wolfram.com/xid/0gisaa-s8f

Possible Issues (6)Common pitfalls and unexpected behavior
For some step sizes, output from Table may not include the upper limit given:

https://wolfram.com/xid/0gisaa-efvbkl

Table requires list iterator specifications to be given explicitly:

https://wolfram.com/xid/0gisaa-n1x


Forcing early evaluation of the list resolves the issue:

https://wolfram.com/xid/0gisaa-n96

Alternatively, using With to lexically replace p with its list form:

https://wolfram.com/xid/0gisaa-j9n

Table normally reevaluates at each step:

https://wolfram.com/xid/0gisaa-hnl


https://wolfram.com/xid/0gisaa-q4b

The Evaluate is needed to force evaluation of the table before it is fed to Plot:

https://wolfram.com/xid/0gisaa-vi0


https://wolfram.com/xid/0gisaa-synfm

Values of Table variables do not get substituted inside held expressions:

https://wolfram.com/xid/0gisaa-y9z

Use With to insert values:

https://wolfram.com/xid/0gisaa-whw

Formatting wrappers such as Grid give expressions that are no longer lists:

https://wolfram.com/xid/0gisaa-wbv


https://wolfram.com/xid/0gisaa-ve7


https://wolfram.com/xid/0gisaa-ltw

Wolfram Research (1988), Table, Wolfram Language function, https://reference.wolfram.com/language/ref/Table.html (updated 2015).
Text
Wolfram Research (1988), Table, Wolfram Language function, https://reference.wolfram.com/language/ref/Table.html (updated 2015).
Wolfram Research (1988), Table, Wolfram Language function, https://reference.wolfram.com/language/ref/Table.html (updated 2015).
CMS
Wolfram Language. 1988. "Table." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/Table.html.
Wolfram Language. 1988. "Table." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/Table.html.
APA
Wolfram Language. (1988). Table. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Table.html
Wolfram Language. (1988). Table. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Table.html
BibTeX
@misc{reference.wolfram_2025_table, author="Wolfram Research", title="{Table}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/Table.html}", note=[Accessed: 30-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_table, organization={Wolfram Research}, title={Table}, year={2015}, url={https://reference.wolfram.com/language/ref/Table.html}, note=[Accessed: 30-March-2025
]}