Range
Examples
open all close allBasic Examples (3)
Scope (6)
Generalizations & Extensions (2)
Applications (4)
q ^ Range[5]Form a polynomial from coefficients:
coeff = {-2, 9, 5, 3, -3, -6, -7, -4, 8, 3};poly = coeff.x ^ Range[0, Length[coeff] - 1]RandomSample[Range[10]]perm = RandomSample[Range[10]]inverse = perm;
inverse[[perm]] = Range[Length[perm]];
inverseProperties & Relations (2)
Range[imin,imax,di] is equivalent to Table[i,{imin,imax,di}]:
Range[-4, 9, 3]Table[i, {i, -4, 9, 3}]Use Range or Span (;;) as Part specification:
list = {a, b, c, d, e};list[[Range[1, 5, 2]]]list[[1 ;; 5 ;; 2]]Possible Issues (3)
For some step sizes, Range may not include the upper limit given:
Range[0, 10, 3]Even though the lower limit was exact, the inexact step makes the first element inexact:
Range[0, 1, .1]Range accepts Quantity expressions as limits and steps:
Range[Quantity[1, "Meters"], Quantity[9, "Meters"], Quantity[2, "Meters"]]For Quantity expressions, Precision is taken into account when determining whether elements are within the bounds of the limits:
Precision[UnitConvert[Quantity[1, "MagneticFineStructureConstant"]]]Range[Quantity[40, "MagneticFineStructureConstant"]]Length@%See Also
Table Subdivide CoordinateBoundsArray ConstantArray Interval PowerRange CharacterRange FindDivisions Clip
Function Repository: SpanRange ArithmeticProgression
Tech Notes
Related Guides
History
Introduced in 1988 (1.0)
Text
Wolfram Research (1988), Range, Wolfram Language function, https://reference.wolfram.com/language/ref/Range.html.
CMS
Wolfram Language. 1988. "Range." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Range.html.
APA
Wolfram Language. (1988). Range. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Range.html
BibTeX
@misc{reference.wolfram_2026_range, author="Wolfram Research", title="{Range}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/Range.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_range, organization={Wolfram Research}, title={Range}, year={1988}, url={https://reference.wolfram.com/language/ref/Range.html}, note=[Accessed: 12-June-2026]}