{"id":154,"date":"2026-11-19T08:48:46","date_gmt":"2026-11-19T08:48:46","guid":{"rendered":"https:\/\/oddlylogical.com\/logical-forms\/?post_type=doc&#038;p=154"},"modified":"2026-11-27T05:43:49","modified_gmt":"2026-11-27T05:43:49","slug":"number-calculations","status":"publish","type":"doc","link":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/number-calculations\/","title":{"rendered":"Calculate a Number field with Pro"},"content":{"rendered":"<p>Pro turns a Number field into a calculated result. For a simple estimate, collect Quantity and Unit price as ordinary Number fields, then calculate a Subtotal. Core's normal Number input remains available without Pro.<\/p>\n<h2 id=\"configure\">Build the formula<\/h2>\n<ol>\n<li>Add the source Number fields and give them clear labels.<\/li>\n<li>Add a result Number field and open <strong>Calculation<\/strong>.<\/li>\n<li>Turn on <strong>Enable calculation<\/strong>.<\/li>\n<li>Use Insert field and the operator buttons to build the expression.<\/li>\n<li>Set Round to, select Validate formula, then Done.<\/li>\n<li>Select <strong>Save form<\/strong> to validate and persist the whole draft.<\/li>\n<\/ol>\n<pre><code>{field:1} * {field:2}<\/code><\/pre>\n<p>The IDs above are examples. Insert your actual fields rather than copying them blindly. Renaming a source label retains its numeric reference.<\/p>\n<figure class=\"lf-docs-shot\" id=\"lf-shot-number-calculations-1\" data-lf-docs-asset=\"S30-number-calculation\" style=\"--lf-shot-width: 609px\">\n  <a href=\"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-beta37-quantity-calculation.webp\" data-lf-docs-image data-native-width=\"1248\" data-native-height=\"1488\" aria-label=\"Enlarge screenshot: Multiply Quantity by Unit price, validate the formula and round to two decimal places.\"><br \/>\n    <img src=\"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-beta37-quantity-calculation.webp\" srcset=\"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-beta37-quantity-calculation-320w.webp 320w, https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-beta37-quantity-calculation-640w.webp 640w, https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-beta37-quantity-calculation-800w.webp 800w, https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-beta37-quantity-calculation.webp 1248w\" sizes=\"auto, (min-width: 1168px) 609px, (min-width: 992px) min(609px, calc(100vw - 337px)), (min-width: 768px) min(609px, calc(100vw - 278px)), min(609px, calc(100vw - 48px))\" width=\"1248\" height=\"1488\" alt=\"Enabled Number calculation multiplying Quantity field 17 by Unit price field 18, validated and rounded to two decimal places.\" loading=\"lazy\" decoding=\"async\"><br \/>\n  <\/a><figcaption>Multiply Quantity by Unit price, validate the formula and round to two decimal places.<\/figcaption><\/figure>\n<h2 id=\"syntax\">Supported arithmetic<\/h2>\n<p>Use decimal constants, field references, addition, subtraction, multiplication, division, parentheses and unary minus. Another calculated Number can be a source when the dependency is valid. This is a bounded arithmetic language, not PHP, JavaScript or a spreadsheet function interpreter.<\/p>\n<p>A percent suffix divides its preceding value by 100. For example, <code>{field:1} * 15%<\/code> calculates fifteen percent, and <code>{field:1} * (1 + 15%)<\/code> adds fifteen percent to the source amount.<\/p>\n<h2 id=\"sources\">Eligible sources and layout<\/h2>\n<p>Sources and results can be Visible or Hidden Number fields. Internal fields are excluded. Sources must be on the same or an earlier page; same-page visual order is flexible. Save rejects missing references, self-references and dependency cycles.<\/p>\n<p>A blank, conditionally excluded or invalid source leaves the result blank. Zero remains a valid source. Division by zero or arithmetic overflow produces a calculation error rather than a plausible-looking estimate.<\/p>\n<h2 id=\"repeater-calculations\">Calculations within and across Repeater rows<\/h2>\n<p>Inside a Repeater, a calculated Number can use eligible Number fields from its own row and the main form. Each row calculates independently; it cannot read a particular row from another Repeater.<\/p>\n<p>Outside the Repeater, inserting a repeated Number field into a formula sums that numeric column across applicable rows. For example, calculate Quantity \u00d7 Unit price in each row, then insert that row-total field into a main-form Number calculation. Use the actual field picker and IDs; no separate SUM function is required. Visible and Hidden Numbers are supported. Inactive row results do not contribute to the sum.<\/p>\n<p>Hidden visibility keeps a Number active for calculations. Conditional inactivity is different: an inactive main-form operand leaves a dependent result blank. Hidden values are not a secret-storage mechanism.<\/p>\n<h2 id=\"rounding\">Rounding and result controls<\/h2>\n<p><strong>Round to<\/strong> allows 0\u201330 decimal places and defaults to 2. Ties round away from zero. Values are stored in canonical numeric form, so a result of 25 is not forced to display as currency or 25.00.<\/p>\n<p>The result is read-only for visitors. While calculation is enabled, Default value, Dynamic population and Step are inactive. Minimum, Maximum and Required still apply to the calculated result.<\/p>\n<h2 id=\"conditions\">Conditions and saving<\/h2>\n<p>An ordinary condition can control whether a calculated Number is shown. Calculated results cannot drive field, page or Next-button conditions; use suitable original answers for those branches. Saved results can be used in confirmation\/notification tags and supported Pro action conditions.<\/p>\n<p>The server derives the result from applicable source answers rather than trusting a browser-submitted result. The accepted Number appears in entries, CSV and field merge tags. Editing a source through the protected entry workflow recalculates affected results; changing the formula alone does not rewrite historical entries.<\/p>\n<h2 id=\"test\">Check a known example<\/h2>\n<p>For Quantity 3 and Unit price 25, confirm a Subtotal of 75. Then test zero, a blank operand, any relevant conditional branch and the configured bounds. Use <a href=\"\/docs\/test-a-form\/\">the form-testing guide<\/a> before relying on an estimate.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Build a Logical Forms Pro formula from Number fields, use percentages and rounding, and verify server-calculated results in entries.<\/p>\n","protected":false},"author":1,"featured_media":0,"menu_order":27,"template":"","doc-categories":[22],"class_list":["post-154","doc","type-doc","status-publish","hentry","doc_category-field-features"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Calculate a Number field with Pro | Logical Forms Docs<\/title>\n<meta name=\"description\" content=\"Build a Logical Forms Pro formula from Number fields, use percentages and rounding, and verify server-calculated results in entries.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/number-calculations\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Calculate a Number field with Pro | Logical Forms Docs\" \/>\n<meta property=\"og:description\" content=\"Build a Logical Forms Pro formula from Number fields, use percentages and rounding, and verify server-calculated results in entries.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/number-calculations\/\" \/>\n<meta property=\"og:site_name\" content=\"Logical Forms\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-27T05:43:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-beta37-quantity-calculation.webp\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/number-calculations\\\/\",\"url\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/number-calculations\\\/\",\"name\":\"Calculate a Number field with Pro | Logical Forms Docs\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/number-calculations\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/number-calculations\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/logicalforms.io\\\/wp-content\\\/uploads\\\/sites\\\/14\\\/2026\\\/11\\\/lf-beta37-quantity-calculation.webp\",\"datePublished\":\"2026-11-19T08:48:46+00:00\",\"dateModified\":\"2026-11-27T05:43:49+00:00\",\"description\":\"Build a Logical Forms Pro formula from Number fields, use percentages and rounding, and verify server-calculated results in entries.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/number-calculations\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/number-calculations\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/number-calculations\\\/#primaryimage\",\"url\":\"https:\\\/\\\/logicalforms.io\\\/wp-content\\\/uploads\\\/sites\\\/14\\\/2026\\\/11\\\/lf-beta37-quantity-calculation.webp\",\"contentUrl\":\"https:\\\/\\\/logicalforms.io\\\/wp-content\\\/uploads\\\/sites\\\/14\\\/2026\\\/11\\\/lf-beta37-quantity-calculation.webp\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/number-calculations\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Documentation\",\"item\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calculate a Number field with Pro\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/#website\",\"url\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/\",\"name\":\"Logical Forms\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Calculate a Number field with Pro | Logical Forms Docs","description":"Build a Logical Forms Pro formula from Number fields, use percentages and rounding, and verify server-calculated results in entries.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/number-calculations\/","og_locale":"en_US","og_type":"article","og_title":"Calculate a Number field with Pro | Logical Forms Docs","og_description":"Build a Logical Forms Pro formula from Number fields, use percentages and rounding, and verify server-calculated results in entries.","og_url":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/number-calculations\/","og_site_name":"Logical Forms","article_modified_time":"2026-11-27T05:43:49+00:00","og_image":[{"url":"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-beta37-quantity-calculation.webp","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/number-calculations\/","url":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/number-calculations\/","name":"Calculate a Number field with Pro | Logical Forms Docs","isPartOf":{"@id":"https:\/\/oddlylogical.com\/logical-forms-old\/#website"},"primaryImageOfPage":{"@id":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/number-calculations\/#primaryimage"},"image":{"@id":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/number-calculations\/#primaryimage"},"thumbnailUrl":"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-beta37-quantity-calculation.webp","datePublished":"2026-11-19T08:48:46+00:00","dateModified":"2026-11-27T05:43:49+00:00","description":"Build a Logical Forms Pro formula from Number fields, use percentages and rounding, and verify server-calculated results in entries.","breadcrumb":{"@id":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/number-calculations\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/oddlylogical.com\/logical-forms-old\/docs\/number-calculations\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/number-calculations\/#primaryimage","url":"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-beta37-quantity-calculation.webp","contentUrl":"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-beta37-quantity-calculation.webp"},{"@type":"BreadcrumbList","@id":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/number-calculations\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/oddlylogical.com\/logical-forms-old\/"},{"@type":"ListItem","position":2,"name":"Documentation","item":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/"},{"@type":"ListItem","position":3,"name":"Calculate a Number field with Pro"}]},{"@type":"WebSite","@id":"https:\/\/oddlylogical.com\/logical-forms-old\/#website","url":"https:\/\/oddlylogical.com\/logical-forms-old\/","name":"Logical Forms","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/oddlylogical.com\/logical-forms-old\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/oddlylogical.com\/logical-forms-old\/wp-json\/wp\/v2\/docs\/154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oddlylogical.com\/logical-forms-old\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/oddlylogical.com\/logical-forms-old\/wp-json\/wp\/v2\/types\/doc"}],"author":[{"embeddable":true,"href":"https:\/\/oddlylogical.com\/logical-forms-old\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":5,"href":"https:\/\/oddlylogical.com\/logical-forms-old\/wp-json\/wp\/v2\/docs\/154\/revisions"}],"predecessor-version":[{"id":754,"href":"https:\/\/oddlylogical.com\/logical-forms-old\/wp-json\/wp\/v2\/docs\/154\/revisions\/754"}],"wp:attachment":[{"href":"https:\/\/oddlylogical.com\/logical-forms-old\/wp-json\/wp\/v2\/media?parent=154"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/oddlylogical.com\/logical-forms-old\/wp-json\/wp\/v2\/doc-categories?post=154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}