How would I make a frame rate GUI?

So basically I’m trying to add a frame rate GUI to my game, and I’m not exactly sure how. I’ve seen people use Workspace:GetRealPhysicsFPS(), but that does not give the actual player’s computer framerate. I then tried using RunService.RenderStepped and doing math.floor(1 / (1 / deltaTime)) and it was slightly better. However, the frame rate doesn’t seem like the actual computer frame rate. I used 240 FPS and it sometimes went beyond 250. I did 144 and got over 150. Is there a more reliable way of getting computer framerate?

This post should be what you’re looking for, it’s a bit complicated for simply getting FPS but it does get an very accurate frame rate: