You can use Session variables to preserve data between page loads. Basically, you put this:
session_start();
at the beginning of every page you want to share variables, then you declare/call them like this:
$_SESSION["number"] = 3;
So, if you post/reload/navigate to another page that is part of the session, $_SESSION["number"] will still be 3 for you to add another 3 to it.
Going one step further though, you typically don't want to submit your result on each number you add as an HTML form. What you probably want to use is an AJAX call to just return the contents of the computed field(s). That way you can calculate in real time without having to reload your whole page since it sounds like that is what you are going for.
jQuery's AJAX method is very good for this.
The way that works is that you have 2 php files, 1 is your view, the other is a controler. The view is the page that stays loaded with your form and what ever other GUI elements there are, and the controller gets called every time you make a change in the view. Instead of returning a whole page, the controller is just the math operations so it will just return the number part of what you are doing and you can reload it into your View whereever you need it.
[FOLLOW UP]
For a simple solution that is pure php/html, try something like this:
<?php
session_start();
If (!isset($_SESSION['start'])) {$_SESSION['start'] = true;}
if ($_GET['clear'] == true || $_SESSION['start'] == true){
$_SESSION['number'] = "";
$_SESSION['start'] = false;
}
if(isset($_GET['number'])){
$_SESSION['number'] = $_SESSION['number'].$_GET['number'];
}
?>
<input type="text" value="<?=$_SESSION['number']?>">