# How much confirmation make it unprofitable for a double spent attack for a given amount

I'm reading through an explanation about 6 confirmations on stackexchange which eventually lead to this: https://bitcoil.co.il/Doublespend.pdf Having a hard time internalize that complex math, so I would like to get a simpler explanation from someone.

Given I'm transacting with an attacker who has an unknown amount of mining power, I want to wait for X confirmation so that after X confirmations, double spend the transacted amount will make it unprofitable for him. What kind of confirmation should I wait, assuming he is attacking me alone?

For example, given an attacker has 30% of mining power, and he is transacting 1BTC with me, he is unlikely to attack because by mining honestly, he has 30% chance of earning 12.5 BTC in the next block. If he attack me, he risk losing 30% of 12.5 BTC (or 3.75BTC) (My math can be wrong, but I'm just trying to explain my question). And in real life, it's what that matter. I want to wait only for X confirmations as long as it make the attack unprofitable to any attacker, given block reward is the only income from mining.

Can X be calculated based on the transacted amount and the current block reward?