> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://support.custompricecalculator.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to Convert Your Excel Pricing Formula to Custom Price Calculator

If you have been pricing in Excel or Google Sheets, you do not have to start from scratch. Most of what you already write works, with two differences worth knowing before you begin.

## What stays the same

| In your spreadsheet | In CPC |
| ---- |
| `+` `-` `*` `/` and parentheses | the same |
| `IF(condition, a, b)` | `if(condition, a, b)` |
| `MIN(a, b)` and `MAX(a, b)` | `min(a, b)` and `max(a, b)` |
| `AND(...)` and `OR(...)` | `and(...)` and `or(...)` |
| `ROUNDUP(Width, 0)` | `ceil(Width)` |
| `ROUNDDOWN(Width, 0)` | `floor(Width)` |
| `>` `<` `>=` `<=` `=` `<>` | the same, and `==` and `!=` also work |
| Cell references like `B2` | your element names, like `Width` |

Conditions can be nested inside one another, exactly as they can in a spreadsheet.

## What is different

**Cells become element names.** `B2` becomes `Width` — whatever you called the element. The name must match its label's spelling, spaces and punctuation; capitals do not have to match. A name that does not match its label is the single most common reason a formula will not save.

**There is no `ROUND`.** Set **Formula Output Decimals** to 2 in the calculator's settings and the price displays to two places. `ceil()` and `floor()` are still there for rounding to whole units of material.

**There is no `ABS` or `POW`, and no `^`.** If your sheet raises something to a power, get in touch — there is usually another way to express it.

**One calculation cannot reference another.** In a spreadsheet you build a result across several cells. Here, write the whole expression out in one formula.

## Convert a formula, step by step

Take a spreadsheet formula:

```
= 25 + (B2 * B3 * 12)
```

`B2` is the width the customer enters, `B3` the length, `12` your price per square foot, `25` a base fee.

Create two Number Input elements named `Width` and `Length`, then write:

```
25 + (Width * Length * 12)
```

That is the whole conversion: swap the cell references for element names.

## A conditional example

```
= IF(B4 > 100, B4 * 0.9, B4)
```

becomes

```
if(Quantity > 100, Quantity * 0.9, Quantity)
```

A 10% discount over 100 units. Same shape, lowercase function name, element name instead of the cell.

## A longer one

```
= 50 + ((B2 / ROUNDDOWN(320 / (B3 + 6), 0)) * (B4 + 6) / 1000) * B5
```

Map each cell to an element — `BaseMeasurement`, `Dimension1`, `Dimension2`, `Quantity` — and swap `ROUNDDOWN` for `floor`:

```
50 + ((BaseMeasurement / floor(320 / (Dimension1 + 6))) * (Dimension2 + 6) / 1000) * Quantity
```

## Tips

**Name elements clearly.** `Width` beats `input1` when you come back to the formula in six months.

**Test with numbers you already know.** Run the same values through your sheet and the calculator; the results should match exactly.

**Let the field help you.** Click into the formula box and it suggests functions and element names as you type, with a hint showing which argument you are on. If you would rather describe the pricing than write it, the same field offers a route into Calcy, the AI builder.

**Parentheses are free.** When the order of operations is not obvious, add them.