i wanted to fly a drone at a certain height constantly, the drone doesnt have any camera, how to know the height at which its flying and to control the drone ? if possible i would need mathematical calculations of it ?

What type of drone are you looking at?

the drone i have selected is a dji 500

I am unfamiliar as well, is that a matrix series? Either way the traditional method for altitude determination is based on a barometer measuring atmospheric pressure, from this, given humidity, temp and dewpoint you can reliably calculate altitude. other ways would be ultra sonic, or laser measurements from you to ground but this would change as the ground topology changes.