PromptBase
Close icon
General
Home
Marketplace
Hire
Create
Login
Sell
Explore
🤖 GPT

Creating A Investment Calculator

Creating A Investment Calculator gpt prompt mini thumbnail
38Eye icon
Views
GPT-3.5-TURBO
TestedTick icon
TipsTick icon
The prompt creates usable code for an investment/compound interest calculator you can put on a website. It gives you HTML, CSS, and JavaScript which are all needed for the calculator. Additional prompts will design it to your specifications (color, etc.). It requires NO previous knowledge of coding as with additional prompts it will fill the gaps in which you don not understand what to do.
...more
$15.99
Get prompt
After purchasing, you will gain access to the prompt file which you can use with GPT or the app builder. You'll receive 20 free generation credits with this purchase. By purchasing this prompt, you agree to our terms of service.
Over 1 month ago

Prompt Details

Model
Chat - GPT-3.5 (gpt-3.5-turbo)
Token size
71 ($0.00010 / call)
Example input
[Hosting Site]: Square space, [Color 1]: Black, [Color 2]: White
Example output
To create an investment calculator that allows for annual additions and interest payments, you can follow these steps: function calculate() { // Get form field values var initialAmount = parseFloat(document.getElementById("initial-amount").value); var annualAdditions = parseFloat(document.getElementById("annual-additions").value); var interestRate = parseFloat(document.getElementById("interest-rate").value); var frequency = parseInt(document.getElementById("frequency").value); // Calculate investment value var years = 10; // Change this to the number of years the investment will be held var investmentValue = (initialAmount + (annualAdditions * years)) * Math.pow((1 + (interestRate / frequency)), (years * frequency)); // Display result document.getElementById("investment-value").value = "$" + investmentValue.toFixed(2); } To use this code, you can copy and paste the HTML,
Browse Marketplace