---
title: "-="
root: "/v5.1"
layout: "default"
description: "Swift documentation for '-='"
keywords: ""
---

<div class="intro-declaration"><code class="language-swift">func -=(lhs:rhs:)(lhs: inout Int, rhs: Int)</code></div><div class="discussion comment"><p>Subtracts the second value from the first and stores the difference in the
left-hand-side variable.
</p>
<p>The difference of the two arguments must be representable in the
arguments' type. In the following example, the result of <code>21 - 50</code> 