 # Exact formula ROBLOX uses to apply gravity to an object

Basically, I just need to know how gravity is applied, specifically the equation I can use to calculate a part’s position over time. I initially thought the equation was -(gravity / 2)x² + (starting Y velocity)x + (initial Y position). To test this, I applied Y velocity to a part and tried to predict what the vertex of its movement would be. However, the part always seems to come up a little bit short. For example, when applying a Y velocity of 100 to an object with standard gravity, the equation I came up with was -98.1x² + 100x. I expected the part to peak at roughly 25.484, but it actually peaked at roughly 25.268. Does anyone know what I’m missing here? If anyone could explain that, I would really appreciate it.

The devhub says it’s `Gravity/seconds^2` in studs per second.

I understand that, but can you explain why those slight deviations are occurring between my expected and actual vertexes? It looks like there’s some factor I’m missing.

Slight deviations are, sadly, to be expected. Refer to this thread.

Ah, I see now. For what I’m working on, I suppose the deviations won’t be that much of a problem. Thanks for your help.