# Formula to calculate number of chaperones

Topic Labels: Base design
1268 5
cancel
Showing results for
Did you mean:
6 - Interface Innovator

I need to calculate automatically the number of chaperones I need for a field trip.
If I have 1 to 30 students, I need 3, 30 to 60, 6, etc… The calculation is: {#of stduents}/30*3. The number is an integer. But if I have 31 students, it gives me 3 as a result while it should be 4. How can I round up the number to the next integer and not the closest one?

5 Replies 5
11 - Venus

Hi @Pascal_Vallet,
Might be easier to nest a few IF statements

``````IF({#ofStudents}<=30, 3, IF({#ofStudents}<=60, 6))
``````
18 - Pluto

This works in my tests:

``````ROUNDUP({Number of students} / 30, 0) * 3
``````

6 - Interface Innovator

Thanks for your help. My explanation was not clear, of we need 3 chaperones for 30 students, which means we need 4 for 31, 4 for 40, 5 for 41, 6 for 50, 59, and 60.

The formula that works for me is this one: ROUND(({# Students}/10+.49)

18 - Pluto

I don’t think that formula will work for small numbers of students. For example, for 20 students, I expect that formula to produce only two chaperones.

Here’s another variation to throw into the mix.

``````IF(
{# Students} <= 30,
3,
CEILING({# Students}/10)
)
``````
6 - Interface Innovator

Thanks for your help, it works !