You should absolutely use the eTeX \numexpr option; it's clear and is supported pretty much everywhere.
If you're interested in the original Knuthian TeX, though, there are also arithmetical operators. For the four functions, you use the TeX primitives \advance, \multiply, and \divide, in a pretty unique and, I think, clever way:
\documentclass{article}
\begin{document}
\def\x{30}
\def\y{10}
$\x \div \y =$
\newcount\a\a=\number\x
\newcount\b\b=\number\y
\divide\a by\b
\def\x{\the\a}
$\x$
\end{document}
So first we print the problem we're doing, for demonstrative purposes:
$\x \div \y =$
The next thing we have to do is convert \x and \y (which TeX views as merely the characters 3 and 0, 1 and 0, not as the decimal numbers 30 and 10) into count values, which TeX does view as decimal numbers. So we create two counters, \a and \b, and then assign the decimal number version of our command sequences \x and \y to them with the following code:
\newcount\a\a=\number\x
\newcount\b\b=\number\y
Now that \a and \b have the correct values (30 and 10), we can do our actual arithmetical operation:
\divide\a by\b
\def\x{\the\a}
This does just what it looks like: it divides \a by \b, the quotient being stored in \a. Then we use the \the directive (another TeX primitive) to assign to \x, your control sequence from earlier, the new value of \a. Then, finally, we print our quotient:
$\x$
That prints the following:

TeX offers three primitives for the four arithmetical operations:
\advance\a by\b Does addition.
\advance\a by-\b Does subtraction.
\multiply\a by\b Does multiplication.
\divide\a by \b Does division.
These all work with counters, glue, muglue, and dimensions, and you can even mix them, though you have to be careful when adding, say, a counter to some glue because the stretchability can be lost.
It is important to note that these all deal with integer division; you won't get fractional values. On the other hand, at least with dimens, they work in scaled points, which are quite small, so the granularity is pretty impressive.
\the\numexpr\x/\y\relax? Apart from that, there are packages, for instance\usepackage{expl3} \ExplSyntaxOn \cs_set_eq:NN \fpeval \fp_eval:n \ExplSyntaxOffgives you the power of using in the document\fpeval{\x/\y}– Manuel Jun 02 '15 at 16:11