How to add my own custom function?

The question is in the subject but just to elaborate, I am looking to do my own math and want to add that to Grafana as a function on one of my graphs.

To my explain my use case: I am looking to predict when my disk will fill up. So I use zabbix and in Query A, I graph the used disk space and in Query B I graph the total disk space. Then I want to apply my function to run the math I have calculated for this.

Any help is appreciated!