cancels out common factors in the numerator and denominator of expr.

Details and Options

  • Cancel cancels out the greatest common divisor of the numerator and denominator.
  • Cancel[expr,Modulus->p] generates a result modulo p.
  • Cancel[expr,Extension->Automatic] allows operations to be performed on algebraic numbers in expr.
  • Cancel[expr,Trig->True] treats trigonometric functions as rational functions of exponentials, and manipulates them accordingly.
  • Cancel automatically threads over lists, as well as equations, inequalities and logic functions.


open allclose all

Basic Examples  (1)

Cancel common factors:

Scope  (2)

Cancel threads over sums:

Cancel threads over Boolean combinations of equations and inequalities:

Options  (3)

Extension  (1)

By default, Cancel treats algebraic numbers as independent variables:

With Extension->Automatic, Cancel recognizes algebraically dependent coefficients:

Modulus  (1)

Over the rational numbers the numerator and the denominator have no common factors:

Over the integers modulo 2, the denominator divides the numerator:

Trig  (1)

By default, Cancel treats trigonometric functions as independent variables:

With Trig->True, Cancel recognizes dependencies between trigonometric functions:

Properties & Relations  (1)

Cancel cancels common factors between numerators and denominators:

Together combines terms over a common denominator and cancels common factors:

Wolfram Research (1988), Cancel, Wolfram Language function, (updated 2007).


Wolfram Research (1988), Cancel, Wolfram Language function, (updated 2007).


@misc{reference.wolfram_2020_cancel, author="Wolfram Research", title="{Cancel}", year="2007", howpublished="\url{}", note=[Accessed: 18-January-2021 ]}


@online{reference.wolfram_2020_cancel, organization={Wolfram Research}, title={Cancel}, year={2007}, url={}, note=[Accessed: 18-January-2021 ]}


Wolfram Language. 1988. "Cancel." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007.


Wolfram Language. (1988). Cancel. Wolfram Language & System Documentation Center. Retrieved from