code: public function priceNetto($brutto, $tax)
      {
          $tax = round((double) $tax / 100.0, 2);
  
          if ($tax < 0.00) {
              throw new Exception(sprintf('Tax must be greater than or equal to 0, given %s.', $tax));
          }
  
          if ($tax === 0.00) {
              return $brutto;
          }
  
          $result = $brutto / ($tax + 1);
          
          return round($result, 2, PHP_ROUND_HALF_UP);
      }
docs: Count price netto from brutto by tax
  
  @param double $price
  @param int $tax
  @return double
  @throws \Extlib\Exception