Ok, may one of use Christians that all of you seem to love to bash give some input? ( 😉 ) Esp. since the question is directed to believers?
Camel, you are 1/2 right about the reference to Onan. Onan was the second son of Judah, one of the 12 sons of Jacob, who later became Israel. Judah's oldest son, Er, has been slain by the Lord for his wickedness (Genesis 38:7). What did he do? Don't know, the Word doesn't say. Perhaps the oral or written Jewish histories record it, but Genesis doesn't. The tradition back then (for those of you who didn't go to Sunday School or catechism (sp?), this was before Moses and the Law), if a man died and left a widow and no children, the next oldest son was to take her into his household, "lay with her" (King James for sexual intercourse), and cause her to concieve, creating a blood line for the dead man and his wife. Onan did not want to do this, since the child would be considered Er's child and not his. so he spilled his semen on the ground (Gen 38:9). If you read the chapter, he wasn't masturbating but pulling out before he ejaculated in her (I believe the correct term is coitus interruptus, but I may be wrong there). Onan was stuck down by God for this act of selfishness. He was not killed for mastrubating, but for denying Tamar (Er's widow) children. Turns out Judah's entire family was really messed up sexually if you read the rest of the chapter, but suffice it to say that masturbation was not his sin, but selfishness.
The root that one needs to analyze is not the what, but the why. Why masturbating? If you are "doing the deed by hand" as you think about your wife/husband because she and you are several cities/states/nations apart and have been for a while, and you are thinking about him/her, then it's a way to keep one's self from being tempted by others.
I Corinthians 7:1-6 discusses it well. The body of the wife belongs to her husband, and the body of the husband EQUALLY belongs to his wife. So, it may be attached to you, but in the scriptural sense, it belongs to your spouse. Therefore, sexual activity is to fulfill the husband and the wife. Dr. Tim LaHaye (more known now for the "Left Behind" book series) wrote a book that in some parts is a 'sex manual' for Christians called "The Act of Marriage". No, it doesn't describe technique or positions, but the mental and spirtual aspects to bring completeness to the sexual life for the Christian.
If it's not your spouse? Then Christ says it very straightforward in Matthew 5:27-28 "You have heard that it was said 'Do not committ adultery'. But I tell you that anyone who looks at a woman lustfully in his heart has already committed adultery with her in his heart." Sexual focus on someone other than your spouse is wrong. Is it easy to do? Nope, but He never said it would be. I fight it all the time. I do my best not to and stop myself if it starts.
"But...But...what if I'm not married" Then don't expose yourself (no pun intended or implied..😉 ) to anything that leads you down that path. My sexual life started on my wedding night. That's God's intention for marriage.
So, if you're doing it because your wife/husband is not accessible due to prlonged distance, illness, etc. then you are fine. However, if you are doing to avoid contact with or otherwise deny your spouse, that is wrong. If you do it fantasizing about someone else (neighbor, old flame, secretary, pin up girl on that website...), that is adultery. If no spouse, it's adultery, period. As it says in Proverbs 23:7, as a person thinks, so is he (how he behaves). If you can't stay faithful mentally, physically isn't many step further down the path.
Easy standard to follow? As a believer in Christ, I can attest it is not easy to do. That's what prayer and the Holy Spirit are there for, to help get you through.
Popular opinion? Of course not, for the thinking of this age is do whatever one wants, not what is right in God's eyes. But, that's what His Word says. What's right isn't always popular. What's popular isn't always right. But for those seeking an informed opinion based on scripture, that's what is says.