In my story several flying mythical creatures have been brought in a more realistic world. some creatures like Gargoyles can only fly for short distances while others like the heavenpiercer (a type of wyvern) which spends most of it's adult life high above the clouds. and i'm curious to know if there is an equation i could use to calculate the furthest one of these animals could fly by plugging in there length, wingspan, wingwidth, ect. or use to find the dimensions needed for a creature to fly a certain length?
You can't. Flight endurance depends on not just the animal, but also the environment and circumstances. Even if you had an equation for the animal, real-world performance would still depend on environment and circumstances.
But, you can look at different bird morphologies to get a sense of what makes some birds fliers and other birds flitters.
The Albatross is famously adapted to long-duration flight, and can essentially stay in the air indefinitely. Pretty much the only thing they need to come back to land for is mating and hatching chicks.
Meanwhile, the turkey vulture is a scavenger. Because they never know when and where their next meal will be, they're capable of eating so much that they cannot fly. (Many other birds are also capable of eating so much that it affects their flying ability.)
Other birds use wind patterns and columns of hot air called thermals to fly for long periods without flapping and expending almost no energy.
There is no standard formula, but the basic principle is that birds have a certain store of energy, and exertion drains that store. At the same time, metabolic activity can replenish that energy even while it is being drained. If they use too much then they are exhausted and they have to stop until they have rested.
You can fly longer if you are more efficient (use less energy to fly, such as in the Soaring link above), or if you improve your ability to generate energy by increasing heartrate and lung capacity.
You can see this in people too. Any healthy and fit person can go out and run a few miles. An overweight person has to stop sooner and walk because they need more energy to run, and after a while they can run a little more. Marathon runners and ultramarathonners have trained to the point where they have boosted their energy-generation ability so they essentially run indefinitely.
For one more morphology, falcons are not particularly high-endurance birds, but they are very fast. The peregrine falcon can reach speeds over 200 miles per hour (320 km/h).