Documentation

Learn how to create and share custom calculators with Calcula.club.

Getting started

Calcula.club lets you create custom calculators without writing code. Go to the Builder to start building your calculator by dragging fields and defining formulas.

  • Click "Start creating" on the home page
  • Drag fields to the canvas or click on field types
  • Configure each field's properties (label, min, max, etc.)
  • Write your formula using the field IDs
  • Share your calculator with the generated URL
  • Field types

    Calcula.club offers several field types:

  • Number — Numeric input with optional min, max, and step
  • Slider — Visual slider with configurable range
  • Select — Dropdown list with custom options (each option has a numeric value)
  • Checkbox — Yes/no toggle that produces 0 or 1
  • Radio — Button group with custom options
  • Date — Date picker (converted to epoch days in formulas)
  • Range — Dual slider that generates two variables: id_min and id_max
  • Section — Text block with markdown support and dynamic values {{formula}}
  • Divider — Visual separator, optionally with image or text
  • Formula syntax

    Formulas use field IDs as variables. You can use standard arithmetic operators and built-in functions.

    Operators: +, -, *, /, % (modulo), ^ (power)

    Comparisons: >, <, >=, <=, ==, != (return 1 or 0)

    Intermediate variables: Use semicolons to define local variables:

    monthly_rate = interest / 100 / 12;
    n = term * 12;
    principal * monthly_rate / (1 - pow(1 + monthly_rate, -n))

    Available functions:

  • Math: pow(x,y), sqrt(x), abs(x), round(x), floor(x), ceil(x)
  • Trigonometry: sin(x), cos(x), tan(x), asin(x), acos(x), atan(x)
  • Statistics: min(a,b), max(a,b), avg(a,b,c), sum(a,b,c), factorial(n)
  • Logarithms: ln(x), log(x), log10(x), exp(x)
  • Conditionals: if(cond, then, else)
  • Lookup: lookup(value, threshold1, result1, ..., default)
  • Constants: pi, e
  • Advanced features

    The Advanced section in the Builder adds extra functionality:

  • Extra results — Display additional calculated values with their own formulas (e.g. monthly payment, total interest)
  • Result thresholds — Change the result color based on ranges (e.g. green for normal BMI, red for overweight)
  • Breakdown — Show a line-by-line breakdown of the result
  • Pie chart — Visualize value distribution with custom segments
  • Conditional visibility — Each field has a "Show if" option that accepts a formula; the field shows when the result is non-zero
  • Sharing and embedding

    Every calculator has a unique URL that contains its entire configuration encoded. No backend or database needed.

    Share by URL: Copy the direct URL from the Builder's "Share" section.

    Embed on your site: Use the iframe code generated in the "Embed widget" section. You can customize initial values by adding query parameters to the URL.

    Download HTML: Generate a self-contained HTML file that works offline.

    Custom values: Add query parameters to the embed URL with field IDs to pre-fill values (e.g. ?field1=50&field2=100).