In the stochastic calculus, Tanaka's formula for the Brownian motion states that
 
where Bt is the standard Brownian motion, sgn denotes the sign function
 
and Lt is its local time at 0 (the local time spent by B at 0 before time t) given by the L2-limit
![{\displaystyle L_{t}=\lim _{\varepsilon \downarrow 0}{\frac {1}{2\varepsilon }}|\{s\in [0,t]|B_{s}\in (-\varepsilon ,+\varepsilon )\}|.}](./3c71cc9a8a4cf65bd6e1664ff017b35d9272953e.svg) 
One can also extend the formula to semimartingales.