# L1 loss > A loss function that calculates the absolute value of the difference between actual label values and the values that a model predicts. L1 loss is less sensitive to outliers than L2 loss.[^1] A [loss function](https://wiki.g15e.com/pages/Loss%20function.txt) that calculates the absolute value of the difference between actual [label](https://wiki.g15e.com/pages/Label%20(machine%20learning.txt)) values and the values that a [model](https://wiki.g15e.com/pages/Model%20(machine%20learning.txt)) predicts. L1 loss is less sensitive to [outliers](https://wiki.g15e.com/pages/Outliers.txt) than [L2 loss](https://wiki.g15e.com/pages/L2%20loss.txt).[^1] $$ L_1 loss = \sum_{i=0}^{n} | y_i - \hat{y}_i | $$ where: - $n$ is the number of examples. - $y$ is the actual value of the label. - $\hat{y}$ is the value that the model predicts for $y$. ## See also - [Mean absolute error](https://wiki.g15e.com/pages/Mean%20absolute%20error.txt) is the average L1 loss per example. ## Footnotes [^1]: https://developers.google.com/machine-learning/glossary#l1-loss