How to create percentage calculator
May 14, 2026
/
Dainius K.
/
5 min Read
A percentage calculator helps users quickly calculate discounts, increases, decreases, ratios, and percentage changes. Instead of doing manual math, users can enter values and instantly get accurate results.
With AI and vibe coding, you can describe how the calculator should work — input fields, formulas, result cards, and use-case tabs — and instantly create a working web application. You focus on the calculation logic while AI builds the interface.
Using Hostinger Horizons, you can create, customize, and publish your percentage calculator without writing code. Add multiple calculator modes, clear result explanations, and mobile-friendly layouts through simple follow-up prompts.
TL;DR: How do you create percentage calculator fast?
- Define the calculation types. Decide whether users need percentage of a number, percentage increase, percentage decrease, or discount calculations.
- Generate the calculator interface with AI. Prompt Hostinger Horizons to build input fields, result cards, and calculation tabs.
- Add percentage formulas. Automatically calculate results based on the selected mode.
- Publish and start calculating. Launch the web app so users can solve percentage problems instantly.

Step 1: Define the problem your percentage calculator solves
Start by identifying which percentage problems users need to solve.
This tool helps students, shoppers, business owners, marketers, and finance teams do quick percentage calculations so they can save time and avoid manual math errors.
For example:
- Shoppers can calculate discounts. This helps them understand final prices during sales.
- Businesses can calculate price increases. This supports pricing and revenue planning.
- Students can solve percentage problems. This makes everyday math easier to understand.
Define whether your calculator focuses on basic math, shopping discounts, business pricing, or all-purpose percentage calculations.
Step 2: Outline what to include in the first version of your percentage calculator
Focus on the most common calculations.
- Percentage of a number. Let users calculate values like 20% of 150 for quick everyday math.
- Percentage increase calculator. Help users calculate how much a value has grown compared to the original number.
- Percentage decrease calculator. Allow users to measure reductions, discounts, or performance drops.
- Result explanation. Show the calculation steps so users understand how the result was found.
Start simple, then add more advanced modes later.
Step 3: Create a user flow from start to finish
Design the calculator experience clearly.
- Landing → User opens the percentage calculator and sees calculation options.
- Input → User selects a calculator type and enters numbers.
- Processing → System applies the correct percentage formula.
- Result → User sees the answer and a short explanation.
- Next step CTA → User can reset, calculate another value, or switch calculator type.
Step 4: Generate the first version with Hostinger Horizons
Open Hostinger Horizons and clearly describe your calculator.
For example: “Create a percentage calculator web app with modes for percentage of a number, percentage increase, percentage decrease, and discount calculation.”
Horizons will generate a working preview where you can test inputs, formulas, and result formatting.
You can refine the calculator with prompts such as:
- “Add a discount price calculator.”
- “Show calculation steps under each result.”
- “Add tabs for different percentage calculation types.”
This is where vibe coding helps you quickly improve the tool based on real use cases.
Step 5: Customize the design and layout
Make the calculator simple and easy to scan.
- Use separate tabs for each calculation type. This keeps the interface clean and prevents input confusion.
- Highlight the final result. Users should instantly see the answer after entering values.
- Add formula explanations. Short explanations make the tool more useful for students and business users.
- Ensure mobile-friendly input fields. Percentage calculators are often used quickly on phones.
Use the select-and-edit feature in Hostinger Horizons to refine the form layout and result cards.
Step 6: Add logic, calculations, or scoring
Percentage calculators rely on accurate formulas.
- Percentage of a number formula. Multiply the number by the percentage and divide by 100.
- Percentage increase formula. Compare the difference between new and old values against the original value.
- Percentage decrease formula. Calculate how much a value dropped relative to the starting value.
- Discount calculation logic. Subtract the discount amount from the original price to show the final price.
Prompt example:
“Add tabs for percentage of a number, percentage increase, percentage decrease, and discount calculation.”
Step 7: Test your percentage calculator before publishing
Test each calculator mode with known examples.
Make sure the results are accurate and update instantly when users change inputs.
Checklist:
- Percentage of a number calculates correctly. Simple examples should return expected results.
- Increase and decrease formulas work. Results should compare old and new values accurately.
- Discount calculator shows final price. Users should see both savings and final cost.
- Mobile layout works smoothly. Inputs and results should be easy to use on small screens.
If issues appear, use follow-up prompts in Hostinger Horizons to fix formulas or layout.
Step 8: Publish and share your percentage calculator
Once the calculator works properly, click Publish.
You can host it on your own domain and share it as a public utility tool.
Common use cases include:
- Shopping discount calculators.
- Student math tools.
- Business pricing calculators.
- Marketing performance calculators.
Step 9: Improve your percentage calculator after launch
Once users start using the calculator, expand it based on common needs.
Possible upgrades include:
- Sales tax calculator.
- Tip percentage calculator.
- Profit percentage calculator.
- Percentage comparison charts.
These improvements can be added through follow-up prompts in Hostinger Horizons.
Why should you create percentage calculator?
A percentage calculator is a simple but useful web app for everyday math.
It allows users to:
- Calculate discounts quickly.
- Compare value changes.
- Understand increases and decreases.
- Avoid manual calculation mistakes.
Percentage calculators are useful for students, shoppers, business owners, finance teams, and marketers.
What features should a good percentage calculator include?
- Multiple calculation modes. Support percentage of a number, increase, decrease, and discount calculations.
- Clear input fields. Make it obvious which values users need to enter.
- Instant result display. Show answers immediately after calculation.
- Formula explanations. Help users understand the math behind each result.
- Mobile-friendly design. Make the tool fast and easy to use anywhere.
What initial prompt should you use to build percentage calculator in Horizons?
Use the prompt below in Hostinger Horizons to generate your percentage calculator web app. Simply copy and paste it into the chat to create your first working version instantly. As you build, you can add follow-up prompts to adjust features, refine the layout, or customize logic based on your calculation needs using vibe coding.
Prompt example:
Create a percentage calculator web app. Include calculator modes for: - Percentage of a number - Percentage increase - Percentage decrease - Discount calculation Allow users to enter values for each calculation type. Automatically calculate and display the result. Show a short explanation of the formula used. Add a reset button. Make the design clean, modern, and mobile-friendly.
Pre-filled prompt template example:
Create a percentage calculator web app for everyday use. Include tabs for discount calculator, percentage increase, percentage decrease, and percentage of a number. For discounts, show original price, discount amount, savings, and final price. For increases and decreases, show the percentage change between two values. Display results in clear summary cards with short formula explanations. Make the interface simple, fast, and mobile-friendly.
What are common mistakes to avoid when building percentage calculator?
Percentage calculators should be accurate and easy to understand.
- Mixing up input labels. Users need to know which field is the original value, new value, percentage, or final price.
- Incorrect increase/decrease formulas. Percentage change calculations must compare against the original value.
- No formula explanation. Users may trust the result more when they see how it was calculated.
- Too many modes on one screen. Tabs or sections keep the calculator easier to use.
- Poor mobile usability. Small input fields make quick calculations frustrating.
- No reset option. Users should be able to clear values and start again quickly.
How can you leverage Hostinger Horizons to build percentage calculator?
- Use AI chat to refine calculator modes. Add discount, tax, tip, or comparison formulas through simple prompts.
- Automatically improve interface layout. Adjust tabs, result cards, and input spacing without coding.
- Add educational explanations. Include formula notes to make the tool useful for students.
- Scale into a calculator suite. Combine percentage, mortgage, ROI, and profit margin calculators.

What other tools can you build with Hostinger Horizons?
- Create a mortgage calculator. Help users estimate monthly home loan payments, interest, and total repayment costs.
- Create a profit margin calculator. Let business owners calculate margins, markup, revenue, and profit quickly.
- Create an ROI calculator. Build a tool that estimates returns from campaigns, projects, or investments.
- Create a price quote calculator. Generate instant service or product estimates based on custom pricing rules.
- Build a KPI dashboard. Track business performance metrics and visualize trends over time.
All of the tutorial content on this website is subject to Hostinger's rigorous editorial standards and values.