This might be more info than what you were looking for, but if you read the following 3 articles, you'll have a good understanding. And you'll find the formulas.
This one explains how a capacitor behaves:
https://www.electronics-tutorials.ws/filter/filter_1.html
This one explains how to use a...