# Transaction - Calculate a gas limit

**URL:** <https://forum.flow.com/t/transaction-calculate-a-gas-limit/309>\
**Category:** Flow JavaScript SDK\
**Tags:** flow-sdk-js\
**Created:** [July 9, 2020, 8:01pm UTC](https://forum.flow.com/t/transaction-calculate-a-gas-limit/309 "2020-07-09T20:01:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MaxStarka](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/maxstarka/32/56_2.png) [@MaxStarka](https://forum.flow.com/u/MaxStarka)\
**Post date:** [July 9, 2020, 8:01pm UTC](https://forum.flow.com/t/transaction-calculate-a-gas-limit/309/1 "2020-07-09T20:01:19Z")

</div>

Is there a way to calculate precise limit for transaction? 🤔  
I’m using a limit of 100 for all my transactions for now, but this is like a blind shot 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![pete](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/pete/32/191_2.png) [@pete](https://forum.flow.com/u/pete)\
**Post date:** [July 9, 2020, 9:45pm UTC](https://forum.flow.com/t/transaction-calculate-a-gas-limit/309/2 "2020-07-09T21:45:11Z")

</div>

We fully intend to support gas estimation, but it’s still in the early design phase right now. The Cadence gas metering model itself is subject to further changes, so it’ll likely be a little while until we know how to best calculate gas limits.

Our ideal solution would allow a user to calculate a gas limit without much communication with a Flow node. While some networks require gas estimation to be performed by a networked node, we’re hoping to arrive at a solution that leverages static analysis to produce reliable estimates without actually executing the transaction in the full Flow VM.

For now it’s best to assume that we will eventually add a function to the SDKs that takes a transaction as input and returns a reliable gas estimate. In the meantime it’s safe to use a much higher than needed limit because we’ve configured both the emulator and live networks with generous upper bounds.

---

<div class="post-metadata">

**Author:** ![MaxStarka](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/maxstarka/32/56_2.png) [@MaxStarka](https://forum.flow.com/u/MaxStarka)\
**Post date:** [July 12, 2020, 8:01am UTC](https://forum.flow.com/t/transaction-calculate-a-gas-limit/309/3 "2020-07-12T08:01:43Z")

</div>

Thank you a detailed response! 🙇‍♂️
