x+=dx
adds dx to x and returns the new value of x.
AddTo 
x+=dx
adds dx to x and returns the new value of x.
Examples
open all close allBasic Examples (1)
k = 1;k += 5kScope (4)
x = 1.5; x += 3.75;xv = a;v += b;vx = {1, 2, 3}x += 17;xx += {20, 21, 22};xThe first argument to AddTo need not be a symbol:
list = {1, 2, 3}list[[2]] += clistApplications (1)
Properties & Relations (4)
AddTo is a short form of this assignment:
k = 1;
k = k + 5PreIncrement is a special case of AddTo:
k = 1;
k += 1++kSubtractFrom is closely related:
k = 10;
k += -5k -= 5A related operation for lists is AppendTo:
list = {1, 2, 3};AppendTo[list, 4];
listSee Also
Increment PreIncrement Set PrependTo Plus SubtractFrom TimesBy ApplyTo
Tech Notes
Related Guides
History
Introduced in 1988 (1.0)
Text
Wolfram Research (1988), AddTo, Wolfram Language function, https://reference.wolfram.com/language/ref/AddTo.html.
CMS
Wolfram Language. 1988. "AddTo." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AddTo.html.
APA
Wolfram Language. (1988). AddTo. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AddTo.html
BibTeX
@misc{reference.wolfram_2026_addto, author="Wolfram Research", title="{AddTo}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/AddTo.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_addto, organization={Wolfram Research}, title={AddTo}, year={1988}, url={https://reference.wolfram.com/language/ref/AddTo.html}, note=[Accessed: 12-June-2026]}