How do I throw values calculated back to buildForm()?
You can add the following code: 

/**
 * {@inheritdoc}
 */
  public function buildForm(array $form, FormStateInterface $form_state) {
     ...
     if (!empty($form_state-&gt;get('total')) {
       $form['total'] = array(
         '#type' =&gt; 'markup',
         '#markup' =&gt; '&lt;p&gt; Total is: &lt;strong&gt;' . $form_state-&gt;get('total') . '&lt;/strong&gt;&lt;/p&gt;',
       );
     }
    //$header = array(
    //  'total',
    //);
    //$output = array();
    //foreach ($form_state-&gt;getValues() as $key =&gt; $value) {
    //   $output['total'] = $total;
    //}
    //$form['mytable'] = array(
    //  '#type' =&gt; 'table',
    //  '#header' =&gt; $header,
    //  '#rows' =&gt; $output,
    //  '#empty' =&gt; t('No Data'),
    //);
    return $form;
   }


Add the following code to your submit handler:

/**
 * {@inheritdoc}
 */
 public function submitForm(array &amp;$form, FormStateInterface $form_state) {
   ...
    $total = $form_state-&gt;getValue('number1') * $form_state-&gt;getValue('number2');
    $form_state-&gt;set('total', $total);
    $form_state-&gt;setRebuild(TRUE);
    return $form
 }