English

# Convert Trillions to Billions

Online conversion script which helps to convert numbers from trillions to billions quickly.

# Features

• Use this conversion script to convert numbers from trillions to billions.
• Enter the number in the text box. Conversion script will show the entered value in trillions and also converts it into billions.
• Online converter for quick and easy numeric conversion.

# Preview

## Trillions to Billions Conversion

is equal to
in billions
Convert to

Code
<!-- Script by hscripts.com -->
<html>
<title>Convert from trillions to billions </title>
<style>
body {
background:#fff;
font: .81em/150% Tahoma, Geneva, sans-serif;
color: #666;
word-wrap:break-word;
}
.frms
{
margin:0 auto;
border:#ddd 1px solid;
font-family:Tahoma, Geneva, sans-serif;
color:#333;
font-size:.9em;
line-height:1.2em;
}

{
width:99%;
background:#fff;
border:#ddd 1px solid;
margin-top:5px;
margin-bottom:15px;
height:35px;
}

textarea
{
width:99%;
height:auto;
background:#fff;
border:#ddd 1px solid;
margin-top:5px;
margin-bottom:15px;
}

.frms input:hover,textarea:hover,select:hover
{
}
.frms input:focus,textarea:focus,select:focus
{
-webkit-box-shadow: inset 7px 4px 7px -7px rgba(0,0,0,0.42);
-moz-box-shadow: inset 7px 4px 7px -7px rgba(0,0,0,0.42);
box-shadow: inset 7px 4px 7px -7px rgba(0,0,0,0.42);

border:#9d9983 1px solid;
}
.frms input[type="file"]
{
width:99.6%;
}
.frms input[type="submit"],input[type="reset"],input[type="button"],button,.yellow_button,.blue_button
{
font-weight:bold;
color:#fff;
cursor:pointer;
margin:10px 0;
border:none;
}
.frms input[type="submit"]
{
background:#75ab22;
border-bottom:#629826 3px solid;
}
.frms input[type="reset"]
{
background:#ee765d;
border-bottom:#d95e44 3px solid;
}
input[type="button"],button,.blue_button
{
background:#468cd2;
border-bottom:#3277bc 3px solid;
}
.input_text_class
{
width:99%;
background:#fff;
border:#ddd 1px solid;
margin-top:5px;
margin-bottom:15px;
height:35px;
}

.butt
{
background:#468cd2;
border-bottom:#3277bc 3px solid !important;
}
.yellow_button
{
background:#f0ca45 !important;
border-bottom:#d9b127 3px solid !important;
color:#d34021 !important;
}
.frms select
{
width:100%;
}
.frms textarea
{
min-height:200px;
font-family:Tahoma, Geneva, sans-serif;
font-size:1.31em;
line-height:18px;
}
.frms label
{
font-size:1.3em;
}
.btns
{
text-align: center;
}
.other_conv
{
width:35% !important;
}
@media screen and (max-width: 1000px)
{
.other_conv
{
width:98% !important;
}
.btns
{
float: left;
}
}
</style>
<script LANGUAGE='JavaScript'>
function isNum(arg)
{
var args = arg;

if (args == '' || args == null || args.length == 0)
{
return false;
}

args = args.toString();

for (var i = 0; i<args.length; i++)
{
if (args.substring(i,i+1) < '0' || args.substring(i, i+1) > '9')
{
if(args.substring(i, i+1) == '.')
{
else
return false;
}
else
{
return false;
}
}
}
return true;
}

function rest()
{
document.first.inp.value='';
document.first.ev.value='';
document.first.va.value='';
document.first.outp.value='';

}
function to(v,type)
{
var value = v;
if(type == 'thousands')
value = value*10;
else if(type == 'lakhs')
value = value*1000;
else if(type == 'millions')
value = value*10000;
else if(type == 'crores')
value = value*100000;
else if(type == 'billions')
value = value*10000000;
else if(type == 'trillions')
value = value*10000000000;

return value;
}

