Help with Calc Formula (Less or Greater than)

I’ve been trying to find a way to modify this formula into my needs.

for example:

=SUM((((C17-(C17*0.05)-F12)*12)-36000000)*0.05)/12

Problem is,

the (C17*0.05) is has to be less or equal to 500000

and F12 has to be less or equal to 200000

I’ve tried to make it this way

=SUM((((C17-((C17*0.05)<=500000)-(F12<=200000)*12)-36000000)*0.05)/12

But it didnt work.

Anybody who could help are greatly appreciated.

Thanks.

Try: "=if((C140.05)<=500000),if((F12<=200000),SUM(((C17-(C170.05)-F12)*12)-3600000)*0.05)/12, “failure output”)