# calculation syntax

**URL:** <http://forum.qcad.org/t/calculation-syntax/7935>\
**Category:** QCAD 'How Do I' Questions\
**Created:** [March 18, 2023, 3:41pm UTC](http://forum.qcad.org/t/calculation-syntax/7935 "2023-03-18T15:41:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DaleEltoft](http://forum.qcad.org/user_avatar/forum.qcad.org/daleeltoft/32/85_2.png) [@DaleEltoft](http://forum.qcad.org/u/DaleEltoft)\
**Post date:** [March 18, 2023, 3:41pm UTC](http://forum.qcad.org/t/calculation-syntax/7935/1 "2023-03-18T15:41:49Z")

</div>

I’ve been using the ability to enter numbers as simple arithmetic with ±\*/. Now I need to do powers and roots. If this is possible, where can I find documentation of the syntax?

---

<div class="post-metadata">

**Author:** ![petevick](http://forum.qcad.org/user_avatar/forum.qcad.org/petevick/32/67_2.png) [@petevick](http://forum.qcad.org/u/petevick)\
**Post date:** [March 18, 2023, 3:50pm UTC](http://forum.qcad.org/t/calculation-syntax/7935/2 "2023-03-18T15:50:06Z")

</div>

there are a few snippets here that may help you - [Use command line like a calculator](http://forum.qcad.org/t/use-command-line-like-a-calculator/2148/1)

---

<div class="post-metadata">

**Author:** ![andrew](http://forum.qcad.org/user_avatar/forum.qcad.org/andrew/32/15013_2.png) [@andrew](http://forum.qcad.org/u/andrew)\
**Post date:** [March 18, 2023, 4:27pm UTC](http://forum.qcad.org/t/calculation-syntax/7935/3 "2023-03-18T16:27:29Z")

</div>

The syntax is basic JavaScript, so for example [Math.pow](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/pow)(3,2) and [Math.sqrt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sqrt)(9) will work. However, in QCAD, for convenience, pow(3,2) and sqrt(9) also work.

See also:

> **[QCAD User Reference Manual](https://qcad.org/doc/qcad/latest/reference/en/index.php?page=scripts%2FWidgets%2FCommandLine%2Fdoc%2FCommandLine)**

---

<div class="post-metadata">

**Author:** ![DaleEltoft](http://forum.qcad.org/user_avatar/forum.qcad.org/daleeltoft/32/85_2.png) [@DaleEltoft](http://forum.qcad.org/u/DaleEltoft)\
**Post date:** [March 18, 2023, 6:33pm UTC](http://forum.qcad.org/t/calculation-syntax/7935/4 "2023-03-18T18:33:33Z")

</div>

Thanks
