# How to calculate this formula and display percentage?

**URL:** <https://community.thunkable.com/t/how-to-calculate-this-formula-and-display-percentage/2199065>\
**Category:** Questions about Thunkable X\
**Created:** [December 30, 2022, 8:17pm UTC](https://community.thunkable.com/t/how-to-calculate-this-formula-and-display-percentage/2199065 "2022-12-30T20:17:44Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [December 31, 2022, 7:03am UTC](https://community.thunkable.com/t/how-to-calculate-this-formula-and-display-percentage/2199065/8 "2022-12-31T07:03:31Z")

</div>

You’re welcome. Your percent—\>grade question is typically solved with an if/else if/else if… set of blocks. But it can also be solved with a series of stacked if blocks. Create two variables called percent and grade. Set percent to the value you calculated (such as 71%). Then set up this (I’m using sample values… your actual ranges may be different):

**Edit:** Oops! I originally had these in the wrong order. It should be:

If percent \<= 100 then set grade to A  
If percent \< 90 then set grade to B  
If percent \< 80 then set grade to C  
If percent \< 70 then set grade to D  
If percent \< 60 then set grade to F

---

_[View the full topic](https://community.thunkable.com/t/how-to-calculate-this-formula-and-display-percentage/2199065)._
