Are there RPC calls for correct RBF calculations in Bitcoin Core?
If your transaction is from Bitcoin Core's wallet, you can use the bumpfee command. It should do the same thing that the GUI does in order to create a replacement transaction with a higher fee.