diff --git a/variable.variable.inc b/variable.variable.inc
index 0ab3331..d03679e 100644
--- a/variable.variable.inc
+++ b/variable.variable.inc
@@ -93,6 +93,7 @@ function variable_variable_type_info() {
     'element' => array('#type' => 'textfield', '#size' => 15, '#maxlength' => 10),
     'token' => TRUE,
     'validate callback' => 'variable_validate_number',
+    'format callback' => 'variable_format_number',
   );
   // Select multiple options from multiple choices
   $type['options'] = array(
@@ -275,6 +276,21 @@ function variable_format_empty($variable) {
 }
 
 /**
+ * Format variable as number.
+ */
+function variable_format_number($variable, $options = array()) {
+  if (is_numeric($variable['value'])) {
+    return (string)$variable['value'];
+  }
+  elseif (empty($variable['value'])) {
+    return '';
+  }
+  else {
+    return check_plain($variable['value']);
+  }
+}
+
+/**
  * Format variable as string. Either check plain for filter_xss.
  */
 function variable_format_string($variable, $options = array()) {
