We study the two-variable fragments D^2 and IF^2 of dependence logic and independence-friendly logic. We consider the satisfiability and finite satisfiability problems of these logics and show that for D^2, both problems are NEXPTIME-complete, whereas for IF^2, the problems are undecidable. We also show that D^2 is strictly less expressive than IF^2 and that already in D^2, equicardinality of two unary predicates and infinity can be expressed (the latter in the presence of a constant symbol).An extended version of this publication can be found at arxiv.org.