$grid-width: 40px;
$gutter-width: 10px;

@function grid-width($n) {
  @return $n * $grid-width + ($n - 1) * $gutter-width;
}

.grid1{
  display: block;
  width: grid-width(1);
}
.grid2{
  display: block;
  width: grid-width(2);
}

<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <link rel="stylesheet" href="style.css" title="" type="" />
</head>

<body>
  <div class="grid1">
    <p><strong>left div</strong></p>
  </div>
  <div class="grid2">
    <p><strong>right div</strong></p>
  </div>
</body>

</html>