JSFiddle - React, Tailwind, and code Playground
HTML
<div>
<h1>Startup Metrics Calculator</h1>
<h2 id="1"></h1>
<p id="2"></p>
<h3 id="3"></h2>
<p id="4"></p>
<h3 id="5"></h2>
<p id="6"></p>
<h3 id="7"></h2>
</div>
<h1 class="put"> <== Put your values in over here.</h1>
CSS
@import url(http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300,300italic,700);
body {
background-color:#E9E9E9;
color: #353535;
font-family: 'Open Sans Condensed', sans-serif;
font-size:1.2em;
}
h3 {
padding-left:20px;
}
div {
padding-left:10%;
padding-right:10%;
width:80%;
text-align:center;
}
.put {
padding-top:50px;
}
JavaScript
// Membership Cost
var membership = 10;
// Starting number of customers
var customers = 10;
// Months projected
var time = 48;
// Percent of customer growth per month
var growth = 10;
// Cost per member per month
var costmember = 1;
// Starting money
var net = 0;
for (month=0;month<time;month++) {
customers+= customers*(growth/100);
net += membership*customers;
net -= membership*costmember;
}
$("#1").text(time + " month projection.");
$("#2").text("Ammount of customers obtained after " + time + " months with a customer acquisition rate of " + growth + "% increase per month.");
$("#3").text(Math.round(customers) + " customers");
$("#4").text("Ammount of money obtained after " + time + " months with membership being $" + membership + " per month, and cost per customer being $" + costmember + ".");
$("#5").text("$"+Math.round(net));
$("#6").text("Income per month at month " + time + ".");
$("#7").text("$"+Math.round(((membership-costmember)*customers)));