# Rounding a number UP

**URL:** <https://forum.kirupa.com/t/rounding-a-number-up/264161>\
**Category:** Uncategorized\
**Created:** [June 23, 2008, 5:17pm UTC](https://forum.kirupa.com/t/rounding-a-number-up/264161 "2008-06-23T17:17:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![geestring](https://avatars.discourse-cdn.com/v4/letter/g/e19b73/32.png) [@geestring](https://forum.kirupa.com/u/geestring)\
**Post date:** [June 23, 2008, 5:17pm UTC](https://forum.kirupa.com/t/rounding-a-number-up/264161/1 "2008-06-23T17:17:34Z")

</div>

I know math.round would round a number.

but what if i wanted to round it just up.

so lets say I have 8 thumbnails, my rows are 4 thumbnails long.

so 8/4 = 2 rows.

if I have 1 thumbnail, 1/4 = 0.25 rows. I want this to round up to 1 row.

---

<div class="post-metadata">

**Author:** ![pantas](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@pantas](https://forum.kirupa.com/u/pantas)\
**Post date:** [June 23, 2008, 5:26pm UTC](https://forum.kirupa.com/t/rounding-a-number-up/264161/2 "2008-06-23T17:26:29Z")

</div>

var myNumber:Number = 1/4

Math.ceil(myNumber)

---

<div class="post-metadata">

**Author:** ![geestring](https://avatars.discourse-cdn.com/v4/letter/g/e19b73/32.png) [@geestring](https://forum.kirupa.com/u/geestring)\
**Post date:** [June 23, 2008, 5:42pm UTC](https://forum.kirupa.com/t/rounding-a-number-up/264161/3 "2008-06-23T17:42:35Z")

</div>

boohya thanks
