# Calculator is not loading

Are you experiencing users being unable to see the calculator on the page?

<figure><img src="/files/YHJwZg9S3exeT40WcaGQ" alt=""><figcaption></figcaption></figure>

This is a very common issue that is most likely related to the following reasons:

* Formula field contains non-existing element.
* Formula field contains not logical calculations.
* Incorrect usage of the if/else statements in Formula field.

### Formula field contains non-existing element.

&#x20;the Formula field which is used on your calculator. The fastest way to rule this issue out is to check the console using [Browser developer tools](https://developer.chrome.com/docs/devtools/open/).

<figure><img src="/files/DeP2fcJWxrK8eI9S4fRq" alt=""><figcaption></figcaption></figure>

In our example calculator is searching for quantity\_field\_id\_10, but it does not exist. To make sure let's check your Formula field and used elements:

<figure><img src="/files/EekcFpKi43bkLZ1xWfS6" alt=""><figcaption></figcaption></figure>

While checking the formula field you can see there is an incorrect element used. After removing or adding new elements into pre-built calculators, use correct calculations in the [Formula field](/cost-calculator-builder/calculator-elements/total.md).&#x20;

### Incorrect usage of the if/else statements in Formula field

While adding a conditional statement in the format of JavaScript code make sure that you followed JavaScript Standard and validated before directly pasting it to the Formula filed. When if/else statements are not finished the Calculator may stop loading on the Page. Here is an example:

{% tabs %}
{% tab title="Incorrect Statement" %}

````
```javascript
if (radio_field_id_2 == 30) {
    if (dropDown_field_id_1 == 1) {
        50 + radio_field_id_2 +  toggle_field_id_8 
    } else if (dropDown_field_id_1 == 2) {
        100 + radio_field_id_2 +  toggle_field_id_8 
    } else if (dropDown_field_id_1 == 3) {
        150 + radio_field_id_2 +  toggle_field_id_8 
    } else {
        180 + radio_field_id_2 +  toggle_field_id_8 
    }
} else {
    if (dropDown_field_id_1 == 1) {
        10 +  toggle_field_id_8 
    } else if (dropDown_field_id_1 == 2) {
        20 +  toggle_field_id_8 
    } else if (dropDown_field_id_1 == 3) {
        30 +  toggle_field_id_8 
    } else if (dropDown_field_id_1 >= 3){
        40 +  toggle_field_id_8 
    }
}
```
````

The if/else statement is wrong in this example because it is ending with "**else if"** in the else part of the snippet.
{% endtab %}

{% tab title="Correct Statement" %}

````
```javascript
if (radio_field_id_2 == 30) {
    if (dropDown_field_id_1 == 1) {
        50 + radio_field_id_2 +  toggle_field_id_8 
    } else if (dropDown_field_id_1 == 2) {
        100 + radio_field_id_2 +  toggle_field_id_8 
    } else if (dropDown_field_id_1 == 3) {
        150 + radio_field_id_2 +  toggle_field_id_8 
    } else {
        180 + radio_field_id_2 +  toggle_field_id_8 
    }
} else {
    if (dropDown_field_id_1 == 1) {
        10 +  toggle_field_id_8 
    } else if (dropDown_field_id_1 == 2) {
        20 +  toggle_field_id_8 
    } else if (dropDown_field_id_1 == 3) {
        30 +  toggle_field_id_8 
    } else {
        40 +  toggle_field_id_8 
    }
}
```
````

The if/else statement is correct in this example because it is ending with "**else**" in all parts of the snippet.
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stylemixthemes.com/cost-calculator-builder/troubleshooting/calculator-is-not-loading.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
