x-=dx
subtracts dx from x and returns the new value of x.


SubtractFrom 
x-=dx
subtracts dx from x and returns the new value of x.
Details

- x-=dx is equivalent to x=x-dx.
- SubtractFrom has the attribute HoldFirst.
- In SubtractFrom[x,dx], x can be a symbol or other expression with an existing value. »
Examples
open all close allBasic Examples (1)
Scope (4)
Subtract from a numerical value:
Subtract from a symbolic value:
Subtract from all values in a list:
The first argument to SubtractFrom need not be a symbol:
Properties & Relations (3)
SubtractFrom is a short form of this assignment:
PreDecrement is a special case of SubtractFrom:
AddTo is closely related:
Tech Notes
Related Guides
History
Introduced in 1988 (1.0)
Text
Wolfram Research (1988), SubtractFrom, Wolfram Language function, https://reference.wolfram.com/language/ref/SubtractFrom.html.
CMS
Wolfram Language. 1988. "SubtractFrom." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SubtractFrom.html.
APA
Wolfram Language. (1988). SubtractFrom. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SubtractFrom.html
BibTeX
@misc{reference.wolfram_2025_subtractfrom, author="Wolfram Research", title="{SubtractFrom}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/SubtractFrom.html}", note=[Accessed: 08-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_subtractfrom, organization={Wolfram Research}, title={SubtractFrom}, year={1988}, url={https://reference.wolfram.com/language/ref/SubtractFrom.html}, note=[Accessed: 08-August-2025]}