Directory / plugin
Yangra Calculator
v1.0.0 · by Suman Bhattarai
Build pricing estimators, quote tools and ROI calculators from your own inputs and formulas, then add them to any page with a block or shortcode.
About this plugin
Yangra Calculator lets you build calculators for your visitors without writing code. Add the inputs you need, write a formula for each result, and place the calculator on any page. Results update as visitors type.
Use it for:
- Price estimators: cleaning, painting, printing, moving, catering, web design.
- Quote tools: a starting price plus options and add-ons.
- ROI and savings calculators: show what a customer gains by switching to you.
- Finance and health tools: loan repayments, tax, BMI, calories, unit conversions.
Visual builder
Build each calculator on its own screen in the admin, with a live preview of the result. Every change is checked before it is saved. If a formula has a mistake, the builder points to it and nothing you typed is lost. Calculators keep revisions, so you can go back to an earlier version.
Inputs
- Number: a typed value, with optional minimum, maximum and step.
- Slider: a range between a minimum and a maximum.
- Dropdown: options with a label for visitors and a number for formulas, such as “Premium” = 49.
- Checkbox: counts as 1 when ticked and 0 when not, which suits add-ons.
Start from a template
“Add New” opens a choice of ready-made calculators to change to fit: flooring estimate, hourly service quote, how much can I borrow, sales tax, profit margin and markup, return on investment, BMI, daily calories, tip and bill split, and trip fuel cost. Or start from scratch with an empty calculator.
Formulas
Formulas use the input names you choose, for example:
area * price_per_m2 + if(rush, 50, 0)
- Arithmetic:
+ - * / % ^and brackets. - Comparisons and logic:
== != < > <= >= && || ! - Functions:
if,min,max,round,floor,ceil,abs,sqrt,clamp. - A result can use any result above it, so you can split long formulas into steps. Tick “Hide from visitors” on the in-between steps so visitors only see the final figure.
- Each result has its own decimal places, prefix and suffix, such as
$or/ month. Numbers use your site language’s decimal and thousands separators.
Keep your formulas private
Each calculator can compute results in one of two ways:
- In the visitor’s browser (default): results update instantly. The formulas are included in the page.
- On your server: formulas and hidden results never leave your site. The page sends the values entered and shows the results that come back, after a short pause.
You can choose which mode new calculators start with under Yangra Calculator Settings.
Add it anywhere
- Calculator block: pick a calculator in the block editor and style it with colours, spacing and font size.
- Shortcode:
[yangra_calculator id="123"]works in classic content, widgets and page builders. The All Calculators screen shows each calculator’s shortcode, ready to copy.
Lightweight and private
- No tracking or cookies on your visitors. Diagnostic data is shared with Freemius only if you opt in.
- Scripts and styles load only on pages that show a calculator.
- Values entered by visitors are not stored.
Source code
The minified files in build/ are compiled from the human-readable source in assets/src/ using @wordpress/scripts (npm run build).
The plugin includes the Freemius WordPress SDK (version 2.13.4, GPLv3) in vendor/freemius/wordpress-sdk/, which handles opt-in diagnostics and Pro licensing. Its source is available in that repository.