# Evaluate math from string

**URL:** <https://forum.elixirforum.com/t/evaluate-math-from-string/13779>\
**Category:** Questions\
**Tags:** mathematics, strings\
**Created:** [April 20, 2018, 8:42pm UTC](https://forum.elixirforum.com/t/evaluate-math-from-string/13779 "2018-04-20T20:42:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jeromedoyle](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jeromedoyle/32/7012_2.png) [@jeromedoyle](https://forum.elixirforum.com/u/jeromedoyle)\
**Post date:** [April 20, 2018, 8:47pm UTC](https://forum.elixirforum.com/t/evaluate-math-from-string/13779/2 "2018-04-20T20:47:41Z")

</div>

I found it. Looks like Code.eval\_string/3 does the trick. I’m aware of the risk in this approach, but since this is an internal app used by a select few people, I’m ok with it. If there’s a less risky way to do it, I would love to know.

---

_[View the full topic](https://forum.elixirforum.com/t/evaluate-math-from-string/13779)._
