---
title: "Add calculations to blog posts"
date: 2026-04-23
author: "GravityKit"
link: "https://www.gravitykit.com/docs/gravitymath/insert-calculations-into-post-content/"
---

In order to use the  shortcode, you must have [GravityMath](https://www.gravitykit.com/products/math/) installed on your website.

You can use the `[gravitymath]` shortcode in your website's post or page content as well. Insert the shortcode, and it will be dynamically replaced!

## Insert calculations into the post content

![WordPress blog post editor with a calculation shortcode highlighting average distance](https://www.gravitykit.com/wp-content/uploads/2018/01/insert-calculations-into-post-content.png?1470957180)

## The shortcode gets replaced on the front end with the calculation

When a new entry gets added to Floaty's Star Form, the average will dynamically update. There's no need to edit the post.

![Blog post with calculated average star distance of 186.47375 light years](https://www.gravitykit.com/wp-content/uploads/2018/01/the-shortcode-gets-replaced-on-the-front-end-with-the-calculation.png?1470957181)