# Mathematical calculations

**URL:** <https://discourse.nodered.org/t/mathematical-calculations/56169>\
**Category:** General\
**Tags:** function-node\
**Created:** [5 January 2022 19:06 UTC](https://discourse.nodered.org/t/mathematical-calculations/56169 "2022-01-05T19:06:22Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [5 January 2022 19:21 UTC](https://discourse.nodered.org/t/mathematical-calculations/56169/4 "2022-01-05T19:21:57Z")

</div>

You can join the outputs of the two function nodes with a join node like this

 ![Untitled 1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/5/7588251c207446691af166b67be815011bf35710.jpeg)

```auto
[{"id":"c48f46e577eaf844","type":"function","z":"a3e369ffd4e1629e","name":"","func":"msg.payload = 27;\nmsg.topic = \"topic1\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":340,"y":120,"wires":[["6c4f6e5cbee8072a"]]},{"id":"3a263e81ac6bd039","type":"function","z":"a3e369ffd4e1629e","name":"","func":"msg.payload = 5;\nmsg.topic = \"topic2\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":340,"y":160,"wires":[["6c4f6e5cbee8072a"]]},{"id":"6c4f6e5cbee8072a","type":"join","z":"a3e369ffd4e1629e","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":490,"y":140,"wires":[["398e5fefd1268494","3c35d0d4665504b7"]]},{"id":"398e5fefd1268494","type":"function","z":"a3e369ffd4e1629e","name":"","func":"msg.payload = msg.payload.topic1 + msg.payload.topic2;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":620,"y":140,"wires":[["7aad460a950c31d3"]]},{"id":"2469c14de3faaafc","type":"inject","z":"a3e369ffd4e1629e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":200,"y":120,"wires":[["c48f46e577eaf844"]]},{"id":"3dbb85870f589efb","type":"inject","z":"a3e369ffd4e1629e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":200,"y":160,"wires":[["3a263e81ac6bd039"]]},{"id":"7aad460a950c31d3","type":"debug","z":"a3e369ffd4e1629e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":770,"y":140,"wires":[]},{"id":"3c35d0d4665504b7","type":"debug","z":"a3e369ffd4e1629e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":630,"y":100,"wires":[]}]

```

And the node @dceejay mentioned is introduced [here](https://discourse.nodered.org/t/announce-node-red-contrib-tank-volume-beta/47101)

---

_[View the full topic](https://discourse.nodered.org/t/mathematical-calculations/56169)._