function clear_all()
{
document.first.inp.value = 0;

}
function informat()
{
var sds = document.getElementById("dum");
if(sds == null){
alert("You are using a free package. You are not allowed to remove the tag.");
}
var sdss = document.getElementById("dumdiv");
if(sdss == null){
alert("You are using a free package. You are not allowed to remove the tag.");
}
if(sdss != null){
var val = document.first.inp.value;

if(!isNum(val))
{
val = val.substring(0, val.length-1);
document.first.inp.value = val;
clear_all();
}
else
{
var opt = document.first.opt.value;
if(opt=='thousands')
document.first.va.value = val*1000;
else if(opt=='lakhs')
document.first.va.value = val*100000;
else if(opt=='millions')
document.first.va.value = val*1000000;
else if(opt=='crores')
document.first.va.value = val*10000000;
else if(opt=='billions')
document.first.va.value = val*1000000000;
else if(opt=='trillions')
document.first.va.value = val*1000000000000;
if (val<=1) {
opt=opt.substring(0, opt.length - 1)
}

document.first.ev.value = val+' '+opt;

}
}
}
function convert()
{
var sds = document.getElementById("dum");
if(sds == null){
alert("You are using a free package. You are not allowed to remove the tag.");
}
var sdss = document.getElementById("dumdiv");
if(sdss == null){
alert("You are using a free package.You are not allowed to remove the tag.");
}
if(sdss != null){
var val = document.first.inp.value;

if(!isNum(val))
{
val = val.substring(0, val.length-1);
document.first.inp.value = val;
clear_all();
}
else
{
var opt = document.first.opt.value;
var opt1 = document.first.opt1.value;
if(opt=='thousands')
document.first.va.value = val*1000;
else if(opt=='lakhs')
document.first.va.value = val*100000;
else if(opt=='millions')
document.first.va.value = val*1000000;
else if(opt=='crores')
document.first.va.value = val*10000000;
else if(opt=='billions')
document.first.va.value = val*1000000000;
else if(opt=='trillions')
document.first.va.value = val*1000000000000;

var con = to(val,opt);
var outp=0;
var outpunit=opt1;
if(opt1=='thousands')
{
outp = con/10;
if (outp<=1) {
outpunit='thousand';
}
}
else if(opt1=='lakhs')
{
outp= con/1000;
if (outp<=1) {
outpunit='lakh';
}
}
else if(opt1=='crores')
{
outp = con/100000;
if (outp<=1) {
outpunit='crore';
}
}
else if(opt1=='millions')
{
outp= con/10000;
if (outp<=1) {
outpunit='million';
}
}
else if(opt1=='billions')
{
outp= con/10000000;
if (outp<=1) {
outpunit='billion';
}
}
else if(opt1=='trillions')
{
outp = con/10000000000;
if (outp<=1) {
outpunit='tillion';
}
}
document.first.outp.value =outp;
document.getElementById("outpunit").innerHTML=outpunit;
}
}
}

<h2 align='center'>Trillions to Billions Conversion</h2><div class='frms' style='text-align: left;'>
<form name=first>

<div class='clear'></div>
<label>Enter Value : (in trillions)</label>
<input type='text' value='' id='num' name='inp' onkeyup='informat()'> <div class='clear'></div>

<input type='hidden' value='trillions' id='from' name='opt'>
<input type='hidden' value='billions' id='to' name='opt1'><div class='clear'></div>
<div class='btns'><input type='button' value="Convert to billions" onclick='convert()'>
<input type='button' value="Reset" onclick='rest()' style='background:#f27669 none repeat scroll 0 0;border-bottom: 3px solid #d96a5d;'></div>

<div class='clear'></div>

<input type='text' value='' id='outp' name='outp' readonly='readonly' style='width:72%;'> <span id='outpunit' > in billions</span><div class='clear'></div>

</form>
</div>
</body>
<html>

• Release Date - 10-06-2015
• For customization of this script or any script development, mail to support@hscripts.com

# Usage

• Enter the values and click "Convert to billions" button to get the result in billions.
• Just copy and paste the codes to your webpage.
• Use the simple conversion script to convert huge value from trillions to billions.