You are correct. Your costs are the cost of purchasing the outer legs and your profit is from the sell of the inner legs. Of course there's commissions, exchange fees, regulatory costs, etc as well just like with any other options trade.
Generally, with an iron condor you get to pick your max profit (within reason) and max loss (within reason) by selecting appropriate legs. If what you're calculating is showing expenses greater than max profit, then you need to take on more risk (move the inner legs in closer and the outer ones further away). While this will increase risk, it will also increase premiums received on the legs you sell as well as reduce costs on the legs you buy.
This is basically the name of the game when it comes to options. The higher the profit potential, the more risk you must assume (in terms of max loss, statistical odds of the trade going against you, or both).
By moving the inner legs closer together, you are betting that the underlying will stay within a smaller range. This makes it more likely that the trade will go against you, but this additional risk allows you to get higher premium by selling closer to the money strikes. Similarly, by buying strikes further out, you are reducing the cost of those contracts, but you are also increasing max loss.
If you thought iron condors were some holy grail of risk free profits, think again. No such thing exists. I'd strongly recommend you paper trade these before going live.
EDIT: having re-read your post, I'm thinking perhaps you were not seeing a positive max profit because you had mixed up which contracts to buy/sell. I'll give an example. This is purely for illustration purposes and I am not recommending you (or anyone) do this particular trade:
TSLA is at $342.9
BUY put strike of $325 expiration of 10/27 at a price of $4.65
SELL put strike of $335 expiration of 10/27 at a price of $7.35
SELL call strike of $350 expiration of 10/27 at a price of $7.90
BUY call strike of $360 expiration of 10/27 at a price of $5.10
To initiate this trade (ignoring commissions and other fees) you will pay out $9.75 ($5.10 + $4.65) for the contracts you buy and you will receive $15.25 ($7.9 + $7.35) for the contracts you sell, for a net credit of $5.5/share. This is your maximum profit. Your maximum loss is $10 - $5.5 = $4.5.